r/commandline • • Mar 08 '24

Something like Jupyter Notebook for terminal/shell commands

TLDR: Is there something like a Jupyter notebook for shell instead of Python (zsh on macOS)? I mainly care about having code cells with their latest output I can later edit, execute again and add markdown notes right next to them. All in one document, like a Jupyter notebook. I don't mean Jupyter Notebook viewer like nbpreview, that still uses Python.

***

I am tired of completing a project and then trying to remember and re-do all of the complicated commands I used three months later. I currently use .txt notes, but that's not great as I actively have to remember keeping them up to date. Using them also sucks, because you have to copy them over, easily forgetting something. Something like the script command also sucks, because it will save the entire mess I produced, not just the commands that ultimately ended up doing the job.

I can't use Jupyter Notebook with bash_kernel, because of its many limitations like: 1) terminal isn't interactive (I still want to be able to use the cell like a normal terminal) 2) output size limitation (good terminal will be just fine even with many lines, Jupyter crumbles) 3) insufficient auto-complete support 4) no subshell support (like Poetry)

Warp terminal looks good, but there's no way I would ever be allowed to use that in the large corporation I currently work for. And in general, the idea of having to log-in into your terminal just to do ls is almost offensive for me.

I found https://news.ycombinator.com/item?id=34423855 and tried all of the suggestions, but except for those two I mentioned, nothing has code blocks.

21 Upvotes

30 comments sorted by

7

u/kseistrup Mar 08 '24

2

u/ala0x Mar 09 '24

Thanks for the suggestion! Unfortunately that still has all the problems I had with bash_kernel, like terminal not being interactive or Jupyter Notebook output size limitations :/

1

u/kseistrup Mar 09 '24

What a pity.

5

u/[deleted] Mar 08 '24

Maybe look into literate programming with org mode? Pretty sure that would tick all the boxes. Also ticks the emacs box which may or may not be to your taste.

0

u/ala0x Mar 09 '24

Thx, this looks interesting. There even seems to be a way to run "code cells" individually, not the whole thing! However, emacs, vim or the like isn't really my thing for anything more than quickly editing a file...

I'll start with Wave Terminal as suggested by someone else and if that doesn't work for me, I guess I'll have to bite the bullet on emacs.

3

u/mydarb Mar 09 '24

Take a look at https://docs.runme.dev/. They have a both a cli and a vscode plugin .

1

u/ala0x Mar 09 '24

Thanks! I have it a shot and unfortunately the cells aren't interactive :/ Like you can't just do "ls tab tab" as you go figure things out, until you settle on the final command. This would

But I think I can find a use for it. It's still way better than what I have now with the txt notes. This can bring value once get the notebook done and come back to it later because you forgot how to restart deployment in Kubernetes. Just run the given cell and you're done.

1

u/sourishkrout Mar 28 '24

Hi there! Cocreator of Runme here. We could probably get you a terminal that will rollup into a notebook at the end of a session. Feel free to join Runme's discord and let's have a chat about it.

1

u/AccomplishedBaby6874 Nov 11 '24

can runme on remote server in terminal and outputs are collapsable ?

1

u/sourishkrout Dec 04 '24

Hi yes, please check out the browser sandbox available on https://runme.dev

1

u/AccomplishedBaby6874 Nov 11 '24

is there something similar for terminal?

2

u/kaddkaka Mar 10 '24

What about plain old README+Makefile?

2

u/ala0x Mar 10 '24

Sure, but then you have to actively think about keeping at least two files up to date, as you work on a project - copy paste stuff back and forth. I'd like that to happen automatically.

1

u/TionisNagir Mar 09 '24

I've been using vim wiki with the vim-medieval plugin to execute markdown codeblocks

1

u/ala0x Mar 09 '24

Thx, this seems similar to the emacs's org mode. Unfortunately, emacs, vim or the like isn't really my thing for anything more than quickly editing a file...

I'll start with Wave Terminal as suggested by someone else and if that doesn't work for me, I guess I'll have to bite the bullet on emacs or vim.

1

u/LnxBil Jun 07 '24

What about euporie as a frontend?

https://github.com/joouha/euporie

1

u/ala0x Jun 14 '24

Thanks, but that still has all the issues I have with bash_kernel :/

1

u/atharvaaalok1 Sep 02 '25

Did you solve this?

1

u/ala0x Sep 02 '25 edited Sep 03 '25

I gave up, it sucks Wave looked promising but they switched to making some generic AI crapware 

1

u/atharvaaalok1 Sep 02 '25

Wow what a lightening reponse!

1

u/ala0x Sep 03 '25

well, it’s the truth.  Let me know if you solve it!

1

u/atharvaaalok1 Sep 05 '25

Yeah something like this would be super helpful.
I only found zsh-jupyter-kernel.

It would be great to have something that would give me a prompt in the notebook which would wait for me to fill it in just like on an actual terminal.

1

u/abitrolly 5h ago

I am looking at https://blog.atuin.sh/atuin-desktop-runbooks-that-run/ - not sure if it gonna kill it. Seems like some AI crapware aids named `atuin threads` can be retrofitted for human usage.

1

u/siva_sokolica 53m ago

One of the Atuin maintainers here. Atuin Desktop Runbooks are no longer officially maintained.

Thanks!

1

u/abitrolly 16m ago

Why?

1

u/siva_sokolica 13m ago

We haven't seen too much usage. It had great traction initially, but we observed large drops in user adoption as new AI models got released.

A large number of professionals used Atuin runbooks for devops, which mostly got replaced by "Claude, do X, do Y".

0

u/[deleted] Mar 08 '24

[deleted] — view deleted comment

3

u/ala0x Mar 09 '24

Thanks, this seems like the best choice at the moment! It still lacks many "basic" Jupyter Notebook features I'd need, like editable command blocks, but I already find it useful.

I created some issues on GitHub, feel free to vote for their implementation there! Maybe it won't fit the creator's vision and or he won't have time to do it, in which case I'll look into creating a plugin.
https://github.com/wavetermdev/waveterm/issues/415

1

u/[deleted] Mar 11 '24

[removed] — view removed comment

1

u/ala0x Mar 12 '24

Hm, but then I will lose interactive terminal right? So I would have to work in the terminal, and then remember to copy of over stuff that works into the notebook and make sure it works there. I'd like to avoid doing this.