Live data from Hacker News

Atuin – Magical Shell History

atuin.sh

51–60 of 72 posts

Re: Atuin – Magical Shell History

#51
post #49

Earlier quoted context omitted.

> does atuin give me anything significant over my current fzf based C-r I'm interested in this as well. I currently use fzf and I'm happy with what I've got (except for me syncing would probably be a nice feature to have). Also: I gave atuin a quick try and found the TUI to be worse than fzf. Why do I need a fullscreen ctrl-r interface? I found that distracting. But maybe that is configurable. I didn't look much furt…

It is configurable! And also the default is now to use 40 lines, not the alt screen (has its own drawbacks) You can set “inline_height” https://docs.atuin.sh/guide/basic-usage/#inline-window

Thank you. In might try it again some day.

Re: Atuin – Magical Shell History

#52
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

Re: Atuin – Magical Shell History

#53
post #41

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?

I have been a reluctant adopter of Atuin.

I don't use the sync feature, but I will say that "my workflows are very machine specific" is one of the reasons I use Atuin. When working in containers, I sometimes share an Atuin database volume between them, to save history relevant to those containers.

On MacOS the main reason I reach for Atuin is that I have never been able to get ZSH to store history properly. Atuin saves history to SQLite, which so far has been much more reliable. It also enables some nice features like being able to search commands run from the same directory.

Re: Atuin – Magical Shell History

#54
post #19
post #6

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…

(dev here!) thank you so much! I love to hear things like this <3

I hadn't heard of this until just now, and I already can't imagine living without it. Thank you!

Re: Atuin – Magical Shell History

#55

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.

The sort order is strange, I agree. I forked Atuin awhile back with the goal of adding more strategies, but it was tougher than I expected. IIRC, changing search order involves updating both the DB queries and how the application code interacts with them.

Re: Atuin – Magical Shell History

#56
post #20

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 :)

I use fish + atuin. I leave the "Up" arrow set to use fish's default history search (see https://docs.atuin.sh/faq/#how-do-i-remove-the-default-up-ar...), which keeps the UI minimal when just going back one or two commands, then use atuin via Ctrl+R when I need to find a command from earlier in my history. At that point Atuin provides a nicer UI for searching the history.

Re: Atuin – Magical Shell History

#57
post #25

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.

I self host a atuin server.

It is a very easy thing to do.

You can use atuin without syncing it between multiple machines.

I have my shell environments divided up into different distrobox containers. Some of them sync between multiple machines. Some of them don't. Depends what the shell is for.

Re: Atuin – Magical Shell History

#58
post #17

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…

our sync is opt-in + optional, e2e encrypted, and self-hostable. if that's not enough, you can disable all network features via a feature flag at compile time if you don't care for sync, there are a bunch of other projects doing this (and supporting several shells), eg: - mcfly: https://github.com/cantino/mcfly - resh: https://github.com/curusarn/resh

I am happy Atuin user now, but I was initially worried that it would sync my data unless I explicitly disabled that feature. The fact that it's opt-in becomes clear once you read the docs and understand how it works, but it might be worth emphasizing that on the landing page. Currently it says:

    Shell history sync
    Sync your shell history to all of your machines, wherever they are
In any case, thanks for building a great tool!

Re: Atuin – Magical Shell History

#59
post #40
post #35

Earlier quoted context omitted.

now please give us the cloud history feature opt-out by default please please. cheers

You already have it Nothing syncs without you registering an account or logging in

lovely. I vaguely remember back when I first signed on, it wasn't opt-out by default so I assumed it stayed the same. disregard my quip! hahaha

Re: Atuin – Magical Shell History

#60
post #35

Earlier quoted context omitted.

now please give us the cloud history feature opt-out by default please please. cheers

did you even try to read the web page documentation? or the previous answer to that same question you asked? it doesn't send anything by default...

it could've been back in the day when I first installed it. glad to have it resolved tho. take it easy man
Post reply on HN