C.W.K.
Stream
Lesson 07 of 08 · published

Atuin: Shell History on Steroids

~10 min · atuin, history, sync

Level 0Window Tourist
0 XP0/95 lessons0/14 achievements
0/100 XP to next level100 XP to go0% complete

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 zsh

The 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 sync

Encrypted with a passphrase you set; the server never sees plaintext history. Self-host if you prefer — the server is also open source.

Pippa fleet note

Pippa's fleet uses Atuin sync between the office Mac (canonical) and the peer Macs. The history flows through the same Tailscale mesh as the code repos. One coherent shell experience across nine machines.

Code

Quick atuin tour·bash
brew install atuin
atuin import auto
echo 'eval "$(atuin init zsh)"' >> ~/.zshrc
exec zsh
# Press Ctrl+R
# Filter by dir / host / exit code from inside the picker

External links

Exercise

Install atuin. Run atuin import auto. Add the eval line. Open a new terminal, press Ctrl+R, and filter by directory using the toggle keys shown in the help. Spot how much cleaner the history feels.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.