Magical shell history manager with SQLite storage, encrypted sync, and full-text search across machines and sessions.
| Command | Description |
|---|
curl --proto '=https' --tlsv1.2 -LsSf https://setup.atuin.sh | sh | Install via official script |
brew install atuin | Install on macOS with Homebrew |
cargo install atuin | Install from crates.io |
pacman -S atuin | Install on Arch Linux |
apt install atuin | Install on Debian/Ubuntu (if available) |
dnf install atuin | Install on Fedora |
nix-env -i atuin | Install on NixOS |
scoop install atuin | Install on Windows with Scoop |
atuin --version | Show installed version |
| Command | Description |
|---|
atuin init bash >> ~/.bashrc | Initialize for Bash |
atuin init zsh >> ~/.zshrc | Initialize for Zsh |
atuin init fish >> ~/.config/fish/config.fish | Initialize for Fish |
atuin init nushell | Show Nushell init commands |
# Bash — add to ~/.bashrc
eval "$(atuin init bash)"
# Zsh — add to ~/.zshrc
eval "$(atuin init zsh)"
# Fish — add to ~/.config/fish/config.fish
atuin init fish | source
# Zsh with disable-up-arrow (use Ctrl+R only)
eval "$(atuin init zsh --disable-up-arrow)"
| Command | Description |
|---|
Ctrl + R | Open interactive history search |
Type search query after Ctrl + R | Filter history interactively |
Enter | Execute selected command |
Tab | Insert command without executing |
Ctrl + R again | Cycle through search modes |
↑ / ↓ | Navigate search results |
Escape | Cancel search |
Ctrl + D | Delete selected entry from history |
Alt + 1-4 | Switch filter mode (global/host/session/dir) |
| Command | Description |
|---|
atuin history list | Show recent command history |
atuin history list --cmd-only | Show commands only (no metadata) |
atuin history list --format "{time} {command}" | Custom output format |
atuin history list --reverse | Show oldest first |
atuin history list -n 50 | Show last 50 commands |
atuin history count | Show total history count |
atuin history last | Show most recent command |
Atuin cycles through 4 search modes with Ctrl+R:
1. Fuzzy — Matches characters in any order (like fzf)
2. Prefix — Matches from the start of the command
3. Fulltext — Matches exact substrings anywhere
4. Skim — Skim-style fuzzy matching
Switch modes during search with Ctrl+R, or set a default
in the config file.
| Command | Description |
|---|
atuin search query | Search history from command line |
atuin search "git commit" | Search for specific command |
atuin search --cwd | Search history for current directory only |
atuin search --session | Search history for current session only |
atuin search --global | Search all history across machines |
atuin search --interactive | Open interactive UI |
| Command | Description |
|---|
atuin search --after "2024-01-01" | Search after specific date |
atuin search --before "yesterday" | Search before specific time |
atuin search --after "1 hour ago" | Search within last hour |
atuin search --after "3 days ago" | Search within last 3 days |
atuin search --after "last week" | Search within last week |
atuin search --before "2024-06-01" --after "2024-01-01" | Date range |
| Command | Description |
|---|
atuin search --exit 0 | Search only successful commands |
atuin search --exit 1 | Search only failed commands |
atuin search --exit 127 | Search “command not found” errors |
atuin search --limit 50 | Limit number of results |
| Command | Description |
|---|
atuin search --cwd /path/to/dir | Filter by specific working directory |
atuin search --hostname myserver | Filter by hostname |
atuin search --session SESSION_ID | Filter by session ID |
atuin search --duration ">5s" | Filter by execution duration |
atuin search --duration "<100ms" | Find fast commands |
| Command | Description |
|---|
atuin search --format "{time} {command}" | Show time and command |
atuin search --format "{duration} {command}" | Show duration and command |
atuin search --format "{host} {command}" | Show hostname and command |
atuin search --format "{user} {directory} {command}" | Full context |
# Find all docker commands that failed
atuin search docker --exit 1
# Find git operations from last week
atuin search git --after "1 week ago"
# Find long-running commands (>30 seconds)
atuin search --duration ">30s"
# Find commands run in a specific project
atuin search --cwd ~/projects/myapp
# Find commands from your work laptop
atuin search --hostname work-mbp
| Command | Description |
|---|
atuin register -u username -e email -p password | Create sync account |
atuin login -u username -p password | Login to sync account |
atuin login -u username -p password -k KEY | Login with encryption key |
atuin logout | Logout from sync account |
atuin account | Show account status |
atuin account delete | Delete sync account |
atuin key | Show encryption key (save this!) |
atuin status | Show sync status |
| Command | Description |
|---|
atuin sync | Sync history with server |
atuin sync -f | Force full sync |
atuin sync --force | Force re-upload all history |
| All data is end-to-end encrypted | Server never sees plaintext history |
# First-time setup on machine 1
atuin register -u myname -e me@example.com -p mypassword
atuin key # SAVE THIS KEY — you'll need it for other machines
atuin sync
# Setup on machine 2
atuin login -u myname -p mypassword -k YOUR_ENCRYPTION_KEY
atuin sync
# Your encryption key looks like:
# abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890
# Without the key, the server cannot decrypt your history.
# If you lose the key, your synced history is unrecoverable.
# Run your own Atuin sync server
docker run -d \
--name atuin-server \
-p 8888:8888 \
-v atuin-data:/config \
ghcr.io/atuinsh/atuin:latest \
server start
# Point your client to the self-hosted server
# In ~/.config/atuin/config.toml:
# sync_address = "http://your-server:8888"
| Command | Description |
|---|
atuin import auto | Auto-detect and import shell history |
atuin import bash | Import from Bash history |
atuin import zsh | Import from Zsh history |
atuin import zsh-hist-db | Import from Zsh hist-db plugin |
atuin import fish | Import from Fish history |
atuin import resh | Import from RESH history |
atuin import nu | Import from Nushell history |
atuin import nu-hist-db | Import from Nushell SQLite history |
# Auto-detect your shell and import
atuin import auto
# Import Zsh history specifically
atuin import zsh
# Check how many entries were imported
atuin history count
# Verify import worked
atuin search --limit 5
| Command | Description |
|---|
atuin stats | Show history statistics |
atuin stats --count 20 | Show top 20 most-used commands |
atuin stats --period day | Stats for today |
atuin stats --period week | Stats for this week |
atuin stats --period month | Stats for this month |
atuin stats --period all | All-time statistics |
atuin history count | Total history entries |
$ atuin stats --count 10
┌─────────┬─────────────────┬───────┐
│ Rank │ Command │ Count │
├─────────┼─────────────────┼───────┤
│ 1 │ git status │ 1847 │
│ 2 │ ls │ 1523 │
│ 3 │ cd │ 1201 │
│ 4 │ git diff │ 987 │
│ 5 │ vim │ 842 │
│ 6 │ git add │ 756 │
│ 7 │ docker ps │ 689 │
│ 8 │ npm run │ 534 │
│ 9 │ git commit │ 498 │
│ 10 │ make │ 423 │
└─────────┴─────────────────┴───────┘
Total commands: 45,231
Unique commands: 8,432
| Command | Description |
|---|
~/.config/atuin/config.toml | Main configuration file |
atuin default-config | Print default config |
| Command | Description |
|---|
search_mode = "fuzzy" | Set fuzzy search mode |
search_mode = "prefix" | Set prefix search mode |
search_mode = "fulltext" | Set full-text search mode |
search_mode = "skim" | Set skim fuzzy search mode |
filter_mode = "global" | Search all history by default |
filter_mode = "host" | Search current host by default |
filter_mode = "session" | Search current session by default |
filter_mode = "directory" | Search current directory by default |
filter_mode_shell_up_key_binding = "session" | Up arrow searches current session |
| Command | Description |
|---|
style = "compact" | Use compact UI style |
style = "full" | Use full UI style |
style = "auto" | Auto-detect based on terminal |
inline_height = 40 | Set inline search height |
show_preview = true | Show command preview panel |
show_help = true | Show keybinding help |
show_tabs = true | Show filter mode tabs |
max_preview_height = 4 | Max lines for preview |
# ~/.config/atuin/config.toml
## Database Settings
db_path = "~/.local/share/atuin/history.db"
## Search Settings
search_mode = "fuzzy"
filter_mode = "global"
filter_mode_shell_up_key_binding = "host"
## UI Settings
style = "auto"
inline_height = 40
show_preview = true
show_help = true
show_tabs = true
max_preview_height = 4
invert = false
## History Settings
update_check = true
sync_frequency = "5m"
sync_address = "https://api.atuin.sh"
## Key bindings (default)
# Ctrl+R = search
# Up arrow = search (unless disabled)
# Tab = accept without running
# Enter = accept and run
## Secrets filter — don't record commands with secrets
history_filter = [
"^export.*TOKEN",
"^export.*SECRET",
"^export.*PASSWORD",
"^export.*KEY",
".*AWS_SECRET.*",
]
## Ignore specific commands
history_filter = [
"^ls$",
"^cd$",
"^pwd$",
"^exit$",
"^clear$",
]
## Sync settings
sync_frequency = "5m"
# sync_address = "https://api.atuin.sh" # Default server
# sync_address = "http://localhost:8888" # Self-hosted
| Key | Description |
|---|
Ctrl + R | Open search / cycle search mode |
↑ / ↓ | Navigate results |
Enter | Execute selected command |
Tab | Insert command without executing |
Escape | Cancel search |
Ctrl + D | Delete selected history entry |
Alt + 1 | Switch to global filter |
Alt + 2 | Switch to host filter |
Alt + 3 | Switch to session filter |
Alt + 4 | Switch to directory filter |
Ctrl + U | Clear search query |
Ctrl + W | Delete word backward |
| Command | Description |
|---|
~/.local/share/atuin/history.db | Default database location |
| Database uses SQLite format | Can query with any SQLite tool |
sqlite3 ~/.local/share/atuin/history.db ".tables" | List database tables |
# Open the database directly with SQLite
sqlite3 ~/.local/share/atuin/history.db
# Count total entries
sqlite3 ~/.local/share/atuin/history.db \
"SELECT COUNT(*) FROM history;"
# Find longest-running commands
sqlite3 ~/.local/share/atuin/history.db \
"SELECT command, duration FROM history
ORDER BY duration DESC LIMIT 10;"
# Commands by directory
sqlite3 ~/.local/share/atuin/history.db \
"SELECT cwd, COUNT(*) as cnt FROM history
GROUP BY cwd ORDER BY cnt DESC LIMIT 10;"
-
Import your existing history first — Run atuin import auto immediately after installation to start with a rich history database rather than from scratch.
-
Use fuzzy search mode — Set search_mode = "fuzzy" for the most flexible matching. You can always cycle to other modes with Ctrl+R during a search.
-
Filter secrets from history — Add patterns to history_filter in config to prevent recording commands containing tokens, passwords, and API keys.
-
Save your encryption key — Run atuin key and store the key in a password manager. If you lose it, synced history from other machines is permanently unrecoverable.
-
Set up sync between machines — Encrypted sync is Atuin’s killer feature. Register an account and configure all your machines to have unified history everywhere.
-
Use directory-scoped search — Press Alt+4 during search to filter to commands you ran in the current directory — perfect for project-specific workflows.
-
Customize the up-arrow — Set filter_mode_shell_up_key_binding = "host" to make the up arrow show only commands from the current machine, while Ctrl+R searches globally.
-
Set up the self-hosted server — If you handle sensitive data, run your own Atuin server with Docker for complete control over your synced history.
-
Review stats regularly — Run atuin stats periodically to understand your patterns and identify commands you could alias for efficiency.
-
Use compact style for small terminals — Set style = "compact" if you work in split-pane terminals with limited vertical space.