You’ve just been added to a LangWatch organization and you want to use Claude Code (or Codex, Gemini, Cursor, opencode) without your IT team writing a wiki page. This page is the 5-minute version of that wiki page. When you finish you will have:Documentation Index
Fetch the complete documentation index at: https://langwatch.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
- A signed-in
langwatchCLI on your laptop. - A Personal Virtual Key bound to your identity, your monthly budget, and your org’s Routing Policy.
- One real request flowing through the AI Gateway that you can see in your own /me dashboard.
Pairs with: Personal IDE keys (the device-flow login that runs underneath every step here) and Coding CLI Integrations (the deep reference for each supported assistant).
Prerequisites
Before you start, your IT admin should already have:- Provisioned your account in LangWatch (you should have an invite email or be able to sign in via your company SSO).
- Published at least one default Routing Policy. If they haven’t, the CLI will fail with a friendly
409 no_default_routing_policyerror, see the CLI error catalog and ping your admin. - Optionally: published an AI Tools Portal catalog (the card grid you’ll see on
/me). If they haven’t, your/mepage will show a “your IT team is still setting things up” empty state, you can still use the CLI directly.
Step 1: Install the CLI
Thelangwatch CLI is the single binary that drives every step below.
langwatch --help lists every subcommand it supports, and langwatch <command> --help deep-dives into each one.
Step 2: Sign in via device flow
- Your terminal prints a one-time device code and a URL.
- Your browser opens. You sign in via your company SSO (or email + password if your org runs the open-core flow).
- The CLI exchanges the device code for a Personal Virtual Key, persists it at
~/.langwatch/config.json(mode0600), and printssigned in.
organization_id, principal_id, personal: true). Every request the gateway sees from this key is attributed to you: your monthly budget, your audit trail, your usage chart.
If sign-in fails, the CLI error catalog maps every error code (409 no_default_routing_policy, 401 unauthorized, 403 forbidden) back to the admin action that fixes it.
Step 3: Land on /me
Openhttps://<your-langwatch-host>/me in a browser. You’re on your personal home.
What you see (top to bottom):
- AI Tools Portal: the card grid your IT admin published. Three card classes: coding assistants, model providers, and external tools. See the portal overview for the full shape.
- My Usage: spend this month vs your budget, request count, most-used model.
- Spending over time: a daily bar chart for the last 30 days.
- By tool: your spend split by coding assistant, model provider.
- Recent activity: the last few requests you made (timestamp, model, cost). No prompt or completion content is rendered here even if the org runs in
fullno-spy mode:/meis a ledger view, not a trace viewer.
Step 4: Click your favourite assistant tile
Find the tile for your preferred CLI (Claude Code in this example). Click it. The tile expands inline with a setup walkthrough, typically a single command:- Read your Personal VK from
~/.langwatch/config.json. - Set the
ANTHROPIC_BASE_URLandANTHROPIC_AUTH_TOKENenv vars to point at your org’s gateway. execthe underlyingclaudebinary with everything pre-injected.
langwatch codex), Gemini CLI (langwatch gemini), Cursor, and opencode. The full matrix lives in Coding CLI Integrations.
Step 5: Read your spend back
Refresh/me. You should see:
- Recent activity: your request from Step 4 with timestamp, model, and cost.
- Spending over time: today’s bar updated.
- My Usage: request count incremented, spend updated.
langwatch governance status shows whether your org has data at all, and the audit log under /settings/audit-log (admin-only) shows every gateway action with timestamp, actor, and target.
Where to next
- Want to switch tools? Every coding assistant has its own setup page: Claude Code, Codex, Gemini CLI, Cursor, opencode, Aider.
- Want to use a model provider directly from your code? Click the provider tile on
/me(OpenAI, Anthropic, Bedrock, Gemini), name a key, and copy the secret once. The form posts topersonalVirtualKeys.issuePersonaland the result is a virtual key you drop into your app’s config, same gateway, same budget, no provider credentials in your dotfiles. See Model-provider tiles. - Want to share a key with your team? Don’t use a personal VK, create a project and a project-scoped VK instead. The portal nudges you toward this with a “building an app for your team? Consider creating a project” hint.
- Want to know which devices are signed in? /me/sessions lists every active CLI session with platform, hostname, and last-used timestamp; revoke any session in one click.
- Got an error? CLI debug → Error catalog maps every CLI error to the admin action that fixes it.
Alternative path: admin hasn’t published a catalog yet
If/me shows the empty-state “your IT team is still setting things up” message, you can still use the CLI directly without the portal: