Documentation
Getting Started
Set up Verbal in under five minutes
Quick Start
One command sets everything up:
npx @getverbal/cli initInit opens your browser to sign in, detects which AI tools you have installed, and injects the Verbal MCP server into each one. When it finishes you'll see:
Done! Dashboard → https://www.getverbal.ai/dashboardWhat Init Does
- Authenticates — opens your browser for sign-in, then stores credentials at
~/.config/getverbal/credentials.jsonwith restricted file permissions (mode 0600). - Detects AI tools — scans for Claude Code, Claude Desktop, Cursor, and Codex in parallel by checking their known config file paths.
- Configures MCP — injects a
mcpServers.verbalentry into each detected tool's config. Existing config is preserved; only theverbalkey is written. - Verifies — sends a test event to confirm the connection before exiting.
Supported Tools
| Tool | Config File | Billing Type | Restart? |
|---|---|---|---|
| Claude Code | .mcp.json in your project | API (per-token) | No |
| Claude Desktop | ~/Library/Application Support/Claude/claude_desktop_config.json | Subscription | Yes |
| Cursor | ~/.cursor/mcp.json | Subscription | Yes |
| Codex (OpenAI CLI) | ~/.codex/config.json | API (per-token) | No |
Billing type: API tools report token counts; Verbal calculates cost from model pricing. Subscription tools track cost as $0 per event — subscription spend is tracked separately.
Note: For Claude Code, init writes .mcp.json to the current working directory. Consider adding it to .gitignore if it contains your API key.
What Gets Tracked Automatically
- Token counts (input, output, cache read / cache write)
- Cost — auto-calculated from tokens and model pricing
- Model and provider
- Git context (repo, branch, commit)
- Prompt content (with built-in secret / PII redaction)
Capture mode defaults to full. Set VERBAL_CAPTURE_MODE=usage in your MCP env block to track only tokens and cost without capturing prompt text.
Enhanced Tracking for Claude Code
The MCP server provides baseline tracking. For Claude Code specifically, hooks add richer data using provider-reported token counts from the session transcript.
getverbal hooks install --claudeThree hooks are installed:
- Stop hook — after each response, incrementally ingests transcript entries with accurate provider-reported token counts.
- Session end hook — catches entries missed by the stop hook when the session terminates.
- Session review prompt — after 25 minutes of active work, prompts you to rate session usefulness. Feeds ROI metrics in the dashboard.
Hooks read config from the .mcp.json created by init. No additional configuration needed.
Codex Watcher
For Codex (OpenAI CLI), a file watcher replays session logs as events:
getverbal hooks watch --codexTo auto-start on macOS:
getverbal hooks install --codex
launchctl load ~/Library/LaunchAgents/ai.verbal.codex-hooks.plistAgent Instructions (AGENTS.md / CLAUDE.md)
The MCP server exposes tools your AI agent can call proactively. Add the following block to your project's AGENTS.md or CLAUDE.md so the agent uses them automatically:
## AI Spend Tracking
This project uses Verbal for AI spend tracking. The Verbal MCP server
is configured and provides these tools:
- optimize_prompt — Score and improve a prompt before complex tasks.
Call this before any multi-step or underspecified request.
- get_usage_summary — Show aggregated spend by provider, model, or project.
- get_cost_breakdown — Analyze spending trends with breakdowns.
- submit_session_review — Rate the session when wrapping up.
Include usefulness (1-5), effectiveness (1-5), and time saved.
- get_budget_status — Check budget alerts before expensive operations.
At the end of each session, submit a session review to help track ROI.This is especially useful for Cursor and Claude Desktop where hooks are not available — the agent instructions prompt the model to call Verbal tools directly.
Configuration
All variables go in the env block of the mcpServers.verbal entry written by init.
| Variable | Default | Description |
|---|---|---|
VERBAL_CAPTURE_MODE | full | full captures redacted prompt text. usage tracks only tokens and cost. |
VERBAL_TRACE_ENABLED | true | Send tool call traces for agent pipeline visibility. |
VERBAL_GIT_CONTEXT_ENABLED | true | Attach git repo, branch, and commit metadata to events. |
VERBAL_COST_CALC_ENABLED | true | Auto-calculate cost from token counts and model pricing. |
VERBAL_BILLING_TYPE | api | api for per-token tools. subscription for flat-rate tools. |
VERBAL_BATCH_SIZE | 50 | Events buffered before auto-flush. |
VERBAL_FLUSH_INTERVAL_MS | 5000 | Milliseconds between periodic flushes. |
VERBAL_HMAC_SECRET | — | Optional. HMAC-SHA256 signs each request for payload integrity verification. |
Redaction
When VERBAL_CAPTURE_MODE=full, prompt text is auto-redacted before transmission. Built-in patterns strip:
- API keys (OpenAI, GitHub, AWS, Google, Slack)
- Bearer tokens and JWTs
- PEM private keys
- Email addresses, phone numbers, SSNs, credit card numbers
Add custom patterns with VERBAL_REDACTION_PATTERNS (comma-separated regexes).
Disable built-in patterns with VERBAL_REDACTION_DISABLE_DEFAULT=true.
Import History
Claude Export
- Go to claude.ai → Settings → Export Data
- Download the export JSON file
- In Verbal, go to Manage → Import
- Upload the JSON — conversations are processed and deduped automatically
Files under 10 MB process immediately. Larger files are queued in the background.
ChatGPT Export
- Go to chatgpt.com → Settings → Data Controls → Export
- OpenAI emails you a download link (usually within a few minutes)
- Upload via API:
POST /api/v1/import/chatgptwith yourconversations.json
See the API Reference for request format. Re-importing is safe — deduplication prevents double-counting.
Browser Extension
The extension tracks usage from web AI interfaces — ChatGPT, Claude.ai, Gemini, Perplexity, Microsoft Copilot, and others — without API access.
Currently in development. Join the waitlist to be notified when it launches.
CLI Commands
| Command | Description |
|---|---|
npx @getverbal/cli init | Authenticate and configure all detected AI tools |
npx @getverbal/cli status | Show current configuration and connection status |
npx @getverbal/cli logout | Remove stored credentials (tool configs remain) |
npx @getverbal/cli uninstall | Remove Verbal from all tool configs and delete credentials |
npx @getverbal/cli dashboard | Open your Verbal dashboard in the browser |
npx @getverbal/cli import | Bulk import from Claude/ChatGPT exports or local tool history |
npx @getverbal/cli update | Update getverbal to the latest version |
API Keys
npx @getverbal/cli init generates and stores your API key automatically. For additional keys:
- Generate from Manage → Settings → API Keys
- Keys are scoped to your organization
- Rotate or revoke any key at any time
- Pass keys in the
x-api-keyheader on API requests
Need More?
- API Reference — endpoint specs and request examples
- Support — FAQ and contact