Atuin is a cool little utility that stores shell history to a SQLite db. It also stores timestamp, return code, and runtime on top of the command text itself. Additionally, it offers the opt-in...
Atuin is a cool little utility that stores shell history to a SQLite db. It also stores timestamp, return code, and runtime on top of the command text itself.
Additionally, it offers the opt-in option to sync history across machines (E2EE OOTB, and self-hostable). Haven't tried this out yet, but if anyone does, I'd love to hear how it goes.
I've been using it for a few weeks now, and it's been my favorite piece of software that I've added to the toolkit in years. It's already saved me hours of effort in terms of having to look up or double-check rsync/ssh/pg_dump/openssl/git/ripgrep/jq/etc. flags that I use frequently, yet not often enough to have 100%-verbatim committed to memory.
Only gripes: Not a fan of the curl ... | bash install path, but the installer is well-written and easy enough to self-audit by curl -oing before running. There was a ~1-2 hour learning curve of adjusting to the new up-arrow behavior, but that's also easy to reconfigure to another key if desired.
E: I set up the self-hosted sync server this weekend. The process was extremely smooth and user-friendly, as far as self-hosting goes.
Maintainer here! Thank you for sharing Atuin! Love to hear that you like it <3 You might like to try the enter_accept option we introduced in v17, which might feel a bit more natural.
Maintainer here! Thank you for sharing Atuin! Love to hear that you like it <3
There was a ~1-2 hour learning curve of adjusting to the new up-arrow behavior
You might like to try the enter_accept option we introduced in v17, which might feel a bit more natural.
Thanks for making it, and glad to see you on here! I appreciate the suggestion, though the default up-arrow behavior has now won me over pretty hard :).
Thanks for making it, and glad to see you on here!
I appreciate the suggestion, though the default up-arrow behavior has now won me over pretty hard :).
Hi, I hope this is ok to ask here in this old thread, but I'm having a some problems, I've installed it on two machines running ubuntu 22.04.3, and on one of those machines it doesn't record new...
Hi, I hope this is ok to ask here in this old thread, but I'm having a some problems, I've installed it on two machines running ubuntu 22.04.3, and on one of those machines it doesn't record new input until I manually run atuin import auto. I'm using fairly standard install with bash as my shell on both machines. On the machine that gave me problems the install script didn't work either, so I manually installed the .deb and added initialization to my .bashrc. As far as I can tell everything else works as it should.
hey! totally ok, though I'm more likely to respond quickly on either the forum or discord! (https://forum.atuin.sh / https://discord.gg/Fq8bJSKPHh) did you follow the advanced setup docs?...
Unfortunately bash doesn't provide shell hooks out of the box, so we also required users to install a plugin that provides this. BLE is the best bet, though it's more than just hooks. If you don't want BLE, bash-preexec is a good option.
Otherwise:
the install script didn't work either
This is an issue :/ Do you have any more information?
Weird, adding to history automatically is working on my other computer. Looks like I had bash-preexec installed as a side-effect of something else I've done earlier. As for the failed install,...
Weird, adding to history automatically is working on my other computer. Looks like I had bash-preexec installed as a side-effect of something else I've done earlier.
As for the failed install, this is what the output looks like. To do it manually I downloaded the script and modified to show the deb, then I downloaded and installed the deb manually, which worked. Then I edited my .bashrc to match what I had on my other computer.
user:~$ bash <(curl https://raw.githubusercontent.com/ellie/atuin/main/install.sh)
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 6341 100 6341 0 0 21498 0 --:--:-- --:--:-- --:--:-- 21568
_______ _______ __ __ ___ __ _
| _ || || | | || | | | | |
| |_| ||_ _|| | | || | | |_| |
| | | | | |_| || | | |
| | | | | || | | _ |
| _ | | | | || | | | | |
|__| |__| |___| |_______||___| |_| |__|
Magical shell history
Atuin setup
https://github.com/atuinsh/atuin
Please file an issue if you encounter any problems!
===============================================================================
Detected Linux!
Checking distro...
Ubuntu detected
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 5146k 100 5146k 0 0 3707k 0 0:00:01 0:00:01 --:--:-- 5868k
[sudo] password for user:
Reading package lists... Done
E: Unsupported file /tmp/tmp.pQbZA5TN2g.deb given on commandline
I’d be interested to know how it’s changed your workflow? I use the shell history constantly, so I’m excited for anything that can improve that, but so far I don’t think the use case here has...
I’d be interested to know how it’s changed your workflow? I use the shell history constantly, so I’m excited for anything that can improve that, but so far I don’t think the use case here has clicked for me - at least on a single dev machine. I could see it more if I had a need for continuous history between something ephemeral like k8s instances, but those aren’t something I’m regularly running commands on directly.
For context, my current solution is SAVEHIST=1000000 with history 0 | grep foo pretty well in muscle memory now!
I’m not a user yet but I can see how this would be handy when I’ve got a dozen tmux panes open. edit: I'm a user now, and it's pretty cool. Just the ctrl-r integration makes it worthwhile IMO --...
I’m not a user yet but I can see how this would be handy when I’ve got a dozen tmux panes open.
edit: I'm a user now, and it's pretty cool. Just the ctrl-r integration makes it worthwhile IMO -- being able to see a filterable, interactive list of all the commands I have recently run is awesome.
I've always been a big history | grep user too. The biggest enhancements in my book are all on the UX side: the default UI shows if a command ran successfully based on color coding, how long ago...
I've always been a big history | grep user too.
The biggest enhancements in my book are all on the UX side: the default UI shows if a command ran successfully based on color coding, how long ago you ran it, and how long it ran for. It's presented in a style that's extremely easy to parse, and makes it much easier to remember what you were doing a few days ago + infer why you'd made some minor tweak to that command.
History is automatically synced across terminal sessions that are currently open in realtime, which avoids bash's usual overwrite-on-exit behavior without having to mess with the usual history -a; history -c; history -r incantation.
There's a hotkey to toggle between filtering history by current directory, host, and session. I've found the directory toggle awesome for quickly pulling up build and maintenance commands based on the repo root I'm in.
The maintainers have made it clear that the local DB schema isn't guaranteed to be stable, but you can also pull up and query command history directly in Sqlite. Used it twice so far; once to scrub a credential I accidentally pasted and once to fuzzy search for a command I was having trouble finding.
E: And the update-as-you-type behavior is a solid improvement over rerunning history | greps.
I haven't used this, but I recently started using fzf and its shell integration which lets you replace the default history substring search with fuzzy history search. It has been one of my...
I haven't used this, but I recently started using fzf and its shell integration which lets you replace the default history substring search with fuzzy history search.
It has been one of my favorite updates to my config, since it provides a powerful, convenient, and pleasant to use interface for search.
From reading the docs, atuin sounds like it offers all of that and more.
Been using it for quite a while now and it's definitely useful. Atuin allows me to quickly pull up any command that I may have used months ago. That being said I've found it to be quite slow when...
Been using it for quite a while now and it's definitely useful. Atuin allows me to quickly pull up any command that I may have used months ago. That being said I've found it to be quite slow when pulling up its dashboard for the first time. There's a significant lag before I can actually start interacting with the history. So I had to fallback to Fish's <C-R> history, though I still have atuin recording my commands.
FWIW there's other similar programs like mcfly and hishtory(https://github.com/ddworken/hishtory). mcfly uses a local neural engine to suggest you commands from history. Noticeably faster than atuin. Haven't used hishtory but looks similar to atuin but with not as many features.
What version are you using? Shouldn't be the case :/
That being said I've found it to be quite slow when pulling up its dashboard for the first time. There's a significant lag before I can actually start interacting with the history
What version are you using? Shouldn't be the case :/
Although I haven't tried it out yet, a potential use-case for me is being able to have a synced history between my regular shell (ZSH) and nix-shell (which uses Bash). I've run into it enough...
Although I haven't tried it out yet, a potential use-case for me is being able to have a synced history between my regular shell (ZSH) and nix-shell (which uses Bash). I've run into it enough times where I'm looking for a command with reverse search only to realize I'm never gonna find it because I'm in Bash.
A little update, gave it a shot yesterday and so far it's working great. Getting it setup for ZSH and Bash was as simple as adding the initialization to both configs. One hiccup I've encountered...
A little update, gave it a shot yesterday and so far it's working great. Getting it setup for ZSH and Bash was as simple as adding the initialization to both configs.
One hiccup I've encountered so far is that there is no way to remove things from the history (relevant issue), but since it uses SQLite it's easy enough to open the database file and manually run a delete query.
I have been using it for a while, and I like it. But I haven't yet figured out how to delete some unwanted / typing mistake entries, etc. I hope there is an easy way to do it.
I have been using it for a while, and I like it. But I haven't yet figured out how to delete some unwanted / typing mistake entries, etc. I hope there is an easy way to do it.
Unless it’s changed in the past 1-2 releases, deleting entries still hasn’t been smoothly implemented through CLI yet. The best route is to crack open the sqlite DB and manually run a DELETE....
Unless it’s changed in the past 1-2 releases, deleting entries still hasn’t been smoothly implemented through CLI yet.
The best route is to crack open the sqlite DB and manually run a DELETE. Happy to post instructions if you’re not familiar.
Until you register, it's totally offline. So it can be reconfigured at any point there. Also, the server is hosted by hetzner in Frankfurt. You don't even need to register if you don't want to....
It's not clear to me if you could set up self hosting /before/ all your data goes Whoosh to the USA
Until you register, it's totally offline. So it can be reconfigured at any point there. Also, the server is hosted by hetzner in Frankfurt. You don't even need to register if you don't want to.
PostgreSQL, which is a bit more resource usage than sqlite
Atuin is a cool little utility that stores shell history to a SQLite db. It also stores timestamp, return code, and runtime on top of the command text itself.
Additionally, it offers the opt-in option to sync history across machines (E2EE OOTB, and self-hostable). Haven't tried this out yet, but if anyone does, I'd love to hear how it goes.
I've been using it for a few weeks now, and it's been my favorite piece of software that I've added to the toolkit in years. It's already saved me hours of effort in terms of having to look up or double-check rsync/ssh/pg_dump/openssl/git/ripgrep/jq/etc. flags that I use frequently, yet not often enough to have 100%-verbatim committed to memory.
Only gripes: Not a fan of the
curl ... | bash
install path, but the installer is well-written and easy enough to self-audit bycurl -o
ing before running. There was a ~1-2 hour learning curve of adjusting to the new up-arrow behavior, but that's also easy to reconfigure to another key if desired.E: I set up the self-hosted sync server this weekend. The process was extremely smooth and user-friendly, as far as self-hosting goes.
Maintainer here! Thank you for sharing Atuin! Love to hear that you like it <3
You might like to try the
enter_accept
option we introduced in v17, which might feel a bit more natural.Thanks for making it, and glad to see you on here!
I appreciate the suggestion, though the default up-arrow behavior has now won me over pretty hard :).
Hi, I hope this is ok to ask here in this old thread, but I'm having a some problems, I've installed it on two machines running ubuntu 22.04.3, and on one of those machines it doesn't record new input until I manually run atuin import auto. I'm using fairly standard install with bash as my shell on both machines. On the machine that gave me problems the install script didn't work either, so I manually installed the .deb and added initialization to my .bashrc. As far as I can tell everything else works as it should.
hey! totally ok, though I'm more likely to respond quickly on either the forum or discord! (https://forum.atuin.sh / https://discord.gg/Fq8bJSKPHh)
did you follow the advanced setup docs? https://atuin.sh/docs/advanced-install#bash
Unfortunately bash doesn't provide shell hooks out of the box, so we also required users to install a plugin that provides this. BLE is the best bet, though it's more than just hooks. If you don't want BLE, bash-preexec is a good option.
Otherwise:
This is an issue :/ Do you have any more information?
Weird, adding to history automatically is working on my other computer. Looks like I had bash-preexec installed as a side-effect of something else I've done earlier.
As for the failed install, this is what the output looks like. To do it manually I downloaded the script and modified to show the deb, then I downloaded and installed the deb manually, which worked. Then I edited my .bashrc to match what I had on my other computer.
I’d be interested to know how it’s changed your workflow? I use the shell history constantly, so I’m excited for anything that can improve that, but so far I don’t think the use case here has clicked for me - at least on a single dev machine. I could see it more if I had a need for continuous history between something ephemeral like k8s instances, but those aren’t something I’m regularly running commands on directly.
For context, my current solution is
SAVEHIST=1000000
withhistory 0 | grep foo
pretty well in muscle memory now!I’m not a user yet but I can see how this would be handy when I’ve got a dozen tmux panes open.
edit: I'm a user now, and it's pretty cool. Just the ctrl-r integration makes it worthwhile IMO -- being able to see a filterable, interactive list of all the commands I have recently run is awesome.
I've always been a big
history | grep
user too.The biggest enhancements in my book are all on the UX side: the default UI shows if a command ran successfully based on color coding, how long ago you ran it, and how long it ran for. It's presented in a style that's extremely easy to parse, and makes it much easier to remember what you were doing a few days ago + infer why you'd made some minor tweak to that command.
History is automatically synced across terminal sessions that are currently open in realtime, which avoids bash's usual overwrite-on-exit behavior without having to mess with the usual
history -a; history -c; history -r
incantation.There's a hotkey to toggle between filtering history by current directory, host, and session. I've found the directory toggle awesome for quickly pulling up build and maintenance commands based on the repo root I'm in.
The maintainers have made it clear that the local DB schema isn't guaranteed to be stable, but you can also pull up and query command history directly in Sqlite. Used it twice so far; once to scrub a credential I accidentally pasted and once to fuzzy search for a command I was having trouble finding.
E: And the update-as-you-type behavior is a solid improvement over rerunning
history | grep
s.I haven't used this, but I recently started using fzf and its shell integration which lets you replace the default history substring search with fuzzy history search.
It has been one of my favorite updates to my config, since it provides a powerful, convenient, and pleasant to use interface for search.
From reading the docs,
atuin
sounds like it offers all of that and more.Been using it for quite a while now and it's definitely useful. Atuin allows me to quickly pull up any command that I may have used months ago. That being said I've found it to be quite slow when pulling up its dashboard for the first time. There's a significant lag before I can actually start interacting with the history. So I had to fallback to Fish's <C-R> history, though I still have atuin recording my commands.
FWIW there's other similar programs like mcfly and hishtory(https://github.com/ddworken/hishtory). mcfly uses a local neural engine to suggest you commands from history. Noticeably faster than atuin. Haven't used hishtory but looks similar to atuin but with not as many features.
What version are you using? Shouldn't be the case :/
Looks like I'm on 16.0.0
Unless you're often running the same commands on different servers, what advantage does this have over just using the built-in shell history?
Although I haven't tried it out yet, a potential use-case for me is being able to have a synced history between my regular shell (ZSH) and nix-shell (which uses Bash). I've run into it enough times where I'm looking for a command with reverse search only to realize I'm never gonna find it because I'm in Bash.
A little update, gave it a shot yesterday and so far it's working great. Getting it setup for ZSH and Bash was as simple as adding the initialization to both configs.
One hiccup I've encountered so far is that there is no way to remove things from the history (relevant issue), but since it uses SQLite it's easy enough to open the database file and manually run a delete query.
I have been using it for a while, and I like it. But I haven't yet figured out how to delete some unwanted / typing mistake entries, etc. I hope there is an easy way to do it.
Unless it’s changed in the past 1-2 releases, deleting entries still hasn’t been smoothly implemented through CLI yet.
The best route is to crack open the sqlite DB and manually run a DELETE. Happy to post instructions if you’re not familiar.
Until you register, it's totally offline. So it can be reconfigured at any point there. Also, the server is hosted by hetzner in Frankfurt. You don't even need to register if you don't want to.
The current default is indeed postgres, but there's a SQLite option maintained here: https://github.com/conradludgate/atuin-server-sqlite
Which is going to become the default in v18, as discussed here: https://github.com/atuinsh/atuin/discussions/1161
Alternatively, you could trust the code. Which is open source, and we even have a blog post detailing how the new version will work.
So in summary:
Are there any other concerns?