Atuin Cheatsheet

Magical shell history: SQLite, encrypted sync & fuzzy search

v18+
🔍
⚡

Install & Setup

curl --proto '=https' --tlsv1.2 -LsSf \
  https://setup.atuin.sh | sh
# bash
eval "$(atuin init bash)"

# zsh
eval "$(atuin init zsh)"

# fish
atuin init fish | source
atuin register -u <user> -e <email>Create sync account
atuin import autoImport existing history
atuin syncInitial sync
⌨️

Keyboard Shortcuts

↑ ↓ / Ctrl+P Ctrl+NMove through results
← →Move cursor in query
Alt+1–9Jump to result #N
EnterExecute selected command
TabReturn to shell for editing
Ctrl+OOpen command inspector
Ctrl+YCopy selected command
Ctrl+A dDelete selected entry
Ctrl+A DDelete all entries matching selected command
Ctrl+O Ctrl+DDelete entry (preview in inspector first)
Ctrl+C / Ctrl+D / EscCancel search
Ctrl+RCycle filter mode
Ctrl+SCycle search mode
EscEnter vim-normal mode
j kMove through results (normal)
iReturn to insert mode
🔍

Filter Modes (Ctrl+R)

ModeSearches
global All history: every machine, session & directory (default)
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)

ModeBehavior
prefix Matches commands starting with your query
fulltext Matches anywhere in the command string
fuzzy fzf-style: letters in order, gaps allowed; supports 'exact ^start end$ !not (default)
daemon-fuzzy Fuzzy with frecency ranking via the daemon (needs [daemon] enabled)
📜

History Commands

atuin history listList all history
atuin history list --cmd-onlyList 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
--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
--humanHuman-readable timestamps
atuin search --delete <query>Delete matching entries (run without --delete first to preview)
atuin search --delete-it-allDelete ALL local history (irreversible)
atuin history prune --dry-runPreview what prune removes
atuin history pruneRemove entries matching history_filter / cwd_filter
atuin history dedup --dry-run --before <date> --dupkeep <n>Preview duplicate removal
atuin history dedup --before <date> --dupkeep <n>Remove duplicates (same command, cwd & host), keep newest n
atuin store verifyCheck all local records decrypt with current key
atuin store purgeDelete local records that can't be decrypted
☁️

Sync & Account

atuin syncSync with server (bidirectional)
atuin sync --forceForce full re-sync
atuin register -u <u> -e <e>Create account
atuin login -u <user>Login to sync server
atuin logoutLogout
atuin account deleteDelete account & all synced data (local history kept)
atuin keyShow encryption key (keep safe!)
atuin import autoAuto-detect shell & import
atuin import bashImport from bash history
atuin import zshImport from zsh history
atuin import fishImport from fish history
atuin statsShow usage statistics
atuin stats allShow all-time usage statistics
atuin doctorDiagnose issues & dump system info
atuin-server startRun self-hosted server (separate atuin-server binary)
💡

Useful Examples

# 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 (also: today, month, year)
atuin stats week

# Stats for a single day (24h from that point)
atuin stats last friday

# Import from custom history file
HISTFILE=~/.zsh_custom_history atuin import zsh
Relative"2 hours ago", "last week"
Natural"yesterday 3pm", "last monday"
Absolute"2024-01-15"
⚙️

Config Reference ~/.config/atuin/config.toml

sync_addressServer URL (default: api.atuin.sh)
auto_synctrue / false
sync_frequency"5m" (default), "1h", "0" (every cmd)
network_timeoutDuration (default: "30s")
update_checkCheck for new releases (default: true)
[theme] name"default" · "autumn" · "marine"
keymap_mode"emacs" · "vim-normal" · "vim-insert" · "auto"
filter_modeDefault filter mode on open ("global")
search_modeDefault search mode on open ("fuzzy")
[ui] columnsColumns shown in TUI list
history_filterRegex list: skip matching cmds
cwd_filterRegex list: skip matching dirs
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
keymap_mode     = "vim-insert"
filter_mode     = "global"
search_mode     = "fuzzy"

# Exclude commands from history (unanchored regex)
# A leading space already skips one command
history_filter = [
  "^sudo -i$",
  "^export .*TOKEN=",
]

# Exclude directories from recording
cwd_filter = [
  "^/tmp/",
  "^/private/",
]

# Updates (checks at most once per hour)
update_check    = true

# Tables go after top-level keys
[theme]
name = "default"

[ui]
# Columns shown in search TUI
columns = ["time", "duration", "exit", "command"]