Atuin – Magical Shell History

by toshon 6/24/25, 9:03 AMwith 70 comments
by nidnoggon 6/24/25, 9:50 AM

I've been using Atuin for at least a year and a half, and I think it's definitely the tool I'd been looking for the most in my entire dev career. It has made me much more confident with my hazy memory. Before it I'd struggle consistently to remember most of my recent commands.

bck-i was always a bit obtuse to me and I honestly never grokked it until I had Atuin wired into my workflow (hard) and ran into bck-i instead when SSH'd.

Anytime a peer views my screenshare, they ask "what's the funny thing that makes you so fast". I then proceed to share, first and foremost, Atuin.

Thanks Atuin team! Would love to contribute someday with more time.

by moonshot5on 6/24/25, 10:11 AM

For zsh users who like this idea and don't want to have to worry about anything leaving the device (not to insinuate that Atuin is doing anything below board, I don't think they are) I built my own version of this for myself called raven:

https://github.com/tylersaunders/raven

Raven has no sync component, stores your history in a sqlite, and never tries to move data off the device. It has a similar / large overlap in features with Atuin.

Sharing here in case anyone else could benefit from it, it only supports zsh for the moment since that's what I use.

Atuin is great though!

by Tmpodon 6/24/25, 10:23 AM

I see it also supports fish. That's been my shell for many years, it just works really well and, as far as I can tell (couldn't find a demo on their website), it doesn't add much to fish beyond syncing?

Has anyone used fish + autuin? What are your thoughts? I'm curious to know if it is worth the extra tool, maybe I should just try it :)

by tecleandoron 6/24/25, 10:08 AM

If any of you is having problems with Atuin acting weirds or slow, and has a ZFS filesystem, there's a known problem with sqlite and ZFS [0]. There are a couple of workarounds [1] that are, either using `atuin daemon`, or creating an ext4 volume for the atuin storage.

--

  0: https://docs.atuin.sh/known-issues/
  1: https://github.com/atuinsh/atuin/issues/952

by drcongoon 6/24/25, 10:01 AM

I recently switched to Atuin from McFly, and while McFly has been a solid performer for me for years, I love Atuin. Worth pointing out for others who care about such things as it's not made clear on this landing page, you don't actually need to register - if you don't need the sync, you can just use it without registering and it's still amazing, and if you do need the sync but don't like the idea of your history being stored on someone else's server, you can self-host the sync server too.

by MrSaintson 6/24/25, 10:10 AM

I can't remember what my terminal was like before this. It's so fast, seamless and part of my day to day workflow. Solid open source project.

by yesbuton 6/24/25, 10:39 AM

I'd never sync my shell history with a third party. The self-hosting option looks interesting, but anyone comfortable with syncing their shell history with a third party is severely lacking basic privacy literacy and underestimates the sensitivity of command history.

by Despacito2019on 6/24/25, 11:27 AM

I love atuin but i am not quite as fond of the UI (only because i am not used to it), so i have my own little function to use atuin with fzf instead:

    insert_atuin_with_fzf () {
        local result
        result=$(atuin history list --reverse --format "{command}" | \
                awk '!seen[$0]++ && length($0) > 2 && !/^j /' | \
            fzf +s)
        [[ -n $result ]] && LBUFFER+="$result"
    }
    
    # Bind the widget to Ctrl-Q
    zle -N insert_atuin_with_fzf
    bindkey -M emacs '^q' insert_atuin_with_fzf
    bindkey -M emacs '^x^q' atuin-search

by kenanfyion 6/24/25, 10:10 AM

I’ve been using it for more than a year and it’s already a must for me to install whenever I spin up a new server. Great piece of software!

by olivierggon 6/24/25, 11:07 AM

And don't forget to do :

`workspaces = true`

in your config, to limit your history to the current git repo.

Thank you very much atuin team. Can't work without atuin installed.

by atombenderon 6/25/25, 9:48 PM

I've used Atuin for a few months, but I ended up going back to zsh-histdb, which stores history in an SQLite database.

When I compared Atuin with zsh-histdb again, the performance difference was stark. Zsh-histdb is just instantaneous, whereas Atuin has noticeable lag.

Atuin's ranking algorithms are also quite deficient, and I've tried all of them. I did a quality comparison before going back to zsh-hidden and found a good example: If I autocomplete on "curl cat", the first match is something like "curl http://localhost/v1/chat" that I did earlier today. If I autocomplete on "curl chat", the first match is something like "curl http://localhost/_cat".

From what I can tell, the ranking doesn't seem to consider contiguous substring matches as having higher relevance than random letters in different order. Clearly "cat" should match "cat" higher than "chat", even if they both have "h" somewhere.

(If anyone from Atuin is reading here, I'd be happy to show a screen recording of the problem.)

The fact that Atuin cannot delete old history is also a problem, especially since it gets markedly slower the more history you have. I initially imported all my history (about 100MB?) and it was dog slow. But there was no way to prune older entries, so I had to wipe it clean and then import a subset. Even then, as I said, it's clearly slower than zsh-histdb.

Zsh-histdb has other issues, and hasn't been updated in years, but it works better for me. Atuin's syncing is nice, but it's something I can live without.

by dmdon 6/24/25, 11:14 AM

If I explicitly DON’T want sync between machines (my workflows are very machine specific), does atuin give me anything significant over my current fzf based C-r?

by GardenLetter27on 6/24/25, 9:31 AM

Looks like it has some really nice features - https://docs.atuin.sh/configuration/key-binding/

I'm using fish + fzf atm but this looks better tbh.

by nkkoon 6/24/25, 9:59 AM

Atuin has been a part of my dotfiles install.sh for the last two years. It became such an integral part of my flow that it became invisible. Prob not a good thing for them, but also a testament to how naturally it fits in.

by 1vuio0pswjnm7on 6/24/25, 2:21 PM

What are the terms and conditions regarding the data collected at api.atuin.sh

By default, the user's shell history is synced to a remote server

Unless they configure and run their own localhost server

Localhost server could be but is not the default when user enters

   atuin register
Instead remote server is pre-configured, asks for email, etc.

Interesting design choice

I have used SQLite to store and search history instead of Postgres

Works with Bourne shell (sh), no need for Bourne-Again shell (bash) or other larger shells

What does "magical" mean in this context

by picardoon 6/24/25, 10:44 AM

Is there a way to change the key binding of the search screen? I'm too attached to using the up key to recover the last command I used, and it's a little jarring to now have to click tab from the Atuin search interface. It adds a little friction each time I have to do this.

As an aside, most of my usage of history is to use the last few commands I used, and so seeing the entire history each time seems like an overkill.

by outcoldmanon 6/24/25, 11:17 AM

I have been storing shell history in SQLite since 2017 [1]. I have always been a heavy shell user, with the worst memory. So having all the history stored and backed up was very useful for me. At the time when I became a full-time macOS user, I built a ShellHistory app for macOS [2], with full-text search, notebooks, and sync over iCloud (with advanced data protection [3]).

I tried to contact Atuin authors to see if I could also integrate ShellHistory with their servers, but at that time it seemed like they did not support third-party clients, and the API was not documented.

I highly recommend using tools like Atuin and ShellHistory, at this point I have 136,000 records since 2017. My shell history is the best documentation for me. If I need to do a `kubectl --raw` API call, and don't remember exactly how to write it, I just search for `kubectl raw` and get some results from the history, don't remember some advanced `git rebase`, just search the history for it.

—-

- [1] https://www.outcoldman.com/en/archive/2017/07/19/dbhist/

- [2] https://loshadki.app/shellhistory/

- [3] https://support.apple.com/en-us/108756

Edit: fixed formatting

by bananapubon 6/24/25, 9:42 AM

I've been using it for a year or two, and it's great. it's also very easy to run your own instance of it.

by leosanchezon 6/24/25, 9:35 AM

TIL: You can also self-host atuin.

by Jotaleaon 6/24/25, 3:42 PM

I'm glad that there already is a tool that I was about to make. I don't usually like to change my workflow, but this seems like a very useful addition, since I can also add my history from past installations.

by pshirshovon 6/24/25, 10:17 AM

The sync feature is great, though there are many oddities with search sort order, unnecessary terminal cleanups, odd timeouts, etc. In some aspects it's a big upgrade from fzf, in some aspects it's a downgrade.

by TRiG_Irelandon 6/27/25, 2:55 PM

I'm assuming that the name is a Discworld reference?

by Fervicuson 6/24/25, 10:45 AM

How does it compare to mcfly? https://github.com/cantino/mcfly

by lblumeon 6/24/25, 10:32 AM

Wow, this is incredibly useful. I was just thinking "why can't C-r just work like fzf", but this is a much better approach of course.

by account-5on 6/24/25, 11:19 AM

You can use this with Nushell! Amazing, will give it a go, though Nushell is pretty good at history search itself

by raaron773on 6/24/25, 9:35 AM

atuin is great been using ít for few weeks now. i like how configurable the TUI itself is. The only thing i wish it had was profiles.

by kerberos84on 6/24/25, 10:07 AM

will you add support for ksh ?

by thefzon 6/24/25, 2:42 PM

Honestly been using it daily since I discovered it, great tool. Thanks.