Srcbook (”source-book”) is an open-source TypeScript notebook that runs locally, powered by Node.js. It shines for rapid prototyping, code exploration, and collaborating on ideas. It’s inspired by Python’s Jupyter and Elixir’s Livebook.<p>Key features:<p>- Full npm ecosystem access<p>- AI-assisted coding (OpenAI, Anthropic, or local models), it can iterate on the cells for you with a code diff UX that you accept/reject for a given code cell, generate entire Srcbooks, fix compilation issues, etc…<p>- Exports to valid markdown for easy sharing and version control<p>Try it now: `npx srcbook start`<p>Examples Srcbooks to explore: <a href="https://hub.srcbook.com">https://hub.srcbook.com</a><p>We built this because we needed a Jupyter-like environment for TypeScript, we hope others like it as much as we do! Feedback and contributions are super appreciated.<p>(edit: formatting)
Nice, if you could run wasm inline, one could conceivably use it for rust debugging or typst like this:
<a href="https://github.com/Myriad-Dreamin/typst.ts">https://github.com/Myriad-Dreamin/typst.ts</a><p>Also see this jupyter notebook request <a href="https://github.com/typst/typst/issues/962">https://github.com/typst/typst/issues/962</a>
I think this really nails a missing sweet spot for frontend/node projects.<p>Observable is a great notebook env for dataviz, but the bespoke js + observability patterns can feel obtuse for non-dataviz stuff.<p>Likewise, the Jupyter js kernels feel second-class and require python dependencies.<p>Really looking forward to using this for documenting open-source and prototyping.
Really awesome to see this stuff continued to be worked on. I had a small project I worked on almost a decade ago <a href="https://github.com/gabrielcsapo/node-notebook">https://github.com/gabrielcsapo/node-notebook</a>, things have gotten so much better.
To those concerned about the analytics like myself, you should be able to turn it off by setting the default here to false. Otherwise you'd need to toggle it off in the settings, which gives ample time for telemetry to fire.<p><a href="https://github.com/srcbookdev/srcbook/blob/ddda46a0b1249c3d7cddee2c3d10baec8db274df/packages/api/db/schema.mts#L12">https://github.com/srcbookdev/srcbook/blob/ddda46a0b1249c3d7...</a>
Love that this is local. I've messed around trying to get Node on Jupyter with custom kernels, but never got close to a working setup with TypeScript.<p>Two features would be huge:<p>1. Web cells for intermixing UI components alongside NodeJS cells. Would be cool if there was a bridge API to call code in the Node cells as well.<p>2. VSCode extension to render this all in there directly.
This is a cool idea! I often end up just using replit to play with a library, something more like Livebook makes a lot of sense. I like that you're using markdown too, makes these files much more useful than Jupyter ones.
Very nice. I am trying using ollama with it, looks like something is off either on my server or in the way the program calls it: I get the CPU used instead of the GPU (while using ollama in other apps doesn't).<p>Anyway, impressive
I hate to be negative, but I'm not entirely sure why this is advantageous over just dumping a bunch of HTML files into a folder. Why can't the code live in <script type="module">'s with `display: block` tagged, using esm.sh for libraries? Why do we have to use Markdown that has to get transpiled over a format that can be natively consumed by the browser?