Jupyter kernel · TypeScript · JavaScript runtimes

TypeScript notebooks on the runtime you choose.

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.

  • v0.17.0
  • MIT license
  • JupyterLab 4 · Notebook 7 · VS Code

Binder opens a notebook in your browser with nothing to install. Or install it, or open it in Codespaces.

A JupyterLab cell that creates a counter widget with jupyter.widget. Below the code, the output is a button reading "count is 3" after three clicks.
A cell in JupyterLab on the Node target. Its output is a widget: each click updates the count in the kernel.
# Node 22.18+ host
npm install -g @tlockney/cdp-kernel
cdp-kernel install --runtime node
# or deno; also bun, workerd, celld

Write a cell, pick a runtime

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.

ts
import { format } from "npm:date-fns@4";

const now: Date = new Date();
await jupyter.display(
  jupyter.md`**Today** is ${format(now, "PPPP")}`,
);
Today is Friday, October 16th, 2026
The cell's output: Markdown rendered under the cell, and saved with the notebook.

Features

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.

npm: and jsr: imports

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

Project-aware

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.

Visual debugger

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.

Tables, SQL and charts

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.

Widgets and comms

anywidget-style widgets with two-way state sync in JupyterLab, Notebook 7 and VS Code, plus the comm API underneath for other protocols.

Interactive

prompt() and confirm() over stdin, interrupt that keeps state, Shift-Tab inspection and completion that never run getters, and cell history.

Runtimes

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.

The frontend sends each cell's code to the kernel host over the Jupyter protocol. The host drives the runtime you picked (Node, Deno, Bun, workerd or celld) in a separate process, and results and output come back to show under the cell.
TargetHow cells runDebugger
NodeChrome DevTools Protocol over the inspector. Optional Deno compatibility namespace.Yes
DenoChrome DevTools Protocol, with the real Deno.jupyter namespace.Yes

Also runs on

TargetHow cells runDebugger
BunIn-process, over a private pipe. Bun's inspector speaks WebKit's protocol, not CDP.No
workerdInside a driver Worker's request, so fetch, timers and bindings work. Runs on Miniflare in a Workers project.No
celldThe same driver Worker on celld, with the project's bindings copied in.No

How each runtime works · Known gaps

With Ganymede

Ganymede is a Jupyter server written in Rust, with cdp-kernel as its first-class kernel. With it, a TypeScript notebook can also:

  • run in the Mac, iPad and iPhone apps, on the device. Apps
  • run like a program: jupyter.params in, jupyter.result() out, from the command line, a link, a Shortcut or another notebook. Notebooks as programs
  • be the record an agent keeps as it works, open live in JupyterLab beside you. Agent journals · Examples

Install Ganymede · Why Ganymede · Getting started

# after installing Ganymede
npm install -g @tlockney/cdp-kernel
cdp-kernel install --runtime node
ganymede lab

How it works

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.

Architecture · Feasibility study

Status

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.