A Bun + TypeScript Chrome DevTools Protocol (CDP) client with a terminal UI (Ink) for:
- Logs: console output + exceptions (supports selecting each line and expanding objects)
- Network: request list with expandable request/response details (JSON responses are automatically formatted)
- Eval: run JavaScript in the attached page from the terminal
- Google Chrome (or Chromium-based browser)
Quit any running Chrome first (Cmd+Q), then run:
open -na "Google Chrome" --args \
--remote-debugging-port=9222 \
--user-data-dir=/tmp/chrome-cdpVerify CDP is reachable:
curl http://127.0.0.1:9222/json/versionScreen.Recording.2025-12-19.at.10.33.33.mov
npm install -g @taotao7/termdev
# or develop locally
bun install
# or with npm
npm installThis project uses Bun's bundler to create a single executable file that works with both Node.js and Bun:
bun run buildThe build script uses target: "node" to ensure compatibility with both runtimes. The bundled file is output to bin/termdev.js and can be run directly with either node or bun.
# After installation (uses bundled file)
termdev
# or inside this repo (development mode):
bun run termdev # Using Bun (runs source directly)
npm run termdev # Using Node.js with tsx (runs source directly)
npm run termdev:bun # Explicitly use Bun (runs source directly)
# Run the bundled file directly:
node bin/termdev.js # Works with Node.js
bun bin/termdev.js # Also works with BunNote: The bundled bin/termdev.js file works with both Node.js and Bun runtime. For development, the source TypeScript files are run directly using tsx (Node.js) or bun (Bun).
Common options:
# auto attach by title/url substring (or numeric index)
termdev --target "example.com"
# change port
termdev --port 9333
# auto refresh targets every N ms (0 disables)
termdev --poll 1000
# include extra websocket frame logs
termdev --networkTab: toggle focus between Targets (left) and Right panel (Logs/Network)
j/kor↑/↓: move selectionEnter: attach to selected target
l: switch to Logsn: switch to Network[/]: switch tab
/: search/filter requests by substring (URL/method/status line)Esc/Enter: close searchCtrl+U: clear query
j/kor↑/↓: move selectionPgUp/PgDnorCtrl+U/Ctrl+D: page up/downy: copy selected line to clipboardz: expand/collapse selected node (expand Response Body to view formatted JSON)Z: collapse the current region (closest expanded parent)f: follow tail (manually enable auto-scroll to latest entries)c: clear logs (in Logs tab) or clear network requests (in Network tab)
Note: New network requests are added to the list without automatically moving the cursor. Press f to enable auto-follow if you want to track new requests automatically.
:: open inputEnter: runEsc: cancel
q/Esc/Ctrl+C