Atuin
Magical shell history with sync and search.
Official WebsiteFeatures
Cloud SyncSQLite BackendEncryptionStatistics
Replaces
historyInstallation
Homebrew
brew install atuinPacman (Arch)
pacman -S atuinCargo (Rust)
cargo install atuinWhy use Atuin?
Atuin is a magical shell history replacement that goes beyond simple search. It syncs your command history across devices, encrypts sensitive data, stores everything in a SQLite database, and provides advanced statistics about your command usage patterns.
Cloud Sync
Sync your shell history across multiple machines securely. Access your command history everywhere you work.
End-to-End Encryption
All synced data is encrypted with keys only you possess. Your command history stays private and secure.
SQLite Database
Store history in a structured database for powerful querying and filtering capabilities.
Advanced Statistics
Analyze your command patterns with detailed statistics and insights about your shell usage.
Installation
Using Homebrew (macOS/Linux)
Installation
brew install atuinUsing Cargo (Rust)
Installation
cargo install atuinShell Integration Setup
Shell Setup
# For Bash, add to ~/.bashrc:
eval "$(atuin init bash)"
# For Zsh, add to ~/.zshrc:
eval "$(atuin init zsh)"
# For Fish, add to ~/.config/fish/config.fish:
atuin init fish | source
# Then restart your shell
exec $SHELL # or: source ~/.bashrcVerify Installation
Verification
atuin --version
# Check shell integration
echo $ATUIN_SESSION # Should display session UUID
# View current configuration
atuin account statusBasic Usage
Interactive Search
Basic Search
# Open Atuin history search (replaces Ctrl+R)
Ctrl+R
# Fuzzy search for a command
Ctrl+R
docker build
# Shows all docker build commands from your history
# Navigate results and execute
↑/↓ # Navigate through results
Enter # Execute selected command
Esc # Cancel search
# Advanced search features
? # Show search help in interfaceCommand Line History Operations
CLI Operations
# View your command history
atuin history
# Search history from command line
atuin search "git commit"
# List recent commands
atuin history last 20
# Show history statistics
atuin statsCloud Sync Setup (Optional)
Cloud Sync
# Register for cloud sync account
atuin register
# Login to your account
atuin login
# Logout if needed
atuin logout
# Enable sync (auto-enabled after login)
# Your history will sync automatically
# View sync status
atuin account statusCommon Commands and Options
| Command | Description | Example |
|---|---|---|
atuin history | List command history | atuin history list |
atuin search | Search history | atuin search "docker" |
atuin stats | Show statistics | atuin stats |
atuin register | Create sync account | atuin register |
atuin login | Login to sync | atuin login |
atuin import | Import history | atuin import auto |
atuin account | Manage account | atuin account status |
Practical Examples
Syncing Across Machines
Multi-Machine Setup
# On machine 1 (Setup):
atuin register
# Enter email and password
atuin login
# On machine 2 (Setup):
atuin login
# Use same credentials
# Now both machines sync automatically!
# Commands run on machine 1 appear on machine 2
# All encrypted end-to-end
# Check sync status
atuin account statusSearching and Filtering History
Advanced Search
# Search all kubernetes commands
atuin search "kubectl"
# Find commands from specific directory
atuin history list --directory ~/projects
# Get commands with specific exit status
atuin history list --exit-status 0 # Successful
atuin history list --exit-status 1 # Failed
# Filter by date range
atuin history list --after "2024-01-01" --before "2024-01-31"Analyzing Your Habits
Statistics
# View overall statistics
atuin stats
# Most common commands
atuin stats | head
# Statistics output includes:
# - Most run commands
# - Total command count
# - Unique commands
# - Success rate
# - Average command length
# This helps identify patterns and optimization opportunitiesImporting Existing History
History Import
# Auto-import from default shell history
atuin import auto
# Import from specific sources
atuin import bash # From ~/.bash_history
atuin import zsh # From ~/.zsh_history
atuin import fish # From Fish history
# After import, your entire history is available in Atuin
# And can be synced across devicesConfiguration and Customization
Configuration File
~/.config/atuin/settings.toml
# Atuin configuration is located at:
# ~/.config/atuin/settings.toml (Linux/macOS)
# %APPDATA%\atuin\settings.toml (Windows)
# Example configuration:
[settings]
# Locally store history
local_history = true
# Enable sync
sync = true
# Search behavior
search_mode = "fuzzy" # or "prefix"
# History filtering
history_filter = [
"^password ",
"^ssh ",
]Filtering Sensitive Commands
Sensitive Data Filtering
# ~/.config/atuin/settings.toml
[settings]
history_filter = [
# Don't record password commands
"^password ",
"^passwd ",
# Don't record SSH keys
"ssh-keygen",
"ssh-add",
# Don't record database passwords
"mysql -p",
"psql.*password",
# Don't record AWS secret operations
".*aws_secret.*",
# Regex patterns are supported
]Shell-Specific Settings
UI Configuration
# ~/.config/atuin/settings.toml
[settings]
# Search mode
search_mode = "fuzzy" # "fuzzy" or "prefix"
# Inline search display
invert = false # Show results in natural order
# Enable key binding hints
show_help = true
# Adjust UI colors/theme
# Atuin respects shell color schemes
# Advanced: Custom keybindings per shell
# These are shell-specific and configured separatelyAtuin vs Other History Tools
| Feature | Default Shell | McFly | Atuin |
|---|---|---|---|
| Cloud sync | No | No | Yes |
| End-to-end encryption | No | No | Yes |
| Database storage | Text file | Custom | SQLite |
| Statistics | None | Limited | Advanced |
| Learning/AI ranking | None | Neural network | Relevance-based |
| Setup complexity | None | Simple | Moderate (optional sync) |
| Multi-machine support | Manual | No | Built-in |
Tips
- •Cloud sync is optional - you can use Atuin without syncing for local history management only
- •Use the history_filter setting to prevent sensitive commands (passwords, keys) from being stored
- •The SQLite database can be queried directly for custom analysis of your command history
- •Atuin shows exit status for each command, helping you identify which commands succeeded and which failed
- •For multi-machine setup, all machines should use the same account for full history sync
- •The search interface allows filtering by time, directory, exit code, and hostname
- •Consider using Atuin with other shell enhancements like zsh-autosuggestions for a complete workflow
- •The database location can be customized via environment variables if needed for specific setups
Getting Started Checklist
- Install Atuin using Homebrew or Cargo
- Initialize shell integration (add eval statement to config)
- Restart your shell and verify with
Ctrl+R - Import existing shell history with
atuin import auto - Optional: Register and login for cloud sync across devices
- Configure history_filter for sensitive commands
- Explore statistics with
atuin stats - Try searching with Ctrl+R - enjoy the improved experience!