What Atuin Is
Your shell already keeps a history. In
bash it lives in a plain text file,
~/.bash_history: one command per line,
nothing else. Not when you ran it (unless
you set an option), not where you were,
not whether it worked, and not how long
it took. When the file fills up, the
oldest commands fall off the top. When
two shells are open at once, they write
over each other's memories. Pressing
Ctrl-R searches what survives, one match
at a time, backwards.
Atuin replaces that file with a database. It is a single program that hooks into your shell and records every command you run into a SQLite database on your own machine — the command itself, and also the working directory you ran it in, the time it started, how long it ran, and the exit code it came back with. Searching that database is the other half of the tool: press Ctrl-R and a search window opens over your whole recorded past, across every session and every directory, and the command you pick is placed back on your prompt.
The name is a small joke for readers of Terry Pratchett: Atuin is the Great A'Tuin, the turtle who carries a world on its back. This Atuin carries your shell history on its back, and — the point of the guide — remembers it properly.
Why anyone would do this
Four honest reasons account for nearly every install:
- The command you almost remember.
You built a
tararchive six weeks ago with exactly the right flags, or anrsyncwith the excludes just so. In a text file that command is onegrepaway if it survived at all; in Atuin it is two keystrokes away, and it arrives with the directory you ran it in as a hint about what it meant. - What failed, and where. Because the exit code is recorded, you can ask for your failures only: show me the commands that did not work in this folder. Plain history cannot answer that at all.
- How long things take. Durations are recorded too, so the build that "feels slower lately" can be checked against last month's runs instead of argued about.
- Many shells, one memory. Every shell on the machine writes to the same database, so the command you ran in the other terminal this morning is in this terminal's search this afternoon. (Syncing between machines is a separate, optional feature — chapter 11, and deliberately not the centre of this guide.)
The rule, stated before everything else
A complete shell history is one of the most revealing files a person can own. It records what you did and when, and sooner or later it records a secret: a password pasted at the wrong prompt, a token typed as a command argument, the name of a thing you were not supposed to be working on yet. So this guide has one rule, and it is not fine print:
Record your own shells, on your own machines, under your own account — and treat the database like the diary it is.
Importing a history file from an account other people use, or reading a database that is not yours, is reading someone's diary: no, even if the file permissions let you. Chapter 9 shows exactly what the database holds, and chapter 14 returns to what keeping it means. Atuin does help by default: its secrets filter refuses to record commands matching a built-in list of known secret shapes (cloud keys, GitHub tokens, Slack and Stripe keys, and more), and chapter 10 shows the filters you can add yourself. A safety net, not a promise — the rule above is the real protection.
A familiar shape
Atuin is one binary with a handful of
faces (chapter 2): the hooks inside
your shell that record, the interactive
search on Ctrl-R, the scriptable
atuin search and atuin history
commands that print to the terminal, and
atuin stats for counting what you run.
All of them work on the same local
database. Nothing in chapters 1–10 needs
an account, a network, or a server.
A first taste, after installing (chapters 3 and 4):
atuin search rsync
2026-10-07 22:09:00 rsync -av ~/Documents/ ~/backups/documents/ 0s
That line is real, from this guide's
lab: one command, found in the imported
past of a fixture history, with its date
and duration attached (transcript
atuin-lab/transcripts/t04-search.txt).
Check: after chapter 4, that command (or your own equivalent) answers with at least one of your real commands. If it answers nothing, chapter 15 starts there.
Who it is for
The person who lives in a terminal and feels the text file's limits weekly: the administrator re-deriving last month's incantation, the programmer who swears they already solved this exact problem in this exact folder, the careful soul who wants to know which of their commands fail and how long the rest take. The common thread is one person, their own shells, and a past worth searching.
What it is not
Atuin is not a backup of your system: it keeps commands, not the files they changed or (in this guide's scope) the output they printed. It is not a keylogger for other people's sessions and must never be installed as one — see the rule above. It is not a shell: bash, zsh or fish still runs your commands; Atuin only watches and remembers. And it is not, despite the marketing, magic: it is a SQLite database with a very good search box, and chapter 9 opens the box.