Remix.run Logo
mentalgear 4 hours ago

A bit like jupyter notebooks, isn't it?

simonw 4 hours ago | parent | next [-]

Yes, 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 3 hours ago | parent [-]

Cool, 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.

samuelson 2 hours ago | parent | prev [-]

I 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.