Skip to main content
Getting an engineer onto ValarCode takes three steps: install the CLI, create a coding key, and run one connect command. After that, routing applies on its own. There are no config files to edit by hand.

Prerequisites

  • One of the supported harnesses installed locally: Claude Code, the Claude Desktop app, Cursor, Codex, Pi, or VS Code (via GitHub Copilot Chat).
  • Access to the Valar Dashboard to create a coding key.
  • macOS, Linux, or WSL for the CLI.

Install the CLI

The valar CLI is a single, dependency-free binary. One line installs it, with no runtime to set up:
Confirm it is on your path:

Create a coding key

In the Valar Dashboard, open ValarCode and create a coding key. Coding keys are scoped to agentic harnesses like Claude Code, Cursor, Codex, and Pi, and they carry your routing split. They use the vlrcode_ prefix, and the token is shown once, so copy it before you leave the page.
A new key works right away. Until you set a split, it routes on Auto — Valar picks the target model — so it is safe to connect before you have tuned anything. See Model routing.
Run valar configure once to store the key locally so you can drop --api-key from later commands:
The key is resolved from, in order: --api-key, then $VALAR_API_KEY, then ~/.valar/config.json, then an interactive prompt.

Connect a harness

Each engineer runs the connect command once per machine. Pick your harness for the full walkthrough and the behind-the-scenes detail:

Claude Code

valar claude on

Claude Desktop

valar claude-desktop on

Cursor

valar cursor on

Codex

valar codex on

Pi

valar pi on

VS Code

valar copilot on
Routing Cursor requires a paid Cursor plan (Pro, Business, or Enterprise) — valar cursor on fails on the free plan or when Cursor is not signed in. valar cursor routes the Cursor editor (the desktop app); the Cursor CLI (cursor-agent) is not supported. VS Code routing goes through GitHub Copilot Chat’s custom-endpoint provider, so it needs a signed-in Copilot and a recent VS Code. valar vscode and valar copilot are the same command.

Per-engineer attribution

To attribute usage and keep each engineer on a stable cohort, the CLI attaches a client id to every request. Most harnesses (Claude Code, Claude Desktop, Codex, Pi, and VS Code/Copilot) send it as an X-Valar-Client-Id header; Cursor, which cannot set custom headers, rides it as a token suffix (<coding-key>~<client-id>). By default the client id is your OS username (normalized to lowercase a-z 0-9 . _ - @ +, capped at 64 characters), so the analytics leaderboard shows real engineers rather than opaque strings. Change how it is derived with --user-id: The chosen id is recorded on on, so you can print it any time:
A plain key with no client id still works, but those requests are not attributed to an engineer. The client id is supplied by the client and is used only for attribution and routing. It is not a security boundary; access is gated on the coding key itself.

CLI reference

The CLI follows a harness-first grammar. on is the default subcommand, so valar claude is the same as valar claude on.
vscode is an accepted alias for copilot (the editor is how users refer to it; the tool inside it is Copilot Chat). Per-harness commands Flags

Keeping the CLI current

valar upgrade replaces the binary in place with the latest release, verifying the download’s SHA256 before installing; valar upgrade --check only reports whether a newer version exists. You rarely need to run it by hand. When a newer release is out, every interactive run offers to upgrade ([Y/n], default yes) before it runs your command, then re-runs the command on the new version; a non-interactive run just prints a note. The check runs at most once a day. Set VALAR_NO_UPDATE_CHECK=1 to silence it.

Managing keys

  • Revoke a coding key from the dashboard at any time. Requests using it stop resolving.
  • Issue a separate key per team or experiment to run different splits side by side. The same engineer can land in different cohorts under different keys.

Next steps

Model routing

Set the split and choose target models.

Analytics & savings

Watch usage and savings come in per engineer.