npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

debug-bridge-cli

v0.1.2

Published

CLI for debug-bridge - WebSocket server for AI agent debugging

Readme

debug-bridge-cli

CLI for debug-bridge - WebSocket server for AI agent debugging of web applications.

Installation

npm install -g debug-bridge-cli

Or run directly with npx:

npx debug-bridge-cli connect --session myapp

Usage

Start the Server

debug-bridge connect --session myapp

Options:

  • -p, --port <number> - Port to listen on (default: 4000)
  • -s, --session <string> - Session ID (default: 'default')
  • --host <string> - Host to bind to (default: 'localhost')
  • --json - Output JSON for programmatic use

Connect Your App

Open your web app with debug params:

http://localhost:5173?session=myapp&port=4000

Interactive Commands

Once an app is connected, use these commands:

debug> ui                    # Get interactive UI elements
debug> find login            # Search for elements matching "login"
debug> click button-abc123   # Click element by stableId
debug> type input-xyz "hello" # Type text into input
debug> screenshot            # Capture viewport screenshot
debug> state                 # Get cookies, localStorage, etc.
debug> eval document.title   # Execute JavaScript
debug> navigate https://...  # Navigate to URL
debug> help                  # Show all commands

Command Aliases

| Command | Aliases | |---------|---------| | ui | tree | | eval | js | | snapshot | dom | | screenshot | ss | | navigate | goto, go | | find | search | | help | ? |

JSON Mode

For programmatic use (e.g., piping to other tools):

debug-bridge connect --session myapp --json

In JSON mode:

  • All output is JSON-formatted
  • Input can be JSON command objects
  • Screenshots are saved to files

Example Session

$ debug-bridge connect --session demo

🔌 Debug Bridge v0.1.0
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Server: ws://localhost:4000/debug
Session: demo
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Waiting for app connection...
Type "help" for available commands.

✓ Connected: My App 1.0.0
  URL: http://localhost:5173/
  Viewport: 1920x1080

debug> ui
[ui_tree] 6 elements
   1. [button   ] login-btn     "Sign In"
   2. [input    ] email-input   placeholder: "Email"
   3. [input    ] password-input placeholder: "Password"
   4. [a        ] forgot-pwd    "Forgot password?"
   5. [a        ] signup-link   "Create account"
   6. [button   ] theme-toggle  [Toggle theme]

debug> click login-btn
✓ click (12ms)

debug> screenshot
[screenshot] 1920x1080 saved to screenshot-1704067200000.png

Programmatic Usage

import { startServer } from 'debug-bridge-cli';

const server = startServer(
  { port: 4000, host: 'localhost', session: 'myapp', json: false },
  {
    onAppConnected: (hello) => console.log('App connected:', hello.appName),
    onAppDisconnected: () => console.log('App disconnected'),
    onTelemetry: (msg) => console.log('Telemetry:', msg.type),
    onCommandResult: (msg) => console.log('Result:', msg.success),
  }
);

// Send a command
server.sendCommand({
  type: 'click',
  target: { stableId: 'login-btn' },
  requestId: 'cmd-1',
  protocolVersion: 1,
  sessionId: 'myapp',
  timestamp: Date.now(),
});

// Cleanup
server.close();

License

MIT