JSPM

  • Created
  • Published
  • Downloads 155
  • Score
    100M100P100Q64375F
  • License SEE LICENSE IN LICENSE

SDK DevTools and utilities for OpenRouter development

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@openrouter/cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    OpenRouter DevTools CLI

    SDK DevTools and utilities for OpenRouter development

    npm version

    Features

    • 📊 SDK DevTools Viewer - Visualize OpenRouter SDK telemetry in a beautiful web UI
    • 📈 StatusLine Integration - Claude Code statusline showing model and token usage

    Installation

    npm install -g @openrouter/cli

    Commands

    DevTools Viewer

    Launch the SDK DevTools viewer to visualize telemetry:

    openrouter devtools

    Opens web UI at http://localhost:4983

    Setup:

    1. Install devtools in your project:

      npm install @openrouter/devtools
    2. Initialize SDK with devtools hooks:

      import { createOpenRouterDevtools } from '@openrouter/devtools';
      import { OpenRouter } from '@openrouter/sdk';
      
      const sdk = new OpenRouter({
        apiKey: process.env.OPENROUTER_API_KEY,
        hooks: createOpenRouterDevtools()
      });
    3. Run your app - telemetry is captured to .devtools/

    4. Launch viewer:

      openrouter devtools

    StatusLine

    For Claude Code users, add a statusline showing model and token usage:

    openrouter statusline

    Configure in Claude Code settings to display:

    • Current directory
    • Git branch
    • Model name
    • Input/output tokens

    Configuration

    Optional config at ~/.openrouter/claude-code-proxy.json:

    {
      "LOG": true,
      "LOG_LEVEL": "debug",
      "DEVTOOLS_PORT": 4983,
      "StatusLine": {
        "currentStyle": "default"
      }
    }

    Development

    bun install
    bun run build
    bun test

    Migration from v0.x

    Breaking change: v1.0.0 removes all proxy functionality (start/stop/restart/code commands).

    See MIGRATION.md for details.

    License

    SEE LICENSE IN LICENSE