Shell history CLI for searching, syncing, importing, and analyzing commands across terminals and machines.
$curl --proto '=https' --tlsv1.2 -LsSf https://setup.atuin.sh | sh
Agent Compatibility
JSON Output
Agent Skill
MCP Support
AI Analysis
Atuin captures shell history in a local SQLite database and adds context like directory, exit status, duration, session, and host. It is mainly a command-history tool for search, cleanup, sync, and reuse across shells and machines.
What It Enables
- Search past commands by text, exit status, time range, directory, session, or host, then replay or insert matches from the interactive history UI.
- Import existing history from bash, zsh, fish, Nushell, PowerShell, Xonsh, and related formats into one local history store.
- Sync encrypted history between machines, inspect usage stats, and prune, deduplicate, or bulk-delete entries when you need to clean up noisy or sensitive history.
Agent Fit
- Non-interactive
searchandhistory listcommands support filters, custom formats, and--print0, so agents can query prior commands and pipe results into follow-up steps. atuin doctoremits structured JSON, and the history model records context such as cwd, host, session, exit code, duration, author, and optional intent.- Fit is mixed overall: the headline experience depends on shell hooks, keybindings, and a fullscreen search UI, so unattended automation only covers part of what makes Atuin valuable.
Caveats
- History capture depends on interactive shell integration; embedded terminals or non-interactive shells may not record commands unless they source Atuin's init hooks.
- Sync requires an Atuin account or self-hosted server, and broad deletion commands can remove large parts of local and synced history if used carelessly.