TL;DR — Quick Summary
Atuin replaces your shell history with a SQLite database, adds full-text search, cross-machine sync, and usage statistics. Works with bash, zsh, and fish.
Atuin transforms your shell history from a simple text file into a powerful, searchable database with cross-machine sync. Every command is stored with context: working directory, exit code, duration, hostname, and session ID — making it easy to find exactly what you ran, where, and when.
Installation
# Official installer (recommended)
bash <(curl --proto '=https' --tlsv1.2 -sSf https://setup.atuin.sh)
# macOS
brew install atuin
# Arch Linux
sudo pacman -S atuin
# Cargo
cargo install atuin
# Nix
nix-env -i atuin
Shell Integration
# 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
Import Existing History
# Auto-detect and import
atuin import auto
# Import from specific shell
atuin import bash
atuin import zsh
atuin import fish
Enhanced Search (Ctrl+R)
Press Ctrl+R to open Atuin’s search interface:
- Type to search: Full-text fuzzy search across all commands
- Arrow keys: Navigate results
- Enter: Execute selected command
- Tab: Preview command without executing
- Ctrl+R again: Toggle search modes (prefix, fulltext, fuzzy)
Search Filters
# Search in Atuin's query syntax
atuin search "docker" # Commands containing "docker"
atuin search --cwd /project # Commands from specific directory
atuin search --exit 0 # Only successful commands
atuin search --after "2026-03" # Commands from March 2026
atuin search --host laptop # Commands from specific machine
Sync Across Machines
# Register (first time only)
atuin register -u username -e email@example.com -p password
# Login on additional machines
atuin login -u username -p password
# Sync
atuin sync
# Key: your encryption key (save this!)
atuin key
All history is encrypted end-to-end — the sync server never sees your commands.
Statistics
# Usage statistics
atuin stats
# Output example:
# Total commands: 45,231
# Unique commands: 3,421
# Most used: git (12%), cd (8%), docker (6%)
# Average duration: 2.3s
# Session count: 834
Configuration
Config file: ~/.config/atuin/config.toml
[settings]
# Search mode: prefix, fulltext, fuzzy, skim
search_mode = "fuzzy"
# Filter mode: global, host, session, directory
filter_mode = "global"
# UI style: compact, full
style = "compact"
# Sync settings
auto_sync = true
sync_frequency = "5m"
# Don't record sensitive commands
history_filter = [
"^export.*KEY",
"^export.*SECRET",
"^export.*PASSWORD",
]
Comparison
| Feature | Atuin | fzf + history | hstr | McFly |
|---|---|---|---|---|
| Database | SQLite | Text file | Text file | SQLite |
| Cross-machine sync | Yes (E2EE) | No | No | No |
| Search UI | Built-in | fzf | Built-in | Built-in |
| Context (dir, exit) | Yes | No | No | Yes |
| Statistics | Yes | No | No | No |
| Shell support | bash/zsh/fish/nu | Any | bash/zsh | bash/zsh/fish |
Summary
- Atuin replaces shell history with a SQLite database storing command, directory, exit code, duration, and host
- Enhanced Ctrl+R provides fuzzy search with filters by directory, session, host, and exit code
- End-to-end encrypted sync keeps history consistent across all your machines
- Usage statistics reveal your most-used commands and patterns
- History filter prevents sensitive commands (passwords, API keys) from being recorded
- Works with bash, zsh, fish, and nushell without changing your workflow