Skip to main content
The Trace CLI (trace) is your terminal-based intelligence engine. It allows you to debug deployed sites, local servers, and production apps directly from your command line.

🚀 Installation

# Install globally
npm install -g @probebrowser/cli

# Or run just-in-time
npx @probebrowser/cli <command>

🔑 Authentication

Most advanced features (AI Analysis) require an API key.
export TRACE_API_KEY=sk_live_...

# OR pass it explicitly
trace analyze https://example.com --api-key sk_live_...

🛠️ Main Commands

1. trace analyze <url> (Alias: a)

The most powerful command. It connects to the page, plans a debugging strategy, and executes it using AI.
trace analyze http://localhost:3000
Options:
  • -q, --query <text>: Ask a specific question (e.g., “Why is the cart empty?”).
  • --no-headless: Watch the browser interactions in real-time.
  • --json: Output raw JSON for CI/CD pipelines.

2. trace repl <url> (Alias: r)

Starts an Interactive Debugging Session. You can type questions to the AI or run slash commands.
trace repl http://localhost:3000
REPL Commands:
  • /debug: Run a full scan.
  • /errors: Show console errors.
  • /eval <js>: Run JavaScript in the browser context.
  • /screenshot: Capture the current view.
  • Why is the font wrong?: Ask the AI directly.

3. trace debug <url> (Alias: d)

Runs a standard comprehensive scan (Console + Network + DOM) without a specific user query.
trace debug https://staging.myapp.com

⚡ Quick Tools

Console & Errors

Check for runtime exceptions.
trace errors http://localhost:3000

Network Analysis

Find failed requests (404, 500) and performance bottlenecks.
trace network http://localhost:3000 --failed

Performance

Get Core Web Vitals (FCP, LCP) and a breakdown of JS heap usage.
trace perf http://localhost:3000

Accessibility

Run an automated a11y audit (contrast, aria labels).
trace a11y http://localhost:3000

Health Check

Simple pass/fail check for CI/CD. Returns exit code 0 (Healthy) or 1 (Issues).
trace health http://localhost:3000

🔍 Inspection

Inspect Element

Get the DOM properties, visibility, and calculated styles of an element.
trace inspect http://localhost:3000 "#submit-btn"

List All Tools

See the full list of 96+ variable tools available to the engine.
trace tools