this post was submitted on 09 Jan 2024
78 points (100.0% liked)

Technology

37699 readers
482 users here now

A nice place to discuss rumors, happenings, innovations, and challenges in the technology sphere. We also welcome discussions on the intersections of technology and society. If it’s technological news or discussion of technology, it probably belongs here.

Remember the overriding ethos on Beehaw: Be(e) Nice. Each user you encounter here is a person, and should be treated with kindness (even if they’re wrong, or use a Linux distro you don’t like). Personal attacks will not be tolerated.

Subcommunities on Beehaw:


This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.

founded 2 years ago
MODERATORS
 

Atuin replaces your existing shell history with a SQLite database, and records additional context for your commands. With this context, Atuin gives you faster and better search of your shell history!

Additionally, it provides optional and fully encrypted (E2EE) synchronisation of your history between machines, via an Atuin server, or you can self-host your own server. There is a single command to easily delete your data from the server too.

It supports zsh, bash, fish, and nushell shells right now.

The search is as easy as pressing the up arrow in the terminal and then scrolling back, or typing to search. But you could also type something like this to do a search [search for all successful make commands, recorded after 3pm yesterday atuin search --exit 0 --after "yesterday 3pm" make].

Atuin offers configurable full text or fuzzy search, filterable by host, directory, etc. As it has context around dates, times, exit code, and even the directory location form where a command was executed, you could use the -c flag to just search for commands run in a particular directory.

The sync function allows you to have the same history across terminals, across sessions, and across machines.

There is a quick start script that can be run to install it, otherwise you can also install from the various Linux repos. For manual installation, the steps I found to get going were:

  • Install Ble.sh and add it to your .bashrc (or other shell) file
  • Install Atuin and add it to your .bashrc (or other shell) file (after Ble.sh)
  • Restart your shell and run 'atuin import bash' to import my bash history into Atuin
  • Press up arrow to see if Atuin interactive search triggers

The link below has some good documentation as well a link to their source code.

See https://atuin.sh/

#technology #Linux #opensource

top 15 comments
sorted by: hot top controversial new old
[–] adespoton@lemmy.ca 9 points 10 months ago

The Turtle moves!

[–] Cwilliams@beehaw.org 6 points 10 months ago (2 children)

Is that CTT's starship config?

[–] GadgeteerZA@beehaw.org 3 points 10 months ago (1 children)
[–] Cwilliams@beehaw.org 3 points 10 months ago

It looks soo good

[–] u_tamtam@programming.dev 1 points 10 months ago (1 children)

I figured starship.rs but not the CTT part, any pointer to help me?

[–] Cwilliams@beehaw.org 2 points 10 months ago* (last edited 10 months ago) (1 children)
[–] u_tamtam@programming.dev 2 points 10 months ago
[–] nameisnotimportant@lemmy.ml 4 points 9 months ago* (last edited 9 months ago)

Damn 12K GitHub stars? Why am I discovering this only now? I need to refine my discovery habits

[–] u_tamtam@programming.dev 4 points 10 months ago (2 children)

Been using it for months, haven't gotten to use the sync yet, my only regret so far is that it doesn't support case insensitive search which is a pretty big deal for me unfortunately.

[–] alexland@beehaw.org 1 points 10 months ago

I haven't used Atuin (though I think I might give it a try), but maybe you could use the atuin history list command and pipe that into something like fzf or ripgrep to get case insensitive search?

[–] Deebster@beehaw.org 1 points 9 months ago (1 children)

Sync seems like it's going to be more pain than its worth unless you have all your machines configured the same. I'm not even running the same distros between machines...

[–] u_tamtam@programming.dev 2 points 9 months ago (1 children)

What I found compelling about the sync is that you can have your other machines' histories there with you, but in the background, behind a different shortcut, just in case you need to re-run or check that command you ran somewhere else few years ago…

As I said, I haven't used that yet, but that's in many ways more appealing than having to SSH onto said machine (assuming it's even possible).

[–] Deebster@beehaw.org 1 points 9 months ago

Ah, ok, that makes more sense. That also solves any ordering problem if you, say, you're running local and elsewhere commands and a sync means pressing up gives you an unexpected item.

[–] anachronist@midwest.social 3 points 9 months ago (1 children)

I've been using fish for many years now which has similar history recall features along with an improved and simplified syntax:

https://fishshell.com/

[–] nameisnotimportant@lemmy.ml 1 points 9 months ago

Same, I've been very fond of it so far! Though I'm curious about what this has to offer.