XReduce
XR LabsDocs
SearchOpen menu

CLI Reference

Complete reference for every xreduce command, grouped by workflow phase. For walkthroughs and worked examples, see the sidebar pages under Set up a model and Run XReduce.

Command summary

PhaseCommandDescription
Authenticationxreduce loginAuthenticate and store credentials locally.
xreduce logoutRemove stored credentials.
Model managementxreduce model createRegister a new model and write its config.yaml.
xreduce model listList models registered under the current account.
xreduce model showShow details for a single model.
Project setupxreduce initScaffold a model folder with config templates.
xreduce remapRe-infer benchmarks/config.yaml from the benchmark JSONL.
Runxreduce profileRun a single-prompt telemetry pass.
xreduce evaluateEvaluate a model against benchmark data.
xreduce compareCompare models from the cost-quality matrix.

xreduce login

Authenticate and store credentials at ~/.xreduce/credentials. Required before any model command.

# Interactive
xreduce login

# Use an existing API key (non-interactive)
xreduce login --api-key xr-1234-5678-9abc

# Named profile (multiple accounts)
xreduce login --profile staging
FlagDescription
--api-keyUse an existing API key directly. Skips the email/password prompt.
--emailEmail address for interactive login (otherwise prompted).
--profileProfile name to store credentials under. Default: default.
--api-baseOverride API base URL. Used for staging or local dev.
--forceOverwrite existing credentials for this profile without prompting.

xreduce logout

Remove stored credentials.

xreduce logout                   # default profile
xreduce logout --profile staging # specific profile
xreduce logout --all             # remove all profiles
FlagDescription
--profileProfile to log out of. Default: default.
--allRemove all stored profiles entirely.

xreduce model create

Register a new model and write its config.yaml. See Register a model for the full flag list and walkthrough - there are roughly 20 optional flags covering architecture, hardware, task settings, and version metadata.

xreduce model create \
  --name my-org/my-model \
  --task-type text-to-sql
FlagDescription
--name (required)Model name as org/model-name.
--task-type (required)Task type slug, e.g. text-to-sql.
--output / -oWhere to write config.yaml. Defaults to ./<name>/config.yaml.
--profileCredentials profile to use.
Plus ~20 optional flags - see Register a model.

xreduce model list

List all models registered under the current account.

xreduce model list             # formatted table
xreduce model list --json      # machine-readable JSON
FlagDescription
--profileCredentials profile to use.
--jsonOutput JSON instead of a formatted table.

xreduce model show

Show details for a single model. --yaml emits a config.yaml suitable for profile and evaluate; --json emits the raw API response.

xreduce model show <model-id>

# Re-generate config.yaml for an existing model
xreduce model show <model-id> --yaml -o config.yaml

# Raw API response
xreduce model show <model-id> --json
FlagDescription
model_id (positional)Model UUID from xreduce model list.
--profileCredentials profile to use.
--output / -oWrite output to this path instead of stdout.
--yamlEmit config.yaml ready for profile/evaluate.
--jsonEmit the raw API response as JSON. Mutually exclusive with --yaml.

xreduce models (plural) is supported as a deprecated alias for one release. Use xreduce model going forward.

xreduce init

Scaffold a model folder with config.yaml and benchmarks/config.yaml. If a benchmark JSONL is already present, the field-mapping is inferred automatically. See Initialize a project for the full walkthrough.

xreduce init my-org/my-model

# Add a system_prompt placeholder
xreduce init my-org/my-model --with-system-prompt

# Pre-fill the system_prompt
xreduce init my-org/my-model --system-prompt "You are a SQL expert."
FlagDescription
path (positional)Target folder path.
--force / -fOverwrite existing config files.
--with-system-promptAdd a system_prompt placeholder. Mutually exclusive with --system-prompt.
--system-prompt TEXTSet system_prompt directly.

xreduce remap

Re-infer benchmarks/config.yaml from the benchmark JSONL without touching the model config.yaml. Use it when you add or change benchmark data after running init. User-owned keys in benchmarks/config.yaml are preserved; only field_map, input_serializer, and the task-default system_prompt are owned by remap.

xreduce remap my-org/my-model
FlagDescription
path (positional)Model folder path.

xreduce profile

Run a single-prompt telemetry pass. Sanity check before a full evaluation. See Profile for the full walkthrough.

xreduce profile --config my-org/my-model/config.yaml

# Override the prompt
xreduce profile --config my-org/my-model/config.yaml --prompt "Translate this..."

# Show full telemetry
xreduce profile --config my-org/my-model/config.yaml --verbose
FlagDescription
--config / -c (required)Path to config.yaml.
--prompt / -pOverride the profiling prompt.
--verbose / -vShow full logging and raw telemetry payload.

xreduce evaluate

Evaluate a model against benchmark data. --config is repeatable for multi-model runs against a shared benchmark. See Evaluate for the full walkthrough.

# Single model, all benchmarks in benchmarks/
xreduce evaluate --config my-org/my-model/config.yaml

# Multiple models against a shared benchmark
xreduce evaluate \
  --config models/a/config.yaml \
  --config models/b/config.yaml \
  --benchmark shared/benchmarks/text2sql.jsonl

# With a baseline for delta reporting
xreduce evaluate --config my-org/my-model/config.yaml --baseline <run-uuid>
FlagDescription
--config / -c (required, repeatable)Path to config.yaml. Repeat for multi-model.
--benchmarkFilename, all, or shared/external path.
--optimization-config / -oStrategy. Default: baseline.
--baseline / -bUUID for delta calculation.
--show-outputsPrint per-sample predictions and misses.
--show-errorsPrint only failed samples with error breakdown.
--verbose / -vShow detailed logging.
--fail-fastStop on first config failure.

xreduce compare

Compare models on accuracy, latency, energy, and cost from the cost-quality matrix. Two modes: explicit head-to-head with positional model identifiers, or fleet-wide via --task-type. See Compare for the full walkthrough.

# Head-to-head - model names or UUIDs, plus --benchmark
xreduce compare qwen3-4b qwen2.5-coder-7b --benchmark text2sql.jsonl

# Fleet-wide by task type
xreduce compare --task-type text-to-sql
FlagDescription
models (positional)Two or more UUIDs or name substrings.
--task-typeCompare all account models with this task type. Mutually exclusive with positional models.
--benchmarkBenchmark filename (basename match). Required positional mode; optional in --task-type mode.
--profileCredentials profile to use.
--jsonEmit raw matrix rows as JSON.