Skip to main content
The gauge CLI is a typed client for the Gauge API. Use it for interactive work, repeatable scripts, and CI jobs. Agent execution stays in Gauge; the CLI only configures and launches work.

Install the CLI

The CLI requires Node.js 22.12 or later.
Installing the CLI also installs the gauge-agents skill for coding agents it detects, such as Claude Code and Codex. Set GAUGE_SKIP_SKILL_INSTALL=1 to skip this; CI skips it automatically. If you install with --ignore-scripts, add the skill yourself:
To update the CLI to the latest version:

Give your coding agent instructions

gauge instructions prints guidance written for a coding agent that uses the CLI. Run it, or have your agent run it, before the first gauge command. The text ships inside the CLI, so it always matches the commands in your installed version.
The overview covers how to sign in, read JSON output, confirm spend, retry safely, and report results with evidence. Each module has a full page: Installed instructions do not update themselves. Run --install again after gauge update.

Sign in

For a local terminal, use the browser flow:
For SSH or another machine that cannot accept a browser callback, use the device flow:
To provide an existing token without opening a browser, pipe it to the CLI:
Gauge stores credentials in ~/.config/gauge/credentials with permissions limited to your user. The GAUGE_API_TOKEN environment variable takes precedence over stored credentials.
Treat a Gauge API token like a password. Do not commit it or pass it as a command-line argument that may appear in shell history.

Select an organization

One token can access every organization where you are a member.
gauge orgs use writes the default organization to ~/.config/gauge/config.json. Override it for one command with --org:

Common workflows

Measure Agent Experience

Each eval saves a task, pass criteria, and run settings. Check those settings before you run it.
Run now uses the stored settings and asks for confirmation. On a recurring cadence, the next scheduled run moves to one cadence period after the launch. Pass --yes only in automation where you have reviewed the configuration and intended spend.

Measure Agent Preference

Agent Preference prompts measure which brands agents recommend or adopt.
Choose models, tools, credentials, and a schedule on the preference prompt. Then add scenarios for the repositories and personas you want to test. Every scenario uses the prompt’s settings.
Omit --scenario to run all scenarios and restart the cadence from now. Running selected scenarios leaves the schedule unchanged. A preference prompt with zero scenarios does not run on a schedule. Use gauge preference --help for prompt creation, markets, and run history.

Configure runs

Set an eval’s environment directly on create or edit. To compare another repository or tool setup, duplicate the eval in the app and edit the copy.
Manage each part of the configuration with its own command group: Use --cadence none for manual runs or daily|weekly|monthly for recurrence. Settings you leave out of an edit stay the same. Use --clear-* flags to remove them. Credential creation and rotation happen in the web app; see Credentials.

Improve results

Diagnose a measurement and estimate the cost before you start an optimization:
See Improve agent results for the full loop. For a coding agent, run gauge instructions optimization.

Watch a run

watch follows the live event stream. logs prints the events available so far and exits. diff writes the run’s working-tree diff to standard output.

Apply a declarative configuration

Use gauge apply to launch work from a JSON specification.
Run the dry run first. It shows the resources and runs Gauge would create without applying the change.

Query analytics

Discover the available datasets and fields before you build a report.
Use --explain to print the compiled query to standard error.

Script with JSON output

Read commands support --output json or -o json.
The output format is a global option, so place it before or after the command unless a shell wrapper requires otherwise.

Environment and config

Manage local values with gauge config get, gauge config set, and gauge config unset.

Exit codes

For failed or incomplete runs, see Run troubleshooting. For credit usage and recovery, see Billing and credits.

Discover commands

The CLI includes authentication, organizations, members, Agent Preference, evals, models, personas, skills, MCP servers, connections, repositories, runs, optimizations, batches, brands, tags, actions, dashboards, provider keys, billing, usage, statistics, queries, and local configuration. Shared presets/scenarios and shared cycles/schedules are retired. If an older script uses them or --one-off, update it to configure the eval or preference prompt directly. Upgrade with gauge update; use gauge --help to check the commands available in your installed version.