ConfigsApr 11, 2026·2 min read

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.

TL;DR
Atuin replaces shell history with a SQLite database, adding full-text search, cross-machine sync, and encrypted backup.
§01

What it is

Atuin replaces your existing shell history with a SQLite database, recording additional context like the working directory, exit code, session ID, and command duration for every command. It provides full-text search, cross-machine sync with end-to-end encryption, and context-aware suggestions. Atuin supports bash, zsh, and fish shells.

Developers and sysadmins who rely heavily on shell history to recall commands across sessions and machines benefit most. The default shell history (usually a flat text file with a limited line count) loses commands frequently and provides no search beyond simple prefix matching.

§02

How it saves time or tokens

Atuin's full-text search finds commands by any substring, not just prefix. The SQLite backend stores unlimited history with rich metadata, so you never lose a command. Cross-machine sync means the command you ran on your work laptop is available on your home machine. Context-aware filtering shows commands relevant to your current directory, reducing the noise when searching through thousands of entries.

§03

How to use

  1. Install Atuin:
# macOS
brew install atuin

# Linux
curl --proto '=https' --tlsv1.2 -sSf https://setup.atuin.sh | sh
  1. Initialize and configure for your shell:
atuin init zsh >> ~/.zshrc
source ~/.zshrc
  1. Press Ctrl-R to open Atuin's interactive search. Type any part of a previous command to find it instantly.
§04

Example

# Search history for commands containing 'docker'
atuin search docker

# Filter by directory
atuin search --cwd /home/user/project docker

# Filter by exit code (find failed commands)
atuin search --exit 1

# Sync history across machines
atuin register -u myuser -e email@example.com -p mypassword
atuin sync

# Import existing shell history
atuin import auto
§05

Related on TokRepo

§06

Common pitfalls

  • Atuin replaces the Ctrl-R binding. If you have other tools using Ctrl-R (fzf, McFly), they will conflict. Disable or rebind the other tool's keybinding.
  • Cross-machine sync requires creating an account on Atuin's server (or self-hosting). History is end-to-end encrypted, but if you prefer no external server, use Atuin in local-only mode.
  • Importing existing history works best when done once at setup. Running import multiple times can create duplicate entries.

Frequently Asked Questions

Is Atuin free?+

Yes. Atuin is open source and free to use. The sync server is also open source and can be self-hosted. The hosted sync service is free for individual use.

Is my history encrypted during sync?+

Yes. Atuin uses end-to-end encryption for synced history. Your commands are encrypted on your machine before being sent to the sync server. The server never sees your plaintext history.

Does Atuin work with bash?+

Yes. Atuin supports bash, zsh, and fish. Run 'atuin init bash >> ~/.bashrc' to configure it for bash. The Ctrl-R search interface works the same across all supported shells.

How much history can Atuin store?+

Atuin stores history in a local SQLite database with no practical limit. Unlike default shell history which caps at a few thousand lines, Atuin keeps everything. The database remains fast even with hundreds of thousands of entries.

Can I self-host the sync server?+

Yes. The Atuin sync server is open source. Deploy it with Docker and point your Atuin clients to your server URL. This gives you full control over where your encrypted history is stored.

Citations (3)

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets