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

  • taladar@sh.itjust.works
    link
    fedilink
    arrow-up
    3
    ·
    1 year ago

    Does sqlite read-only access still work when the disk is full? Would be bad if your history tool prevented shell access when you need to delete something if your disk fills up. Also not sure how fsynced access might slow down debugging of I/O starvation issues (when you want your shell to run from memory mostly).

    • GadgeteerZA@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      1
      arrow-down
      3
      ·
      1 year ago

      I think a lot of other OS things are going to break when a disc gets full… But you can also delete history within Atuin.

      • taladar@sh.itjust.works
        link
        fedilink
        arrow-up
        4
        ·
        edit-2
        1 year ago

        The point was more if atuin breaks your shell under those circumstances so you can not fix the full disk. Sqlite usually writes some transaction file before it does anything, doesn’t it?

        • GadgeteerZA@lemmy.mlOP
          link
          fedilink
          English
          arrow-up
          1
          arrow-down
          3
          ·
          1 year ago

          But like most other things you’d chroot in and disable it? I think though whatever fills up your disk is probably going to prevent a proper boot up.

          • taladar@sh.itjust.works
            link
            fedilink
            arrow-up
            1
            ·
            1 year ago

            Usually apart from potentially a reboot afterwards to make sure all services are running normally again a filled up disk doesn’t require a reboot.