4 ms·
A bit like jupyter notebooks, isn't it?
by mentalgear 8mo ago
A bit like jupyter notebooks, isn't it?
- simonw 8mo agoYes, very much so. It's a much thinner, less feature-rich alternative. It would be interesting to experiment with Jupyter notebooks as an alternative that could work in Claude Code for web. I had a poke around just now and couldn't find an existing CLI tool that lets you build those up a section at a time in the same way as Showboat. I did find this Python library though: uv run --with nbformat python -c ' import nbformat nb = nbformat.v4.new_notebook() nb.cells.append(nbformat.v4.new_markdown_cell("# NBTerm Exploration")) nb.cells.append(nbformat.v4.new_code_cell("import sys\nprint(f\"Python {sys.version}\")")) nb.cells.append(nbformat.v4.new_code_cell("x = [i**2 for i in range(10)]\nprint(x)")) nb.cells.append(nbformat.v4.new_code_cell("sum(x)")) with open("demo.ipynb", "w") as f: nbformat.write(nb, f) ' So you could tell the agent to run code like that and then inspect the `demo.ipynb` notebook later on. It doesn't show the result of evaluating the cells though, you need to run this afterwards to have that happen: uv run --with nbformat --with nbclient --with ipykernel python -c ' import nbformat from nbclient import NotebookClient nb = nbformat.read("demo.ipynb", as_version=4) client = NotebookClient(nb, timeout=60) client.execute() nbformat.write(nb, "demo_executed.ipynb") '
- mentalgear 8mo agoCool, I have to say I find the idea intriguing as a tracability tool in they that LLMs can show you step be step how a program is assembled / an output was generated.
- markusw 8mo agoI think you had a post about marimo notebooks at some point? I think they would be better suited for that. Their representation is just Python, they can run as scripts, and they have native HTML output. But of course, it only works for Python.
- simonw 8mo agoThat's a great idea.
- ichverstehe 8mo agoI am working on a lightweight notebook alternative which is literally just a Python script that can be viewed interactively. Maybe that could be useful? https://harry.vangberg.name/posts/pdit-the-python-un-notebook-for-coding-agents/ https://harry.vangberg.name/posts/pdit-the-python-un-noteboo...
- samuelson 8mo agoI think it's more about the interface than the output. The agent can add stuff to a markdown file with simple cli commands rather than a more complex editor or file interface.