Jupyter kernel · TypeScript · V8

TypeScript notebooks on any V8 runtime.

cdp-kernel is Deno's Jupyter kernel, extracted so the code in your cells can run on Node, Deno, Bun, workerd or celld. The kernel speaks the Jupyter protocol; your cells run in the runtime you pick.

# Node 24+ host
npm install -g @tlockney/cdp-kernel
cdp-kernel install --runtime node   # or deno, 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.

The display API is Deno's: jupyter.display, md, html, svg, image, and Symbol.for("Jupyter.display") for your own types.

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

const now: Date = new Date();
await jupyter.display(
  jupyter.md`**Today** is ${format(now, "PPPP")}`,
);

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.

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

The kernel host runs on Node or Deno. Cells run in a separate target process.

TargetHow cells runDebugger
NodeChrome DevTools Protocol over the inspector. Optional Deno compatibility namespace.Yes
DenoChrome DevTools Protocol, with the real Deno.jupyter namespace.Yes
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

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 24 and 26 and Deno 2.9 and later. Windows isn't supported yet.