Live data from Hacker News

Show HN: Hucksh – A shell with a very good memory

news.ycombinator.com

1–10 of 73 posts

Show HN: Hucksh – A shell with a very good memory

#1
In the deep mists of time (circa 2012), I was playing with the Go standard library, and saw how easy it was to stand up a webserver that let you navigate a remote file system, and I thought it was pretty neat.

I took a look at my shell history and a frequent pattern of commands was "cd, ls, cd, ls, ...". And I thought "I love my keyboard, but you know, point and click might be nice in this context."

And then I thought, "It'd be even cooler if you could run commands there."

Skip forward several years, a few earlier implementations, a name change, and now there's Hucksh(ell), a bash-like shell that makes it easy to do all that.

There's a directory navigation tab, where you can click around to navigate, use forward and back buttons (like a browser), and also a "navigate" mode where you can select the directory to change to with a single keystroke.

The system remembers every directory you do anything in and lets you choose them from a list, which you can order by name, time last used, or frequency of use.

And finally, of course, there are shell tabs where you can run individual commands.

Each command gets its own widget in the UI, separate from the others, in its own tty, with no overlap.

The system saves each command you run, along with its start & stop times, the directory you were in, the result code when it finishes, and (this is the fun part) the command output, all in a sqlite database, on disk. (Disk is cheap, yeah? Might as well do something with it.)

This allows you to do some neat things with history and context.

* Keep the same tab open forever, maintaining months or years of context and history

* Pick up where you left off a month or a year ago

* Pick up where you left off after a system restart (like when you restart your browser and it reopens all your windows and tabs)

* Review everything you've done in a project directory

* Review everything you did yesterday, or a month ago

I hope in the future to make it easy to share history, which could help with new employee onboarding, teaching, asking or answering questions on StackOverflow, documenting a penetration test, or anywhere else you want to easily share your work or consume someone else's work.

Everything is in Go.

* The front-end uses Gio UI, a cross-platform GUI for Go

* The shell itself is https://github.com/mvdan/sh, a bash-like command interpreter

* The terminal emulator is a fork of Darktile (https://github.com/liamg/darktile) with very few changes.

This is not a SaaS. You download code and run the front- and back-end yourself, like ssh/sshd. (Except it doesn't run as root.)

This is a commercial product. Without a license, the app limits you to a single top-level window, with two shell tabs. (Similar to a single iTerm window with two tabs.) With a license, as many windows and tabs as you like.

I'm looking for any kind of feedback whatsoever, positive or negative, from the app itself, to the documentation and other online information, to this very post.

hucksh is currently available for macOS and Linux.

Learn more: https://huckridge.notion.site/Hucksh-overview-2fdcaf7d639145...

Download, etc: https://huckridge.notion.site/Hucksh-online-download-purchas...

Re: Show HN: Hucksh – A shell with a very good memory

#3

So you have a commercial product under a proprietary license, which forks a BSD-3-clause shell and an MIT-licensed terminal emulator? I don't think you can do that. Edit: My apologies. I was mistaken. Carry on :)

I don't follow. Both the BSD 3-clause license and the MIT license allow commercial use. Granted, I might need to double check that I credit them & reproduce their licenses appropriately.

Re: Show HN: Hucksh – A shell with a very good memory

#4
Great project!

I am a happy user of warp.dev They are enhancing the standard terminal experience with a lot of features- some of the same ones in hucksh (they just added showing the directory and other metadata of the command in the history search).

IMHO it's going to be hard to get developers to pay for a terminal when there are a lot of free options. Warp is trying to sell based on team collaboration features- often this is the right model although at the moment their team collaboration features doesn't seem to meet my needs.

Re: Show HN: Hucksh – A shell with a very good memory

#5
post #4

Great project! I am a happy user of warp.dev They are enhancing the standard terminal experience with a lot of features- some of the same ones in hucksh (they just added showing the directory and other metadata of the command in the history search). IMHO it's going to be hard to get developers to pay for a terminal when there are a lot of free options. Warp is trying to sell based on team collaboration features- ofte…

Thanks!

Yeah, I've looked at warp.dev. Funny story: I heard about them from Daniel Martí, aka mvdan, the author of the shell library I'm using.

It looks really neat, though I confess I haven't explored it much; dogfooding, don't'cha know. :) I felt a little threatened by them but also weirdly encouraged, since they got $50M in funding. It made me think that hey, somebody thinks a new experimental shell/terminal is a viable commercial product; why not mine? Also, Warp is pretty expensive by comparison (for teams of 6 or more, anyway; granted it's free for 5 or less).

Yeah, getting people to switch will be difficult, especially since most terminals are pretty rock-solid as far as their actual ncurses emulation, and mine still has some rough edges. I'm hoping that I can at least get a few happy users and go from there.

Thanks again for the kind words!

Re: Show HN: Hucksh – A shell with a very good memory

#7

So you have a commercial product under a proprietary license, which forks a BSD-3-clause shell and an MIT-licensed terminal emulator? I don't think you can do that. Edit: My apologies. I was mistaken. Carry on :)

Isn't this possibility to strip users of the freedoms in derived works exactly what is touted as the "permissiveness" of these licenses?

Re: Show HN: Hucksh – A shell with a very good memory

#8

So you have a commercial product under a proprietary license, which forks a BSD-3-clause shell and an MIT-licensed terminal emulator? I don't think you can do that. Edit: My apologies. I was mistaken. Carry on :)

I don't follow. Both the BSD 3-clause license and the MIT license allow commercial use. Granted, I might need to double check that I credit them & reproduce their licenses appropriately.

Yeah it seems like this guy explicitly doesn't understand the licenses but will go tell people things they cannot do under the licenses anyway. Weird.

Re: Show HN: Hucksh – A shell with a very good memory

#9
Intriguing idea! I love the idea of having a database of the commands you’ve run and their output. I use tmux religiously, but it’s sometimes frustrating using a crappy interface to spelunk my terminal history and manually look for the various commands I’ve run amidst voluminous output. And of course it’ll lose that history when it runs out of buffer.

Question: You refer to this as a shell, but it seems more like a terminal emulator. Am I missing something?

A couple ideas for different ways to achieve the goal:

1. It seems like a web UI rather than a native app would be beneficial for various reasons (run anywhere, connect remotely, coded in the UI lingua franca, etc).

2. I could see value in separating the shell and the history browser. Like the shell is just your shell, and it can be used via whatever terminal emulator that people want to use, or even thru ssh. The only thing the shell does above and beyond any other shell is to pipe stuff to the database. If the user wants to look at history, then they go to the web UX (ala suggestion 1) to do that.

Doing this would make it more palatable for people to start using it because it wouldn’t change the feel of their daily experience, but in the background, they’d be getting the cool features.

Re: Show HN: Hucksh – A shell with a very good memory

#10
post #6

Here's my 2c. It's unlikely that many users, here or elsewhere, would be comfortable downloading and executing this Hacksh binary from your Dropbox, regardless of its benefits.

Thanks, that's good to know. I never thought of that as a stumbling block. I trust me!

Do you think showing an md5 hash would help, or is it just Dropbox itself?

Would (for example) dl.huck.sh be better? (I own huck.sh (and huckridge.com and several others) and have a site there, but don't have anything at dl.huck.sh.)

I actually kind of thought that Dropbox would be better than my own webserver, on the assumption that people would trust them more than me. I dunno.

Post reply on HN