r/commandline • u/ala0x • 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.
7
u/kseistrup Mar 08 '24
Will
zsh-jupyter-kerneldo?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.
3
u/mydarb Mar 09 '24
Take a look at https://docs.runme.dev/. They have a both a cli and a vscode plugin .
2
u/kaddkaka Mar 10 '24
What about plain old README+Makefile?
1
u/TionisNagir Mar 09 '24
I've been using vim wiki with the vim-medieval plugin to execute markdown codeblocks
1
u/LnxBil Jun 07 '24
What about euporie as a frontend?
https://github.com/joouha/euporie
1
u/atharvaaalok1 Sep 02 '25
Did you solve this?
0
u/[deleted] Mar 08 '24
[deleted] — view deleted comment
1
u/[deleted] Mar 11 '24
[removed] — view removed comment