Somewhere in your home directory sits a plain-text file containing years of everything you've typed at a prompt — the exact ffmpeg invocation you swear you'll remember, the fix for that one absurd docker error, the command from three jobs ago. And you can't find any of it. Shell history is one of the few developer tools that gets more useless the longer you use it. history dumps lines. Ctrl+R offers a single fuzzy match in a pipe, in that moment, on that one machine.
Atuin (github.com/atuinsh/atuin) solves this differently. It's a Rust tool that replaces your shell's built-in history with a proper database — then adds search, filtering, and encrypted sync on top. It crossed 30,000 GitHub stars with more than 300 contributors, and its maintainers note the project began in April 2021 with a v0.5 release. It's MIT-licensed and runs on macOS, Linux, and Windows, for bash, zsh, fish, and more.
The core idea is that history isn't a stream of text — it's data. Atuin records each command with metadata: the directory it ran in, the user, the host, the time, and crucially the exit code and duration. That small addition changes what you can do with the past.
Want every cargo command you've run that actually succeeded?
atuin search --exit 0 cargo
Search only failed commands from the current directory:
atuin search --exclude-exit 0 --cwd .
Filter to what you ran in the last hour, only within this git repository, or on this specific host — the interactive TUI even cycles through "global," "host," "session," "directory," and "workspace" scopes as you press Ctrl+R. Search modes range from prefix matching to full fuzzy queries using fzf's syntax.
The sync that's actually useful
The feature that keeps drawing people in is sync. Atuin can back your history up to its own server or one you host, and pull it down on any machine you log into. If you work across a laptop and a server, this is the difference between "I know I ran that here once" and "here's the command, run it."
Because the whole thing is end-to-end encrypted, the server can't read anything you sync. Atuin generates an encryption key (see it with atuin key, store it somewhere safe) and encrypts everything client-side with PASETO v4 local encryption. Your shell history is packed with API keys and credentials — treating it as public data would be a leak waiting to happen. The hosted server is a server of encrypted blobs, and that's the point.
It's also fast. Sync happened once per hour by default, but with release 18.20.0 Atuin rebuilt it around "packfiles" — bundling records, compressing them with zstd, then encrypting — which the team says made Atuin Hub sync 32× faster and self-hosted sync 16× faster.
Getting started
Install is one line:
curl --proto '=https' --tlsv1.2 -LsSf https://setup.atuin.sh | sh
Then run atuin setup to import your existing shell history and register a sync account. It takes about two minutes. At lower versions you'd wire the shell hook yourself; as of 18.18.0, atuin init bash even auto-loads bash-preexec for you.
The shift in mindset is subtle: instead of coaxing one right answer out of Ctrl+R, you treat your history as an index over everything you've typed — filter it by what failed, what ran where, what took too long. Once you can do that, shell history stops being a chore you ignore and starts being the record of your work you can finally grep. Use atuin search --exit 0 <command> once, and you'll never scroll a plain-text history file again.