TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Srcbook – A TypeScript notebook for rapid prototyping

267 pointsby nichochar9 months ago
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&#x2F;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:&#x2F;&#x2F;hub.srcbook.com">https:&#x2F;&#x2F;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)

18 comments

fsiefken9 months ago
Nice, if you could run wasm inline, one could conceivably use it for rust debugging or typst like this: <a href="https:&#x2F;&#x2F;github.com&#x2F;Myriad-Dreamin&#x2F;typst.ts">https:&#x2F;&#x2F;github.com&#x2F;Myriad-Dreamin&#x2F;typst.ts</a><p>Also see this jupyter notebook request <a href="https:&#x2F;&#x2F;github.com&#x2F;typst&#x2F;typst&#x2F;issues&#x2F;962">https:&#x2F;&#x2F;github.com&#x2F;typst&#x2F;typst&#x2F;issues&#x2F;962</a>
评论 #41300507 未加载
jwilber9 months ago
I think this really nails a missing sweet spot for frontend&#x2F;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.
gabrielcsapo9 months ago
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:&#x2F;&#x2F;github.com&#x2F;gabrielcsapo&#x2F;node-notebook">https:&#x2F;&#x2F;github.com&#x2F;gabrielcsapo&#x2F;node-notebook</a>, things have gotten so much better.
prophesi9 months ago
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&#x27;d need to toggle it off in the settings, which gives ample time for telemetry to fire.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;srcbookdev&#x2F;srcbook&#x2F;blob&#x2F;ddda46a0b1249c3d7cddee2c3d10baec8db274df&#x2F;packages&#x2F;api&#x2F;db&#x2F;schema.mts#L12">https:&#x2F;&#x2F;github.com&#x2F;srcbookdev&#x2F;srcbook&#x2F;blob&#x2F;ddda46a0b1249c3d7...</a>
评论 #41302901 未加载
评论 #41302801 未加载
bilalq9 months ago
Love that this is local. I&#x27;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.
评论 #41302517 未加载
adamddev19 months ago
Does this include, or are there plans for MDX&#x2F;React component support? That would be amazing and I would use it extensively.
评论 #41296542 未加载
xixixao9 months ago
How does it compare with Observable? <a href="https:&#x2F;&#x2F;observablehq.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;observablehq.com&#x2F;</a>
评论 #41296843 未加载
评论 #41297944 未加载
评论 #41306907 未加载
mcintyre19949 months ago
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&#x27;re using markdown too, makes these files much more useful than Jupyter ones.
评论 #41300473 未加载
评论 #41300798 未加载
tcsenpai9 months ago
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&#x27;t).<p>Anyway, impressive
gryzzly9 months ago
Very cool! I wish there was also a &quot;browser&quot; cell, so that the execution wouldn’t be happening in the node.
评论 #41300539 未加载
aabbcc12419 months ago
The examples are complete programs.<p>Can I let-declare an variable in one code block, and refer to it in another code block with static type hint?
mlejva9 months ago
This looks interesting. What are some of the coolest srcbooks you have seen so far?
评论 #41291961 未加载
jumploops9 months ago
I’ve always wanted a TypeScript-based Jupyter notebook, thanks for building this!
评论 #41297663 未加载
ashobeiri9 months ago
This is really cool, looking forward to trying it out. Love the name as well
h1fra9 months ago
Very nice, how do you run the code? is it securely sandboxed?
评论 #41300532 未加载
fkilaiwi9 months ago
this is awesome. how do you plan to monetize this?
评论 #41296561 未加载
bityard9 months ago
Jupyter can run JS kernels these days.
评论 #41296849 未加载
评论 #41298008 未加载
评论 #41309393 未加载
mbo9 months ago
I hate to be negative, but I&#x27;m not entirely sure why this is advantageous over just dumping a bunch of HTML files into a folder. Why can&#x27;t the code live in &lt;script type=&quot;module&quot;&gt;&#x27;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?
评论 #41298493 未加载
评论 #41299627 未加载