TypeScript, as in deno jupyter
TS, TSX, enums, top-level await, and const redeclaration
across cells. Cells run untyped, as in Deno; typed globals are available for your editor.
Jupyter kernel · TypeScript · JavaScript runtimes
cdp-kernel is Deno's Jupyter kernel, extracted so the code in your cells can run on Node or Deno. It also runs cells on Bun, workerd and celld. The kernel speaks the Jupyter protocol; your cells run in the runtime you pick.
Binder opens a notebook in your browser with nothing to install. Or install it, or open it in Codespaces.
# Node 22.18+ host
npm install -g @tlockney/cdp-kernel
cdp-kernel install --runtime node
# or deno; also bun, workerd, celld
# Deno host
deno run -A jsr:@tlockney/cdp-kernel/cli \
install --runtime deno
# JupyterLab, every runtime, the examples
docker run --rm -p 8888:8888 ghcr.io/tlockney/cdp-kernel
Each install writes a kernelspec (cdp-node, cdp-deno,
cdp-bun, …). Choose it in JupyterLab or VS Code and write TypeScript.
Imports from npm and JSR install on first use.
Cells display rich output through a global jupyter:
jupyter.display, md, html, svg,
image, and Symbol.for("Jupyter.display") for your own types.
It is ported from Deno's Deno.jupyter, which is the same object on
cdp-deno.
import { format } from "npm:date-fns@4";
const now: Date = new Date();
await jupyter.display(
jupyter.md`**Today** is ${format(now, "PPPP")}`,
);The docs are grouped by how much you already know.
What notebooks and kernels are, installing, and a first notebook. No Jupyter or Deno background needed.
GuideImports and packages, rich output with the jupyter namespace, choosing a
runtime, widgets and the debugger.
How the kernel was extracted from Deno, how cells become runnable code, and how each runtime is driven.
deno jupyterTS, TSX, enums, top-level await, and const redeclaration
across cells. Cells run untyped, as in Deno; typed globals are available for your editor.
npm: and jsr: importsInstall on first use into a shared cache. An optional
cdp-kernel.lock.json pins every resolved version, so a notebook gets the same
packages on another machine.
Inside a Deno project, the kernel uses its import map, node_modules and JSX
settings. Inside a Workers project, env holds the project's bindings and
worker is its default export.
JupyterLab's debugger works on Node and Deno targets: breakpoints in the cell gutter, stepping, the call stack, scopes and variables, mapped back to your TypeScript.
jupyter.table for rows, Arrow, Polars and DuckDB results,
jupyter.sql over an in-memory DuckDB, and jupyter.chart for
Vega-Lite, Vega or Plot as one SVG, each with a text summary. SQL and charts run on every
target but workerd and celld.
anywidget-style widgets with two-way state sync in JupyterLab, Notebook 7 and VS Code, plus the comm API underneath for other protocols.
prompt() and confirm() over stdin, interrupt that keeps state,
Shift-Tab inspection and completion that never run getters, and cell history.
Node and Deno are the main targets, and the ones with the debugger. The kernel host runs on either, and cells run in a separate target process.
| Target | How cells run | Debugger |
|---|---|---|
| Node | Chrome DevTools Protocol over the inspector. Optional Deno compatibility namespace. | Yes |
| Deno | Chrome DevTools Protocol, with the real Deno.jupyter namespace. | Yes |
| Target | How cells run | Debugger |
|---|---|---|
| Bun | In-process, over a private pipe. Bun's inspector speaks WebKit's protocol, not CDP. | No |
| workerd | Inside a driver Worker's request, so fetch, timers and bindings work. Runs on Miniflare in a Workers project. | No |
| celld | The same driver Worker on celld, with the project's bindings copied in. | No |
Ganymede is a Jupyter server written in Rust, with cdp-kernel as its first-class kernel. With it, a TypeScript notebook can also:
jupyter.params in, jupyter.result() out,
from the command line, a link, a Shortcut or another notebook.
Notebooks as programs# after installing Ganymede
npm install -g @tlockney/cdp-kernel
cdp-kernel install --runtime node
ganymede lab
Deno 2.9's kernel is already two halves: the Jupyter wire protocol in plain JS, and a REPL
isolate driven by CDP calls. cdp-kernel ports the protocol half to node:net and
node:crypto, and points the CDP half at another runtime's inspector.
esbuild and acorn replace what Deno's module loader did.
Early software. It passes a conformance suite derived from Deno's own Jupyter integration tests on every target, on Linux and macOS, against Node 22, 24 and 26 and Deno 2.9 and later. Windows isn't supported yet.