⚡
Install & Setup
Quick install
curl --proto '=https' --tlsv1.2 -LsSf \ https://setup.atuin.sh | sh
Shell init (add to rc file)
# bash eval "$(atuin init bash)" # zsh eval "$(atuin init zsh)" # fish atuin init fish | source
First-time setup
| atuin register -u <user> -e <email> | Create sync account |
| atuin import auto | Import existing history |
| atuin sync | Initial sync |
⌨️
Keyboard Shortcuts
Navigation
| ↑ ↓ / K J | Move through results |
| ← → | Move cursor in query |
| Alt+0–9 | Jump to result #N |
Actions
| Enter | Execute selected command |
| Tab | Return to shell for editing |
| Ctrl+O | Open command inspector |
| Ctrl+X | Delete selected entry |
| Ctrl+C / Ctrl+D | Cancel search |
Mode switching
| Ctrl+R | Cycle filter mode |
| Ctrl+S | Cycle search mode |
Vim mode
| Esc | Enter vim-normal mode |
| I | Return to insert mode |
🔍
Filter Modes (Ctrl+R)
| Mode | Searches |
|---|---|
| global | All history — every machine, session & directory |
| host | This machine only |
| session | Current shell session only |
| session-preload / SESSION+ | Current session + global history from before session start |
| directory | Current working directory only |
| workspace | Entire git repo tree (auto in git repos) |
✦
Search Modes (Ctrl+S)
| Mode | Behavior |
|---|---|
| prefix | Matches commands starting with your query (default) |
| fulltext | Matches anywhere in the command string |
| fuzzy | Matches letters in any order |
📜
History Commands
Browse & search
| atuin history list | List all history |
| atuin history list --cmd-only | List commands only (no metadata) |
| atuin search <query> | Non-interactive search |
| atuin search -i <query> | Interactive TUI search |
| atuin search --human <query> | Search with human-readable timestamps |
Search filters
--cwd <dir> | Filter by directory |
--exit <code> | Filter by exit code (0 = success) |
--after <time> | After a point in time |
--before <time> | Before a point in time |
--limit <n> | Limit result count |
--human | Human-readable timestamps |
Delete & prune
| atuin search --delete <query> | Delete matching entries |
| atuin history prune --dry-run | Preview what prune removes |
| atuin history prune | Remove filtered entries |
| atuin history dedup | Remove exact duplicates |
☁️
Sync & Account
Sync
| atuin sync | Sync with server (bidirectional) |
| atuin sync --force | Force full re-sync |
Account
| atuin register -u <u> -e <e> | Create account |
| atuin login -u <user> | Login to sync server |
| atuin logout | Logout |
| atuin account delete | Permanently delete account |
Key management
| atuin key | Show encryption key (keep safe!) |
Import
| atuin import auto | Auto-detect shell & import |
| atuin import bash | Import from bash history |
| atuin import zsh | Import from zsh history |
| atuin import fish | Import from fish history |
Other
| atuin stats | Show usage statistics |
| atuin stats all | Show all-time usage statistics |
| atuin doctor | Diagnose issues & dump system info |
| atuin server start | Run self-hosted server |
💡
Useful Examples
Practical queries
# All failed commands in current dir atuin search --exit 1 --cwd . # Successful git commits after yesterday 3pm atuin search --exit 0 --after "yesterday 3pm" git commit # Commands run in the last hour atuin search --after "1 hour ago" # Find and delete command-not-found entries atuin search --delete --exit 127 # Preview pruning without deleting atuin history prune --dry-run # Stats for last 7 days atuin stats "7 days ago" # Import from custom history file HISTFILE=~/.zsh_custom_history atuin import zsh
Supported time formats
Relative
"2 hours ago", "last week"Natural
"yesterday 3pm", "Monday"Absolute
"2024-01-15"
⚙️
Config Reference ~/.config/atuin/config.toml
Sync
sync_address | Server URL (default: api.atuin.sh) |
auto_sync | true / false |
sync_frequency | "10m", "1h", "0" (every cmd) |
network_timeout | Seconds (default: 30) |
UI & Keymaps
theme | "default" · "autumn" · "marine" |
keymap_mode | "emacs" · "vim-insert" |
filter_mode | Default filter mode on open |
search_mode | Default search mode on open |
columns | Columns shown in TUI list |
Filtering
history_filter | Regex list — skip matching cmds |
cwd_filter | Regex list — skip matching dirs |
Stored metadata per command
commandexit_codeduration
cwdhostnamesession
timestampusershell
📄
Example config.toml
## ~/.config/atuin/config.toml # Sync auto_sync = true sync_frequency = "5m" sync_address = "https://api.atuin.sh" # UI theme = "default" keymap_mode = "vim-insert" filter_mode = "global" search_mode = "fuzzy" # Columns shown in search TUI columns = ["time", "duration", "exit_code", "command"] # Exclude commands from history history_filter = [ "^sudo -i$", "^ .*", # leading space = private ] # Exclude directories from recording cwd_filter = [ "/tmp/.*", "/private/.*", ] # Updates check_update = true update_check_interval = "1d"
