atuin role — shell history sync
A new opt-in role. atuin replaces shell history with a SQLite DB, a fuzzy Ctrl-R, and end-to-end-encrypted sync across machines. It's a starship-shaped role (install a Rust binary + shell init + versions.d), opt-in via roles because it rebinds Ctrl-R / up-arrow and not everyone wants that.
The role
- Install from atuin's GitHub releases (the
yqpattern) — or the officialsetup.atuin.shinstaller;brewon macOS (ansible_facts.os_family == 'Darwin'). Registeratuin --versioninversions.dso it auto-updates. - Shell init via
~/.profile.d/atuin.sh(eval "$(atuin init bash)"/atuin init zsh) — bash and zsh from the start, keyed onunix_shellnow that both are first-class. Source it late: atuin rebinds keys, so order it after starship and other rc setup. - Config (
~/.config/atuin/config.toml) by keys (settings, not files):search_mode,filter_mode,style,sync_frequency,history_filter.
Sync (the multi-machine win)
Encrypted history sync means your shell history follows every machine the fleet provisions — something plain .bash_history can't do.
- Secrets, not vars: login needs a username/password and the encryption key — route them through the
bitwardenrole / ansible-vault, never plain vars. The role fetches the key from Bitwarden at runtime, runsatuin login, and restores the key. - Server is infra, not dotfiles: self-host the open-source sync server in the cluster (helm-charts) or use the hosted service. The role only configures the client (
sync_address) and logs in. - Import once:
atuin import autoseeds from.bash_history— guard it so a re-apply doesn't re-import (run only when the DB is fresh).
Synergy
history_filter (regex exclusions) keeps secrets out of recorded history — partly closing the Bitwarden roadmap item "make sure printed passwords are not stored in the history". Ship a sensible default filter.
Open questions
- Default sync on (needs the Bitwarden-backed key) or ship local-only with sync opt-in per host?
- fish init parity, if fish ever becomes a supported shell.