Revvy CLI
An AI-powered CLI assistant that connects your billing providers, scans your codebase for AI calls, generates Revenium metering configuration, and wires up CI checks — all in one guided flow.
Revvy is a one-command wizard that turns a blank codebase — or an existing one — into a fully-instrumented Revenium integration. Instead of stepping through provider connections, SDK installs, config files, and CI wiring separately, Revvy does all of it in an interactive flow and leaves a working setup behind.
Package:
@revenium/revvyon npm
What Revvy Does
In one interactive run, Revvy:
Connects your AI provider billing accounts and scans your codebase — guided setup for OpenAI, Anthropic, AWS Bedrock, Google Vertex AI, and others so Revenium can consolidate spend, plus AST-level detection of every AI SDK call site so you know exactly what's about to be instrumented.
Generates a metering model and instruments your code — a short Q&A captures how you want usage attributed (organizations, products, agents, subscribers), then Revvy writes a config helper tailored to your app and wraps every AI call with the Revenium middleware. Python and Node.js today, with OpenAI, Anthropic, Google GenAI, Vertex AI, and Perplexity.
Wires up CI guardrails — GitHub Action, editor rules for AI coding tools, and a
revvy checkcommand so metering coverage stays healthy as the code evolves.
Why Use Revvy
Zero context-switching. No separate docs tabs for each provider, no hand-copying API keys between files, no piecing together middleware patterns. Revvy asks what you need and does it.
Correct by construction. The configuration and code transforms Revvy generates reflect Revenium's latest best practices.
Safe to preview. Dry-run mode shows you exactly what Revvy would change without touching your files.
CI-aware from day one. Revvy installs a GitHub Action that runs on every PR to catch missing metering, invalid config, and stale middleware versions before they ship.
Quick Start
Get a Revenium metering API key at app.revenium.ai/connections/sdk-setup, then from the root of the project you want to instrument:
That's it. Revvy detects your language, scans for AI SDK usage, asks a few questions about how you want usage attributed, instruments every AI call site, and prints a summary of what changed.
Want to preview the changes before they happen? Add --dry-run. Want to run it from CI or have an AI coding assistant run it for you? Add --non-interactive. Full flag reference lives on the package README and npx @revenium/revvy --help.
For AI Coding Agents
Revvy is designed to be driven by AI coding assistants (Claude Code, Cursor, Copilot, Gemini, Codex). On the first run Revvy installs an agent prompt at .claude/revvy-agent.md, .cursor/revvy-agent.md, etc. — your assistant reads it and finishes the instrumentation autonomously, including the AI-Outcomes design conversation that turns basic per-customer cost tracking into per-workflow and per-outcome ROI.
The agent prompt is also published with the package — see docs/agent-guide.md. If you're an AI coding agent and the user asked you to instrument their codebase, read the agent guide before invoking the CLI.
Related
Outcomes Tracking: see ROI and Unit Economics for the API Revvy wires up via
agenticJobId.
Last updated
Was this helpful?