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

/ K JMove through results
Move cursor in query
Alt+0–9Jump to result #N
EnterExecute selected command
TabReturn to shell for editing
Ctrl+OOpen command inspector
Ctrl+XDelete selected entry
Ctrl+C / Ctrl+DCancel search
Ctrl+RCycle filter mode
Ctrl+SCycle search mode
EscEnter vim-normal mode
IReturn to insert mode
🔍

Filter Modes (Ctrl+R)

ModeSearches
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)

ModeBehavior
prefix Matches commands starting with your query (default)
fulltext Matches anywhere in the command string
fuzzy Matches letters in any order
📜

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
atuin history prune --dry-runPreview what prune removes
atuin history pruneRemove filtered entries
atuin history dedupRemove exact duplicates
☁️

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 deletePermanently delete account
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
💡

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
atuin stats "7 days ago"

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

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

sync_addressServer URL (default: api.atuin.sh)
auto_synctrue / false
sync_frequency"10m", "1h", "0" (every cmd)
network_timeoutSeconds (default: 30)
theme"default" · "autumn" · "marine"
keymap_mode"emacs" · "vim-insert"
filter_modeDefault filter mode on open
search_modeDefault search mode on open
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
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"