Skip to main content
A personal IDE key is a single virtual key that Claude Code, Codex, Cursor, Gemini CLI, and opencode all share. Your IT admin issues it through LangWatch Governance, and it is bound to your identity and governed by your team’s policy. This page is the end-user flow. If you’re an admin setting it up for your organization, see Admin setup.
On SaaS, governance rollout is managed per organization: if you don’t see these surfaces, or langwatch login --device is refused with a governance error, ask your admin.

Why this exists

Your IT or platform team gives you Claude Code, Cursor, Codex, and Gemini CLI, and asks for four things in return:
  • Per-user spend attribution so finance can stop staring at unnamed Anthropic invoices
  • A personal budget for the period your admin configures (monthly or weekly) so a runaway recursive prompt at 3 AM Saturday doesn’t burn $10k overnight
  • Audit trail for SOC 2 / ISO 27001 / HIPAA / EU AI Act
  • Zero-config provider setup: your IT team wired up Anthropic + OpenAI + Gemini at the org level, and you inherit them
LangWatch covers all four. After one langwatch login, the wrappers route every request through the gateway, attributed to you and governed by your company’s policy.

What you get

  • One CLI command to sign in: langwatch login
  • Wrappers that let you keep using the tools you already know: langwatch claude, langwatch codex, langwatch cursor, langwatch gemini
  • A personal dashboard at https://app.langwatch.ai/me showing your spending, requests, most-used models, and recent activity
  • Budget enforcement at the gateway: if you go over that cap, the request fails fast with an actionable error

Setup

1. Install the CLI

The langwatch CLI ships as an npm package. Today the supported install path is npm / npx:
The single-binary installers (curl ... | sh, Homebrew tap, PowerShell iex) are on the roadmap but not yet published. Until then, npm install -g langwatch is the canonical path on every OS where Node.js is available.
Verify:

2. Sign in via your company SSO

The CLI uses RFC 8628 device-flow OAuth. Pass --device to go straight to the SSO path. The bare langwatch login first asks how you want to use LangWatch, and picking “AI tools / agentic flows” reaches the same flow:
Your browser opens to a LangWatch page that asks for your work email, then redirects to your company’s IdP (Okta, Azure AD, Auth0, whatever). After you complete SSO + MFA, control returns to the CLI with your inherited providers + budget already populated:
Behind the scenes:
  1. The CLI ran an RFC 8628 device-flow OAuth handshake against the LangWatch control plane.
  2. Your browser ran the SSO flow your IT admin configured (Okta, Google Workspace, Azure AD, or password-only).
  3. LangWatch minted a personal virtual key scoped to your user identity, signed by the gateway, bound to your monthly budget, and audit-trailed per request.
  4. The CLI fetched your AI tools, inheritable providers, and budget from /api/auth/cli/bootstrap and rendered the ceremony you see above.
Tokens persisted at ~/.langwatch/config.json (mode 0600).
You did not pick a model provider during setup. Your admin already wired up Anthropic, OpenAI, Gemini, etc. at the organization level. You just inherit them.

3. Use your tools normally

Same Claude Code experience as before: flags, terminal handling, and exit codes are all identical because langwatch claude exec’s the underlying tool with the right env vars pre-injected. The same pattern works for Codex, Cursor, Gemini CLI, and opencode:
Verified end-to-end in CI. langwatch login + each of the five wrappers above (claude, codex, cursor, gemini, opencode) is exercised in the governance-wrapper.e2e.test.ts Node-only e2e suite (fake control-plane, fake gateway, mocked tool binaries) covering login config write, env-var injection, routing with bearer-VK, budget pre-flight (402/200/5xx), and exit-code propagation. 16 scenarios, 3-second runtime, runs on every PR. See CLI debug → e2e coverage for the assertion shape per tool.

4. Or, set it up without the wrapper

If typing langwatch every time is friction, langwatch instrument <tool> writes the telemetry wiring for a tool and exits. A plain claude or codex run then reports to LangWatch on its own:
Claude Code takes an env block in ~/.claude/settings.json, Codex takes an [otel] block in ~/.codex/config.toml, and the other tools take a scoped function in your shell start file, which applies to that tool and to no other command. Add --project <id-or-slug> to send the telemetry to a team project, or --key <ingest-key> on a machine that never logs in. See the Claude Code integration guide. The model calls keep going wherever the tool itself points them. To route them through the gateway, start the tool with the wrapper.

Your dashboard

Open https://app.langwatch.ai/me (or run langwatch me) to see your usage:
  • Spent vs. budget for the month
  • Total requests, week-over-week
  • Most-used model
  • Spending breakdown by tool (Claude Code, Cursor, Codex)
  • Recent activity (last 10 requests with cost + summary)
Your dashboard shows only your usage. To switch to a team’s view, use the workspace switcher in the top-left of the navbar.

Hitting your budget

If you cross 80% of your monthly cap, the dashboard shows a yellow warning banner. If you hit 100%, your next request fails with a clear message:
The server builds that link and returns it with the budget response. It carries the blocked scope, the scope id, the limit and the spend as query parameters, so the budget-request page opens with the context already filled in and the admin can change your limit at once. On an older server that returns no link, the CLI prints the plain https://app.langwatch.ai/me/budget/request page instead, and the dashboard reads the same context from your signed-in session. No token re-issuance is required. Budgets reset on the period your admin configured (monthly or weekly).

Security

  • Your access token is short-lived (~1h) and refreshed automatically.
  • Your refresh token is stored at ~/.langwatch/config.json with mode 0600. We’re working on OS keyring integration; for now, protect that file as you would any local secret.
  • Revoking your account at the LangWatch admin console invalidates both tokens immediately. Your CLI begins failing within 60s.
  • The CLI never sees a raw provider key. The gateway holds the upstream credentials.

Sign out

This clears ~/.langwatch/config.json locally and revokes your refresh token at the server, so leaked-state can’t be reused. The -device suffix disambiguates from the older langwatch login API- key flow (which has its own logout via clearing the env var or re-running langwatch login).

What’s behind the scenes

If you’re curious about the platform side:
  • Compliance architecture: how the unified observability substrate underwrites SOC 2 / ISO 27001 / EU AI Act / GDPR / HIPAA-most-uses
  • Governance data retention: how long the activity recorded from your key is kept
  • OCSF / SIEM export: your security team’s SIEM (Splunk, Datadog, Sentinel) pulls these events on a cron via the OCSF v1.1 read API
  • Ingestion sources: what other AI platforms feed into the same governance dashboard

For admins setting this up

  • Admin setup: SSO, gateway provider keys, org-wide monthly budget ceiling
  • Verify it yourself: mint a personal virtual key, send a real completion, watch the spend land on /me/usage
  • Control plane: the full Tier 1-5 governance dashboard architecture
Last modified on August 27, 2026