Atuin replaces your existing shell history with a SQLite database

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • atuin

    ✨ Magical shell history

  • It looks like it's not possible to export the history to a format the shell can import[0], so if I wanted to try this out, my commands would be locked there.

    It looks interesting, so if I'm overlooking a way to do this with fish, I'd experiment with it.

    [0]: https://github.com/ellie/atuin/issues/816

  • zsh-merge-hist

  • > How do you handle maintaining this as you transition through jobs, machines, etc?

    Currently, the tool reads ~/.mergerc, which is a JSON file with a list of SSH hosts to SCP history to and from. As long as the history file is in the same place (it tends to be on hosts that I setup, and otherwise I check in default locations) and the host has an entry in ~/.ssh/config, the tool will work. It's really just a wrapper for a few SCP invocations plus a history file (extended) format parser.

    Changing servers is just a change in the config file, but it's also helpful for changing jobs, because I can quickly add a bit of filtering before the merging happens. I had to erase some API keys and such a few times, adding `filter` call here: https://github.com/piotrklibert/zsh-merge-hist/blob/master/s... took care of it.

    > what is your workflow around maintaining these one off ad hoc "developer boost" type tools?

    Good question. I don't have such workflow, at all. When I commit to write something like this, I try to make sure that it has a scope limited enough so that it can be "completed" or "done". In this case, the tool builds on SSH/SCP and a file format that hasn't changed in the last 20 years (at least). So, once I had it working, there was nothing much to do with it after that. The only change I had to do recently was changing `+` to `` in the parser, because somehow (not sure how, actually) an empty command made it into the file. But that's all I had to do in 5 years time.

    I'm not as extreme, but suckless.org philosophy appears to work well here. Here's another example: https://github.com/piotrklibert/nimlock - it's a port, done because I wanted to do something in Nim, but it worked for me for years and I suspect it still works now (after going full remote I stopped needing it). There's nothing much that could break (well, Wayland would* break it, but I don't use it), and so there's not much you need to do in terms of maintenance.

    As for language choices - these are basically random. I made the zsh-merge-hist in Scala simply because I was interested in Scala back then. I have little tools written in Nim, OCaml, Racket, Elisp, Raku - and even AWK (pretty nice language actually) and shell. That's another reason why making the tools any more complex than what's absolutely necessary would be a problem: the churn in the ecosystems tends to be too high for me to keep track of, especially since I'd need to track 10 of them.

    > I'm checking it out

    If you have Java installed, `./gradlew installDist` should give you `./build/install/bin/zsh-merge-hist` executable to run. The ~/.mergerc (on the host the tool runs) should look like this:

        {

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • LLMShellAutoComplete

    Use GPT to complete shell command line using atuin shell history database and terminal screen content as prompt

  • Well it's published. Wasn't ready to publish and didn't have time to clean it up but I'll get back to it in the coming days, there's also some extra features on the way but disabled currently. Works quite well for me though.

    https://github.com/TIAcode/LLMShellAutoComplete

    Forgot to add needs tiktoken, openai and fzf. If someone knows how to do that command line query and replace on other than fish/nushell, please let me know.

  • mcfly

    Fly through your shell history. Great Scott!

  • There's also McFly which does the same thing.

    https://github.com/cantino/mcfly

    I've only used McFly and found it to be pretty great. My only complaint is the default search mode is SQL strings, so you have to use `%` for wildcards. I wish it was a more forgiving, less exact search.

    Has anyone used both and could compare them?

  • bash-preexec

    ⚡ preexec and precmd functions for Bash just like Zsh.

  • Or use the excellent bash-preexec plugin that atuin itself relies on to achieve this in a cleaner way: https://github.com/rcaloras/bash-preexec

  • resh

    RESH ❯❯ Contextual shell history for zsh and bash

  • nimlock

  • > How do you handle maintaining this as you transition through jobs, machines, etc?

    Currently, the tool reads ~/.mergerc, which is a JSON file with a list of SSH hosts to SCP history to and from. As long as the history file is in the same place (it tends to be on hosts that I setup, and otherwise I check in default locations) and the host has an entry in ~/.ssh/config, the tool will work. It's really just a wrapper for a few SCP invocations plus a history file (extended) format parser.

    Changing servers is just a change in the config file, but it's also helpful for changing jobs, because I can quickly add a bit of filtering before the merging happens. I had to erase some API keys and such a few times, adding `filter` call here: https://github.com/piotrklibert/zsh-merge-hist/blob/master/s... took care of it.

    > what is your workflow around maintaining these one off ad hoc "developer boost" type tools?

    Good question. I don't have such workflow, at all. When I commit to write something like this, I try to make sure that it has a scope limited enough so that it can be "completed" or "done". In this case, the tool builds on SSH/SCP and a file format that hasn't changed in the last 20 years (at least). So, once I had it working, there was nothing much to do with it after that. The only change I had to do recently was changing `+` to `` in the parser, because somehow (not sure how, actually) an empty command made it into the file. But that's all I had to do in 5 years time.

    I'm not as extreme, but suckless.org philosophy appears to work well here. Here's another example: https://github.com/piotrklibert/nimlock - it's a port, done because I wanted to do something in Nim, but it worked for me for years and I suspect it still works now (after going full remote I stopped needing it). There's nothing much that could break (well, Wayland would* break it, but I don't use it), and so there's not much you need to do in terms of maintenance.

    As for language choices - these are basically random. I made the zsh-merge-hist in Scala simply because I was interested in Scala back then. I have little tools written in Nim, OCaml, Racket, Elisp, Raku - and even AWK (pretty nice language actually) and shell. That's another reason why making the tools any more complex than what's absolutely necessary would be a problem: the churn in the ecosystems tends to be too high for me to keep track of, especially since I'd need to track 10 of them.

    > I'm checking it out

    If you have Java installed, `./gradlew installDist` should give you `./build/install/bin/zsh-merge-hist` executable to run. The ~/.mergerc (on the host the tool runs) should look like this:

        {

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts