@openrouter/cli
v1.0.0
Published
SDK DevTools and utilities for OpenRouter development
Readme
OpenRouter DevTools CLI
SDK DevTools and utilities for OpenRouter development
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/cliCommands
DevTools Viewer
Launch the SDK DevTools viewer to visualize telemetry:
openrouter devtoolsOpens web UI at http://localhost:4983
Setup:
Install devtools in your project:
npm install @openrouter/devtoolsInitialize 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() });Run your app - telemetry is captured to
.devtools/Launch viewer:
openrouter devtools
StatusLine
For Claude Code users, add a statusline showing model and token usage:
openrouter statuslineConfigure 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 testMigration 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
