cyberneticlibrary

Debug JavaScript with Chrome DevTools REPL

chrome-jigskillsetup L20
npm:chrome-jig
What it does

Evaluate JavaScript in any browser tab from terminal via Chrome DevTools Protocol

Best for

Developers debugging JavaScript without DevTools UI or coordinating MCP browser tools with cjig via shared CDP port.

Inputs
  • · JavaScript code, optional --tab filter, file to inject
Outputs
  • · Evaluated result; injected script state; connection details for MCP browser tools
Requires
  • · Chrome with CDP debugging enabled
  • · nREPL for ClojureScript (optional)
Preconditions

Chrome installed; cjig launched via cjig launch

Failure modes
  • · CSP blocks inline script (CSP bypass works)
  • · Chrome not running or CDP port wrong
  • · ClojureScript nREPL setup not initialized
Trust signals
  • · Bypasses Content-Security-Policy via CDP Runtime.evaluate
  • · Named script injection with file watch auto-reload
  • · Editor-native nREPL for Neovim/Conjure