Live data from Hacker News

Atuin replaces your existing shell history with a SQLite database

github.com

161–170 of 198 posts

Re: Atuin replaces your existing shell history with a SQLite database

#161

Earlier quoted context omitted.

This is so insane that I love it. Do you also save your belly button lint since 2005? Or nail clippings? :)

I'm only a digital packrat. Bits are so much cheaper to hoard, even deciding to throw something away is often more work.

This is more like saving your old notebooks and drafts, only that they don't take any meaningful space. Or like having a revision control system.

Do you rebase your git repos regularly to delete commits older than 6 months?

Re: Atuin replaces your existing shell history with a SQLite database

#162
post #136

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

We’d like to be able to also export history, but atuin doesn’t actually stop your old shell history from functioning either So you could uninstall it, and you won’t have lost a thing

Sounds good, thank you! I'll start playing with it.

Re: Atuin replaces your existing shell history with a SQLite database

#163

I have been using sqlite database since 2017 [1], has over 100,000 items in the database at this point. The database is almost 0.5GB, but I also use Full-Text-Search capabilities of sqlite. 2 years ago I have built a mac application [2], that syncs items via iCloud, and it only works on the macOS. I would highly recommend anyone who spend a lot of time in terminal to improve their shell history by using atuin or simi…

Wow so it looks like I'm in the minority in having shell command history disabled? I have a small number of commands (20) that go into the live history of login shells for convenience, but nothing gets saved when I log out. If there's something I do repeatedly, I make an alias or a function for it.

I think you have an unusual take on this. Why do you disable history?

Re: Atuin replaces your existing shell history with a SQLite database

#164

Earlier quoted context omitted.

Wow so it looks like I'm in the minority in having shell command history disabled? I have a small number of commands (20) that go into the live history of login shells for convenience, but nothing gets saved when I log out. If there's something I do repeatedly, I make an alias or a function for it.

I think you have an unusual take on this. Why do you disable history?

People's history files are a great place to look for passwords and other secrets, mainly. I suppose that risk could be reduced by having the history file encrypted on disk, but I don't know of any shell that does that (can't honestly say I've really looked though).

Re: Atuin replaces your existing shell history with a SQLite database

#166

How does this compare to McFly? https://github.com/cantino/mcfly

I see two major differences: - how active the development is[1] - having a distributed option (McFly does not have one) 1. Seeking co-maintainers: I don't have much time to maintain this project these days. If someone would like to jump in and become a co-maintainer, it would be appreciated!

Are you the dev of mcfly or atuin? (I keep wanting to call it Alduin. Gamer here.)

Re: Atuin replaces your existing shell history with a SQLite database

#167
I have a problem where my shell history seems to be… inconsistent or different if I have multiple terminal tabs open.

Is there a way to say, “I don’t care about which terminal a command is written to, just log them all chronologically in the same file”?

Would this SQLite approach work that way?

Re: Atuin replaces your existing shell history with a SQLite database

#168

Earlier quoted context omitted.

Isn't that like... ultra slow?

Copilot is highly usable and I'm pretty sure it works the same way.

Copilot also runs a small model on the users machine to quickly provide simple predictions.

Re: Atuin replaces your existing shell history with a SQLite database

#170
post #59

I have been using sqlite database since 2017 [1], has over 100,000 items in the database at this point. The database is almost 0.5GB, but I also use Full-Text-Search capabilities of sqlite. 2 years ago I have built a mac application [2], that syncs items via iCloud, and it only works on the macOS. I would highly recommend anyone who spend a lot of time in terminal to improve their shell history by using atuin or simi…

At 0.5GB that's 5k per entry -- what are you storing for each? For comparison, my (non-work) history since 2012 (plain text) is 181k entries, and takes 25MB. I store the command along with when and where you ran it. ( https://www.jefftk.com/p/logging-shell-history-in-zsh )

As a lot of people mentioned. This is FTS index. So it is definitely way more blown up. Plus I do save a lot of additional information with it: pwd, session id, shell used, exit codes, whole command obviously. And to support icloud, also additional information for icloud entity id. And now when you point out, 5k per entry is a lot of data. But I am on with that. This information really important for me.
Post reply on HN