@tlockney/cdp-kernel
v0.12.2
Published
Deno's Jupyter kernel, extracted to run notebooks on Node, Deno, Bun, workerd and celld
Maintainers
Readme
cdp-kernel
A Jupyter kernel for TypeScript and JavaScript, extracted from the one built
into Deno 2.9.6 (deno jupyter), that runs notebooks on several JavaScript runtimes. The kernel
host runs on Node or Deno; the code you type runs in a separate target
runtime: Node or Deno over the Chrome DevTools Protocol, or Bun, workerd and
celld, which evaluate cells in-process. In principle, anything else whose
inspector speaks CDP works too. The kernel can also run inside a web page,
with cells in a Web Worker and no server
(The browser).
Website: https://cdp-kernel.org/ · Docs: cdp-kernel.org/docs
Binder opens JupyterLab with every runtime and the example notebooks, nothing installed. A Codespace does the same in VS Code, with the repository checked out (Install › In a container).
This is early software. It passes a conformance suite derived from Deno's
own Jupyter integration tests on every target, and it's packaged for npm and
JSR as @tlockney/cdp-kernel, but it hasn't seen much real use yet.
The support policy says which
runtime versions and frontends are supported, and what may change before
1.0.
Features
- The
Deno.jupyterdisplay API (jupyter.display,md,html,svg,image, …) on every target. - TypeScript, TSX, top-level
await, andnpm:/jsr:imports, with an optional lockfile. - Deno projects (
deno.jsonimport maps, JSX settings) and Workers projects (wranglerbindings inenv). - JupyterLab's visual debugger on Node and Deno targets.
- anywidget-style widgets and Jupyter comms.
prompt()andconfirm(), interrupt that keeps state, Shift-Tab inspection, completion and history.
Install
Node 22.18+ host, from npm:
npm install -g @tlockney/cdp-kernel
cdp-kernel install --runtime node # or deno, bun, workerd, celldDeno host, from JSR:
deno run -A jsr:@tlockney/cdp-kernel/cli install --runtime denoEach install writes a Jupyter kernelspec (cdp-node, cdp-deno, …). Pick
it in JupyterLab or VS Code. To run notebooks with no Python installed,
serve JupyterLab with
Ganymede. Linux and macOS
are supported; Windows isn't yet. See
Install for --deno-compat, release-day installs on Deno, target runtime
requirements, and installing from a checkout.
JupyterLab with every runtime and the examples, in a container:
docker run --rm -p 8888:8888 ghcr.io/tlockney/cdp-kernelQuick start
import { format } from "npm:date-fns@4";
const now: Date = new Date();
await jupyter.display(jupyter.md`**Today** is ${format(now, "PPPP")}`);Documentation
New to Jupyter? Start with Getting started.
- Guides: Writing notebooks,
The
jupyternamespace, Choosing a runtime, Widgets and comms, Debugger - Reference:
jupyterreference, Widgets and comms reference, Editor types, Known gaps, Support policy - Internals: Architecture, Runtime integrations
- Contributing: CONTRIBUTING.md, Development, Security policy
The feasibility study behind the project covers the design, the alternatives considered (workerd, Bun, rusty_v8, FFI), and the evidence.
License
MIT. Parts are ports of Deno's Jupyter kernel, Copyright 2018-2026 the Deno authors. The debugger's MurmurHash2 follows JupyterLab's (BSD-3-Clause) and Gary Court's (MIT); their notices are in THIRD-PARTY-NOTICES. See Architecture › Provenance.
