Atuin — Magical Shell History with Sync and Search
Atuin replaces your existing shell history with a SQLite database, recording additional context (cwd, exit code, duration, hostname). Sync history across machines end-to-end encrypted. Interactive fuzzy search with rich filtering.
What it is
Atuin replaces your existing shell history with a SQLite database, recording additional context like the working directory, exit code, session ID, and command duration for every command. It provides full-text search, cross-machine sync with end-to-end encryption, and context-aware suggestions. Atuin supports bash, zsh, and fish shells.
Developers and sysadmins who rely heavily on shell history to recall commands across sessions and machines benefit most. The default shell history (usually a flat text file with a limited line count) loses commands frequently and provides no search beyond simple prefix matching.
How it saves time or tokens
Atuin's full-text search finds commands by any substring, not just prefix. The SQLite backend stores unlimited history with rich metadata, so you never lose a command. Cross-machine sync means the command you ran on your work laptop is available on your home machine. Context-aware filtering shows commands relevant to your current directory, reducing the noise when searching through thousands of entries.
How to use
- Install Atuin:
# macOS
brew install atuin
# Linux
curl --proto '=https' --tlsv1.2 -sSf https://setup.atuin.sh | sh
- Initialize and configure for your shell:
atuin init zsh >> ~/.zshrc
source ~/.zshrc
- Press
Ctrl-Rto open Atuin's interactive search. Type any part of a previous command to find it instantly.
Example
# Search history for commands containing 'docker'
atuin search docker
# Filter by directory
atuin search --cwd /home/user/project docker
# Filter by exit code (find failed commands)
atuin search --exit 1
# Sync history across machines
atuin register -u myuser -e email@example.com -p mypassword
atuin sync
# Import existing shell history
atuin import auto
Related on TokRepo
- AI Coding Tools -- Developer productivity tools
- Featured Workflows -- Top-rated developer tools on TokRepo
Common pitfalls
- Atuin replaces the Ctrl-R binding. If you have other tools using Ctrl-R (fzf, McFly), they will conflict. Disable or rebind the other tool's keybinding.
- Cross-machine sync requires creating an account on Atuin's server (or self-hosting). History is end-to-end encrypted, but if you prefer no external server, use Atuin in local-only mode.
- Importing existing history works best when done once at setup. Running import multiple times can create duplicate entries.
Frequently Asked Questions
Yes. Atuin is open source and free to use. The sync server is also open source and can be self-hosted. The hosted sync service is free for individual use.
Yes. Atuin uses end-to-end encryption for synced history. Your commands are encrypted on your machine before being sent to the sync server. The server never sees your plaintext history.
Yes. Atuin supports bash, zsh, and fish. Run 'atuin init bash >> ~/.bashrc' to configure it for bash. The Ctrl-R search interface works the same across all supported shells.
Atuin stores history in a local SQLite database with no practical limit. Unlike default shell history which caps at a few thousand lines, Atuin keeps everything. The database remains fast even with hundreds of thousands of entries.
Yes. The Atuin sync server is open source. Deploy it with Docker and point your Atuin clients to your server URL. This gives you full control over where your encrypted history is stored.
Citations (3)
- Atuin GitHub Repository— Atuin replaces shell history with a SQLite database
- Atuin Official Website— End-to-end encrypted cross-machine sync
- Atuin Documentation— Supports bash, zsh, and fish shells
Related on TokRepo
Discussion
Related Assets
Conda — Cross-Platform Package and Environment Manager
Install, update, and manage packages and isolated environments for Python, R, C/C++, and hundreds of other languages from a single tool.
Sphinx — Python Documentation Generator
Generate professional documentation from reStructuredText and Markdown with cross-references, API autodoc, and multiple output formats.
Neutralinojs — Lightweight Cross-Platform Desktop Apps
Build desktop applications with HTML, CSS, and JavaScript using a tiny native runtime instead of bundling Chromium.