Ask HN: Is there a Jupyter Notebook for terminal/shell
When I learn new tools like Docker for example there are a number of new commands and syntax I am picking up along the way.
I want to "SAVE" my work -- the commands I used and the output I got -- as a "Notebook" similar to how we do for Python notebooks using Jupyter. Also add some markdown notes or links to reference material or tutorials I am following.
This allows me to revisit my work of yesterday / last month / last year and quickly review what I already "know" (or relearn quickly following the same path) and then go to next logical step.
Is there such a tool or solution?
Thanks in advance
20 comments
[ 3.3 ms ] story [ 56.1 ms ] threadYou can save what you type with the 'script' command.
Will save everything you type and their output to the test_session file until you exit the shell with Ctrl-DLook up "man script" for more details (funny it mentions 'typescript' but it is not that typescript)
(and while I joke about 'kids these days' I learned this from the UNIX greybeards so there's that as well)
But that's exactly what an alias is. Put it on a script that you source when loading the terminal and there you have it
Or you could have a "commands.txt" where you copy/paste commands
Though yeah, maybe there should be a better solution (well, you can always look back history as well)
however, I am hoping for something that is far more interactively editable (like going up a couple of cells, editing and re running them in context) and also allows annotations / markdown / hyperlinks etc interspersed among the cells
PS: I am also on Windows a lot of time
Side-note: is the inverse of this available? E.g. open a jupyter notebook from in the middle of a python script
[1] https://code.visualstudio.com/docs/python/jupyter-support-py...
I have also given it a shortcut: `Ctrl+e, e`. So I can just select something and execute it in the terminal. Works quite well.
(Inspired by a similar feature in Emacs)
For example, in an org doc you can have something like this:
> ipython
You can use the %save magic command to save your session, there's lots more, check the documentation to discover it.
Edit: But I do not know of an integrated, comfortable way to combine asciinema and markdown. Enhancing the asciicast format with (markdown) comments and make the asciicast players display them would be nice.
It sounds like exactly what you are after.
[1] https://github.com/joouha/euporie
- the xonsh (a full-featured unix shell, in python) kernel with jupyter
- the acme editor, using `win` to give you a dumb terminal access to your shell (or indeed any repl). As well as being a shell/repl, you can also treat that window as a text buffer, manipulating it and saving it as such (very liberating feeling, in practice)