Atuin
Replaces your shell history with a SQLite database, giving you full-text fuzzy search, statistics, and optional encrypted sync across machines.
Atuin replaces your shell's default history mechanism with a SQLite database stored locally on disk. Every command you run is recorded along with its exit code, working directory, hostname, and duration — making your history searchable, filterable, and meaningful in ways that a plain text file never could be.
Its killer feature is optional end-to-end encrypted sync: your full history, across every machine you use, available everywhere, with a self-hostable server if you prefer not to use the managed service.
Features
- Full-text fuzzy search — press
Ctrl+rto open an interactive search UI that filters your history in real time across all recorded fields - Rich metadata — every entry records the command, exit code, working directory, session, hostname, and execution duration
- Context-aware filtering — filter history by the current directory, host, or session with a keystroke so you only see relevant commands
- Statistics —
atuin statsshows your most-used commands, busiest hours, and other patterns across your history - End-to-end encrypted sync — sync your history across machines via the managed Atuin server or a self-hosted instance; the server never sees your plaintext history
- Import from existing history — imports your existing
~/.bash_history,~/.zsh_history, or fish history on first setup so you lose nothing - Cross-shell — supports bash, zsh, fish, nushell, and xonsh
- Daemon mode — an optional background daemon for faster record writes and real-time sync
Installation
# macOS / Linux (recommended install script)
curl --proto '=https' --tlsv1.2 -LsSf https://setup.atuin.sh | sh
# via cargo
cargo install atuin
# Arch Linux
pacman -S atuin
# Debian / Ubuntu
apt install atuin
# Fedora
dnf install atuin
# macOS
brew install atuin
# Nix
nix-env -iA nixpkgs.atuinSetup
After installing, add the shell integration to your config file:
# bash (~/.bashrc)
eval "$(atuin init bash)"
# zsh (~/.zshrc)
eval "$(atuin init zsh)"
# fish (~/.config/fish/config.fish)
atuin init fish | source
# nushell (~/.config/nushell/config.nu)
atuin init nu | save -f ~/.atuin.nu
On first run, Atuin will automatically import your existing shell history.
Usage
# Open the interactive search UI (also triggered by Ctrl+r)
atuin search
# Search for a specific term non-interactively
atuin search "cargo build"
# Show only commands run in the current directory
atuin search --cwd .
# Show only commands that succeeded (exit code 0)
atuin search --exit 0
# Show only commands that failed
atuin search --exit 1
# View usage statistics
atuin stats
# Show history for a specific command
atuin stats cargoInteractive search
Pressing Ctrl+r opens Atuin's full-screen search UI. While it's open:
| Key | Action |
|---|---|
| Type | Filter commands in real time |
Ctrl+d | Filter to current directory only |
Ctrl+u | Filter to current session only |
Ctrl+h | Filter to current host only |
Enter | Execute the selected command |
Tab | Paste the selected command without executing |
Esc | Close without selecting |
Sync
Create a free account to sync your history across machines:
# Register (uses the managed Atuin server by default)
atuin register -u <username> -e <email> -p <password>
# Log in on another machine
atuin login -u <username> -p <password>
# Sync manually
atuin sync
# Enable automatic sync (runs in the background)
atuin daemon
All data is encrypted with your key before leaving your machine. The server stores only ciphertext and cannot read your history.
Self-hosting
If you prefer full control, you can run your own Atuin server:
# Using Docker
docker run -d \
--name atuin-server \
-p 8888:8888 \
-v ~/.atuin/server:/config \
ghcr.io/atuinsh/atuin:latest server start
# Point your client at it
atuin login --server https://your-server.example.com ...Configuration
Atuin's config lives at ~/.config/atuin/config.toml:
## How to filter history (global, host, session, directory)
filter_mode = "global"
## Filter mode used when searching interactively
filter_mode_shell_up_key_binding = "directory"
## Show a preview of the selected command
show_preview = true
## Maximum number of results shown in the UI
max_preview_height = 4
## Style: "auto", "full", "compact"
style = "auto"
## Whether to sync automatically on shell start
auto_sync = true
sync_frequency = "10m"