Atuin is a tool that runs in the background to capture commands you’ve entered. It stores these locally in a SQLite database and provides a great CLI tool to search through that history, provide stats of what commands you frequently run, and optionally syncs this history across devices.
Atuin is one of several cool Rust tools that I’ve found in the past year or so, and is my favorite addition to my terminal workflow in a long time. Other tools that I’ve found and would like to write up soon are: Hyperfine, ripgrep, and Starship.1 I’ve added Atuin to my /uses page with a link back to this post.
Commands are grabbed via preexec and precmd hooks that allow it to get not only the command, but the current directory, hostname, session, duration of the command, and exit code. It stores these in its SQLite database along with a timestamp, so you’re free to introspect that data yourself as well. It also leaves the shell’s history file alone, so unless you disable it yourself you’ll still have that.
Top comments (0)