# Atuin — Magical Shell History with Sync and Search > Atuin replaces your existing shell history with a SQLite database, recording additional context (cwd, exit code, duration, hostname). Sync history across machines end-to-end encrypted. Interactive fuzzy search with rich filtering. ## Install Save in your project root: ## Quick Use ```bash # Install bash <(curl https://raw.githubusercontent.com/atuinsh/atuin/main/install.sh) brew install atuin cargo install atuin # Import existing history atuin import auto # Start local sync server or use hosted atuin register -u william -e w@tokrepo.com atuin login -u william atuin sync ``` Usage: press `Ctrl+R` (or `up arrow` if enabled) for the Atuin picker — a searchable, filterable history UI. ```bash atuin search docker # Search history atuin stats # Usage stats atuin history list # List with context ``` ## Intro Atuin replaces your existing shell history with a SQLite database, records additional context (cwd, exit code, duration, hostname, session), and adds interactive fuzzy search. It can optionally sync history end-to-end encrypted across machines via the official server or your self-hosted instance. - **Repo**: https://github.com/atuinsh/atuin - **Stars**: 29K+ - **Language**: Rust - **License**: MIT ## What Atuin Does - **Rich history** — cwd, exit code, duration, session, hostname - **Search UI** — Ctrl+R opens fuzzy picker with filters - **End-to-end encrypted sync** — across machines - **Stats** — top commands, avg duration, failure rate - **Filter by** — directory, session, exit code - **Replaces Ctrl+R** — native shell history integration - **Import** — bash, zsh, fish, nushell, resh ## Architecture Local SQLite database at `~/.local/share/atuin/history.db`. Shell hook captures each command pre/post execution. Optional sync server stores encrypted blobs (client has the key, server cannot read plaintext). ## Self-Hosting Optional sync server is open source: ```bash docker run -d -p 8888:8888 -v atuin-data:/config ghcr.io/atuinsh/atuin server start # Or via systemd: atuin server start ``` Client config points to your server with `sync_address` in `~/.config/atuin/config.toml`. ## Key Features - Full context per command - E2E encrypted sync - Fuzzy interactive picker - Directory-scoped history - Session filtering - Import from other history tools - Stats and insights - Self-hostable server ## Comparison | Tool | Storage | Sync | Context | |---|---|---|---| | Atuin | SQLite | E2E encrypted | Full | | McFly | SQLite | No | Limited | | HSTR | Native | No | None | | fzf history | Flat file | No | None | | shell history | Flat file | No | None | ## 常见问题 FAQ **Q: 隐私?** A: Atuin 默认本地存储。开启 sync 时用客户端密钥加密后上传,服务器看不到明文。完全自主可控。 **Q: 会影响 shell 启动速度吗?** A: Rust 实现很快,hook 只在命令执行时触发,启动几乎无感。 **Q: 可以禁用某些命令吗?** A: 可以。配置 `history_filter` 正则数组(例如包含密码的命令)避免记录。 ## 来源与致谢 Sources - Docs: https://atuin.sh - GitHub: https://github.com/atuinsh/atuin - License: MIT --- Source: https://tokrepo.com/en/workflows/d3b64b0c-35cb-11f1-9bc6-00163e2b0d79 Author: AI Open Source