Your shell history is a flat text file with no timestamps worth trusting. Atuin turns it into a real database you can search by directory, exit code, duration, and date.
Atuin records every command you run into a local SQLite database — full command, working directory, hostname, exit code, duration, timestamp — and replaces Ctrl-R with a fast interactive search over all of it. That unlocks questions your shell history can’t answer: “what was that rsync I ran in /srv last week?” or “which variant of this command actually worked?” History can be end-to-end encrypted and synced between machines (or kept entirely local — it works fine with sync disabled). The search UI shows context per entry, and the same filters work in plain non-interactive mode, which makes atuin a legitimate scripting tool, not just a pretty prompt.
install
# macOS
brew install atuin
# Arch sudo pacman -S atuin # Or the install script curl --proto '=https' --tlsv1.2 -LsSf https://setup.atuin.sh | sh # Then hook it into your shell (adjust for your shell) echo 'eval "$(atuin init bash)"' >> ~/.bashrc # or zsh
examples
# Interactive search over all history (this replaces Ctrl-R)
atuin search -i
# Everything containing rsync that ran in /srv
atuin search rsync --cwd /srv
# Commands from this directory that FAILED, newest first
atuin search --exit 1 --cwd . --limit 10
# Everything you ran since yesterday at 3pm
atuin search --after "yesterday 3pm"
# Find the exact incantation and re-run it via eval
eval "$(atuin search --limit 1 'docker compose up')"
# Readable report: time, duration, directory, command
atuin search --format "{time} [{duration}] {directory}$ {command}"
pro tip
--exclude-exit 0 inverts your history: show only commands that FAILED. When you’re debugging “what did I try last time,” that one filter is worth the entire install.
honest limits
Atuin only knows about commands run after you installed it — there’s a one-time import for existing history, but timestamps there are often unreliable. Its Ctrl-R takes over your shell’s, so old muscle memory needs one re-map. And if you enable sync, you’re trusting atuin’s key management — read the docs before pointing it at your infra; with sync off, none of that applies.