CLI
Install and configure the Levered command-line tool
The Levered CLI lets you manage every aspect of your optimizations from the terminal -- connect warehouses, define metrics, create optimizations, serve variants, and monitor results.
Claude Code plugin
The CLI is automatically installed and managed by the Levered plugin for Claude Code. Install the plugin and Claude handles everything -- no manual CLI setup needed:
/plugin marketplace add levered-hq/claude-plugin
/plugin install levered@leveredAgent-friendly by design
Every command supports --json for structured, machine-readable output. AI agents can use the CLI to define metrics, create optimizations, and monitor results without ever touching the dashboard.
# An AI agent can run through the setup programmatically
levered metrics create --name "Sign-ups" --sql "SELECT ..." --anonymous-id-col anon_id --timestamp-col ts --json
levered optimizations create --name "Hero Test" --design-factors '[...]' --reward-metric-id UUID --json
levered optimizations results OPTIMIZATION_ID --jsonInstallation
Install the CLI with a single command:
curl -fsSL https://cli.levered.dev/install.sh | bashThis downloads the latest binary for your platform (macOS arm64, Linux x64), verifies its SHA-256 checksum, and installs it to ~/.levered/bin/. For Windows, download the binary directly from cli.levered.dev.
Verify the installation:
levered --versionAuthentication
Authenticate by opening a browser-based OAuth sign-in flow:
levered loginThis opens your default browser, walks you through sign-in, and stores session tokens locally. You stay authenticated until you explicitly log out or the token expires.
# Check who you are signed in as
levered whoami
# Sign out and clear stored tokens
levered logoutConfiguration
The CLI stores configuration at ~/.levered/config.json. You can view and modify settings with the config commands or edit the file directly.
| Key | Description |
|---|---|
organization_id | Your organization ID, set automatically after login |
default_output | Default output format (text or json) |
# List all config values
levered config list
# Get a specific value
levered config get default_output
# Set a value
levered config set default_output jsonSetting default_output to json makes every command emit JSON by default, which is useful when the CLI is driven entirely by an AI agent.
Auto-update
The CLI checks for updates in the background after each invocation. When a new version is available, it downloads and installs it silently. You will see the updated version on the next run.
To disable auto-update (for example, in CI environments), set the environment variable:
export LEVERED_DISABLE_AUTOUPDATE=1Next step
See the Commands Reference for the full list of available commands and their options.