Beyond the flat history file
Default zsh history is a text file. atuin upgrades it to a SQLite-backed store with: timestamped entries, exit code, directory, hostname, optional encrypted sync across machines, and a fuzzy interactive search.
Install
brew install atuin
atuin import auto # imports your existing zsh history
echo 'eval "$(atuin init zsh)"' >> ~/.zshrc
exec zshThe init line replaces Ctrl+R with atuin's UI. Your old zsh history stays — atuin reads it once on import.
What you get
- Filter by directory: "only commands run in this project."
- Filter by host: "only commands run on the office Mac."
- Filter by exit code: skip every command that failed.
- Time-of-day stats: most-used commands by hour.
- Optional sync: end-to-end encrypted, hosted by you or by the Atuin team.
Sync
atuin register -u me -e me@example.com
atuin login -u me
atuin sync # push + pull
atuin sync -f # force full syncEncrypted with a passphrase you set; the server never sees plaintext history. Self-host if you prefer — the server is also open source.
History is sensitive data
Command history can contain paths, hostnames, arguments, and accidentally pasted secrets. Review filters, retention, encryption-key recovery, and sync policy before importing or uploading it. Also decide whether fzf, Atuin, or the shell owns Ctrl+R so integrations do not silently replace one another.
Define exclusions before synchronization
Decide how tokens, passwords, and one-time authorization URLs are kept out before sharing history across machines. Prefer stdin or a credential store over secret command-line arguments.
Better search expands the retained record
Directory and host metadata improve recall while recording project names, server names, and work times. Set retention, deletion, and backup policy for this productivity data.
Ctrl+R needs one owner
fzf and Atuin can both bind history search. Choose an owner explicitly and inspect initialization order when the wrong interface appears.