EvalGate CLI command reference
Complete reference for EvalGate CLI authentication, repository linking, gates, CI integration, trace labeling, failure analysis, judge orchestration, and auto loops.The EvalGate CLI is the fastest way to run regression gates, analyze failure patterns, and automate prompt improvement without leaving your terminal. Run TypeScript CLI commands with
npx @evalgate/sdk <command> for zero-install usage, or add @evalgate/sdk to your project and run the same commands through your package manager.
Local core and hosted boundary
The MIT-licensed CLI gives cloud coding agents a credential-free local execution path.init --local performs project discovery and scaffolding with no account,
browser, organization, GitHub remote, API key, or network request and creates no
hosted identity. Spec execution, baseline updates, and regression gates then run
in the checkout. Browser-approved login and durable repository link are a
separate optional hosted path. Exact commit and remote-head details remain cloud
activation snapshots, not durable link identity. Baselines and local evidence
remain reviewable files that can run in any CI provider.
The hosted control plane is additive. Connect it for shared history, managed
traces, team review, access control, and organization policy. Local gates remain
available when the hosted service is not configured.
Start a cloud-agent sandbox locally
local describes where evaluation executes; the intended caller may be a
remote coding agent. JSON and non-TTY init is preview-only without explicit
--apply.
Add hosted repository collaboration
The normal human path uses browser-approved device authorization and does not print or ask you to copy an EvalGate credential:link detects the GitHub origin, current symbolic branch, exact local HEAD,
and repository root. It previews the server-owned intake contract pinned to that
exact target and asks before applying in a TTY. Branch movement does not unlink
the project, and EvalGate never silently substitutes the remote branch head.
For agents and CI, mutation remains explicit:
understand, init,
health, baseline, and gate commands can run without a network round trip.
status keeps durable linkage, checkout movement, cloud snapshot, and readiness
separate. A checkout behind its tracked branch can remain linked, locally
gate-ready, and cloud-targetable. Ahead or unpushed work needs the exact commit
pushed before cloud evidence; diverged work needs an explicit appropriate branch.
Dirty worktree state is reported independently because Git SHA alone cannot
reproduce uncommitted changes.
- TypeScript (npx)
- Python
@evalgate/sdk@3.10.0, including
credential-free init --local. PyPI remains at 3.6.0 until its separately
governed release closes, so verify the installed Python package before using
current TypeScript-parity commands from PyPI.Navigate by outcome
Both CLIs expose the same versioned capability map. Start here when you know the job you need to accomplish but not the internal command name:Stable exit codes
The process exit status is the shell/CI result. JSON reports may additionally carryeffectiveExitCode and releaseReady when preview mode or evidence
policy separates process completion from the release decision. The complete,
version-bound contract is available from evalgate capabilities --format json.
Call any public API operation
The TypeScript CLI’sapi command consumes the generated public operation registry. This gives automation a single command for every operation in the API reference without falling back to private routes or database helpers. Treat it as an escape hatch for advanced automation; evalgate capabilities and the native workflow commands are the primary navigation surface.
--path name=value, --query name=value, and --header name=value more than once when an operation declares multiple inputs. --body accepts inline JSON or @path/to/body.json. Machine mode writes the exact successful API envelope to stdout; failures write a stable JSON error containing code, message, status, requestId, and exitCode. Ctrl-C aborts the active request and exits 130.
Red-team release evidence
To supply a local release gate with durable Red-Team evidence, request the specific completed run that the release is based on:redTeam.expectedAttestationPublicKeySha256, checks the configured organization,
campaign snapshot, and exact release target, then atomically writes
.evalgate/red-team-evidence.json. It compiles identity,
completion, provider, attack, benign-utility, finding, remediation, golden,
signed-report, and framework-reference evidence from that run. It does not
execute a campaign or choose the latest run. A required local redTeam policy
must pin the exact artifactId, versionId, and 64-character contentHash
being released; the gate rejects missing, malformed, stale, mismatched,
cross-organization, incomplete, or unverifiable evidence. Do not hand-author
the JSON file or substitute a source-checkout digest for the hosted release
target.
A bare redTeam.required: true uses pre_release_strict: complete and fresh
campaign evidence, attributable costs, compiler attestation, zero successful
attacks, and 100% benign utility. It intentionally does not require a
finding-scoped remediation report, so a clean first campaign can pass. Use
post_remediation_strict when admitting a repaired finding; it additionally
requires the baseline/fixed rerun comparison, no introduced fingerprints,
active golden coverage, and an exact-hash signed report. The legacy strict
name remains an alias for pre_release_strict. Pin expectedTarget,
expectedOrganizationId, expectedSnapshotHash,
expectedAttestationKeyId, and expectedAttestationPublicKeySha256 in
evalgate.config.json. Use policyProfile: "custom" only for a reviewed policy
exception. A fresh CI job runs evalgate red-team evidence --run <run-id>
before evalgate gate; it never receives the server’s private signing key.
In machine mode, export failures emit one JSON error envelope. Invalid
arguments/configuration exit 5, API/auth/network failures exit 4, artifact
integrity or identity-policy failures exit 3, local writes exit 11, and
unexpected defects exit 99.
Campaign creation, approval, and execution remain explicit actions requiring
the appropriate Red-Team permissions. Fetching release evidence is a read-only
compilation step.
Setup and initialization
evalgate understand - infer and confirm product context
evalgate understand - infer and confirm product context
--depth deep or --deep for a broader local scan. Both modes preview
by default.- TypeScript (npx)
- Python
--format json returns the complete plan
envelope, while --format jsonl emits typed scan, evidence, theory, risk,
question, and completion events for agents and automation. --json is an
alias for JSON output.Preview writes nothing. It performs no network or model calls, executes no
project commands, inspects or changes no Git state, and does not modify
baselines, promote cases, or install telemetry. After review, --apply
writes the canonical context to evalgate.product.json. A custom
--output must remain inside the selected project root.npx @evalgate/sdk init — preview and scaffold a project
npx @evalgate/sdk init — preview and scaffold a project
init --local is the credential-free cloud-agent path and creates no hosted context; plain init is the hosted-linked variant. In a TTY bare init previews and asks before applying. Explicit --preview never asks or writes. JSON and non-TTY calls remain non-mutating unless --apply is explicit. Init creates a pending baseline without executing tests or accepting results. It never mints or accepts an implicit activation key.The JSON plan includes project.aiUsage with evidence-backed agent frameworks, model providers, observability libraries, and tool protocols. Declared dependencies are high confidence; exact source imports are medium confidence. init --apply preserves the same evidence under agentRuntimeRegistry.discovery in evalgate.config.json and chooses a default runtime only when one framework is unambiguous.Discovery is local, bounded, and deterministic. It ignores dependency/build/virtual-environment directories, does not read .env files, and never guesses credentials or model names.yarn alias,
Yarn Classic, Yarn Modern, Bun, Deno, pip, uv, Poetry, Pipenv, PDM,
Conda, Mamba, Hatch, Pixi, and explicit custom JSON argv. Conflicting
JavaScript or Python/environment markers stop the plan. Repeat
--package-handler <id> for an explicit polyglot composition; gate and
baseline update execute every runnable handler from its owning root.baseline update accepts only successful current evidence from the exact
clean source that was evaluated. A pending baseline is not release-ready,
and generated CI never updates, commits, or pushes one. The local gate
writes its canonical release decision to .evalgate/last-report.json and
detailed deltas to evals/regression-report.json.Then commit the generated files and push to trigger your first CI gate:Migrate removed 3.8.x commands
Migrate removed 3.8.x commands
BAD_ARGS (exit 5)
and targeted next actions. JSON mode emits one document and redacts
secret-like arguments.npx @evalgate/sdk doctor — environment diagnostics
npx @evalgate/sdk doctor — environment diagnostics
--quick when you also want account and platform connectivity checks.npx @evalgate/sdk health — on-demand application health
npx @evalgate/sdk health — on-demand application health
--format github appends the measured reasons to the PR Step Summary. The
repository evalgate-application-health Skill helps a coding agent create
the manifest and prepare a reviewed change; it does not edit or merge code
automatically.Python projects use the parity command:npx @evalgate/sdk harness — optimize agent work locally
npx @evalgate/sdk harness — optimize agent work locally
evalgate harness optimize and
evalgate harness feedback. evalgate init --apply installs the portable
evalgate-harness-optimization Skill in .agents/skills/ so a coding agent
can explain the result and prepare the change without requiring a cloud
connector.After the base-vs-candidate eval has passed, record validated feedback,
then plan one managed Skill edit:--apply authority flag and the matching
validated report hash. EvalGate changes only its own deterministic managed
block, refuses stale/out-of-repository/symlink targets, and writes rollback
metadata under .evalgate/harness-mutations/:Gate and CI
Stability policy for probabilistic checks
An LLM call or model-judge verdict is not deterministic just because it runs in CI. Build hard gates on deterministic assertions where possible. For probabilistic checks, pin model and judge configuration, execute independent trials with the SDK’srepetitions option, set an explicit minimumPassRate,
and fail or quarantine evidence reported in flakyCases. Retries are transient
recovery attempts within a trial; they are surfaced as flaky evidence and
should not be used to retry a verdict until it passes.
A seed makes EvalGate’s case ordering reproducible but cannot prevent an
external provider from changing a model. Recalibrate release-blocking judges
against labeled examples, require the CLI’s judge TPR/TNR and minimum-sample
thresholds, and keep the resulting credibility evidence with the gate report.
Exit code 10 means the configured judge is not credible enough to block a
release safely.
Before any provider call, the auto editor and SDK model-assertion boundary
reject common instruction overrides, role spoofing, and judge-score coercion in
untrusted evaluation text. A security rejection fails closed and never falls
back to an automatic prompt mutation. The check --onFail import network
boundary recursively redacts nested secrets and common PII from the complete
failed-run envelope; this convenience upload path has no raw-data opt-out.
npx @evalgate/sdk gate — run the regression gate locally
npx @evalgate/sdk gate — run the regression gate locally
1 if any metric regresses.npx @evalgate/sdk ci — one-command CI gate
npx @evalgate/sdk ci — one-command CI gate
--base is provided. Add --impacted-only to run only specs affected by the current diff.npx @evalgate/sdk check — platform gate
npx @evalgate/sdk check — platform gate
EVALGATE_API_KEY). Use --onFail import to upload failed run context to the dashboard for review.npx @evalgate/sdk baseline update — refresh the baseline
npx @evalgate/sdk baseline update — refresh the baseline
Labeling and analysis
npx @evalgate/sdk label — interactive trace labeling
npx @evalgate/sdk label — interactive trace labeling
u to undo the previous label. Press Ctrl-C to save progress and exit.npx @evalgate/sdk analyze — failure-mode frequency report
npx @evalgate/sdk analyze — failure-mode frequency report
npx @evalgate/sdk failure-modes — configure failure-mode taxonomy
npx @evalgate/sdk failure-modes — configure failure-mode taxonomy
label, and optionally seeds or extends your evalgate.config.json alert weights.failureModeAlerts.modes in config and used by analyze and gate alerting.npx @evalgate/sdk replay-candidate — inspect a stored candidate for replay
npx @evalgate/sdk replay-candidate — inspect a stored candidate for replay
replay alias is deprecated — prefer replay-candidate.npx @evalgate/sdk replay-decision — compare two runs
npx @evalgate/sdk replay-decision — compare two runs
Agent evidence and enterprise controls
npx @evalgate/sdk run-cli — run a command with evidence capture
npx @evalgate/sdk run-cli — run a command with evidence capture
--local).npx @evalgate/sdk mcp — inspect, audit, or proxy MCP servers
npx @evalgate/sdk mcp — inspect, audit, or proxy MCP servers
--format json for machine-readable audit output. Critical findings block by default; use --fail-on high (or low, medium, critical) to set the CI threshold. Use --strict-persistence separately when evidence must land on the platform.npx @evalgate/sdk controls — inspect enterprise guardrails
npx @evalgate/sdk controls — inspect enterprise guardrails
EVALGATE_API_KEY with access to /api/system/controls.Repository intelligence and evaluation packs
Use the local activation path first. After the gate is working and GitHub is connected, scan an exact commit, review the evidence, and then install coverage:Advanced
npx @evalgate/sdk cluster — group similar failures
npx @evalgate/sdk cluster — group similar failures
npx @evalgate/sdk synthesize — draft quarantined eval cases
npx @evalgate/sdk synthesize — draft quarantined eval cases
npx @evalgate/sdk auto — bounded autonomous prompt-improvement loop
npx @evalgate/sdk auto — bounded autonomous prompt-improvement loop
npx @evalgate/sdk auto. The Python CLI exposes the same bounded workflow as evalgate auto run and evalgate auto daemon.npx @evalgate/sdk discover --manifest — refresh the spec manifest
npx @evalgate/sdk discover --manifest — refresh the spec manifest
Judge commands
npx @evalgate/sdk judge registry — list available judges
npx @evalgate/sdk judge registry — list available judges
npx @evalgate/sdk judge presets — list judge presets
npx @evalgate/sdk judge presets — list judge presets
npx @evalgate/sdk judge test — test a judge configuration
npx @evalgate/sdk judge test — test a judge configuration
npx @evalgate/sdk judge compare — compare two outputs
npx @evalgate/sdk judge compare — compare two outputs
Judge credibility config
Configure judge credibility thresholds and failure-mode alerts inevalgate.config.json at the root of your project:
8 (WARN) instead of using a potentially biased score. When labeled sample count is below minLabeledSamples, bootstrap confidence intervals are also skipped — both conditions emit reason codes into the judgeCredibility block of the JSON report.
Complete command index
Every registered EvalGate CLI command. Runnpx @evalgate/sdk <command> --help for the same text in your terminal.
evalgate analyze — Analyze labeled golden dataset failure modes (first pass)
evalgate analyze — Analyze labeled golden dataset failure modes (first pass)
evalgate api - call any public operation from the verified OpenAPI contract
evalgate api - call any public operation from the verified OpenAPI contract
evalgate auto — Plan, run, or daemonize budget-aware experiment iterations
evalgate auto — Plan, run, or daemonize budget-aware experiment iterations
evalgate baseline — Manage regression and repository baselines
evalgate baseline — Manage regression and repository baselines
evalgate check — CI/CD evaluation gate (API-based)
evalgate check — CI/CD evaluation gate (API-based)
evalgate ci — One-command CI loop (manifest → impact → run → diff)
evalgate ci — One-command CI loop (manifest → impact → run → diff)
evalgate cluster — Group similar traces for faster cluster-level review
evalgate cluster — Group similar traces for faster cluster-level review
evalgate compare — Side-by-side result file comparison
evalgate compare — Side-by-side result file comparison
evalgate connect - Install EvalGate into a coding client
evalgate connect - Install EvalGate into a coding client
evalgate controls - Inspect enterprise guardrails, provider policy, retention, and drift alerts
evalgate controls - Inspect enterprise guardrails, provider policy, retention, and drift alerts
evalgate datasets - Manage governed Dataset Hub artifacts
evalgate datasets - Manage governed Dataset Hub artifacts
evalgate diff — Compare two run reports
evalgate diff — Compare two run reports
evalgate discover — Discover behavioral specs
evalgate discover — Discover behavioral specs
evalgate doctor — Comprehensive CI/CD readiness checklist
evalgate doctor — Comprehensive CI/CD readiness checklist
evalgate evals — Evals-as-Code manifest workflow
evalgate evals — Evals-as-Code manifest workflow
evalgate execution-state - Inspect and persist execution-state sessions
evalgate execution-state - Inspect and persist execution-state sessions
evalgate explain — Explain last gate/check failure
evalgate explain — Explain last gate/check failure
evalgate failure-modes — View and configure failure-mode taxonomy
evalgate failure-modes — View and configure failure-mode taxonomy
evalgate gate — Run the regression gate
evalgate gate — Run the regression gate
evalgate generate - Generate test cases via LLM
evalgate generate - Generate test cases via LLM
evalgate harness — Optimize a coding-agent harness from local metrics
evalgate harness — Optimize a coding-agent harness from local metrics
evalgate health — Measure application latency and errors on demand
evalgate health — Measure application latency and errors on demand
evalgate impact-analysis — Analyze impact of changes
evalgate impact-analysis — Analyze impact of changes
evalgate improve — inspect governed improvement cycles
evalgate improve — inspect governed improvement cycles
evalgate init - Initialize EvalGate in the current repository
evalgate init - Initialize EvalGate in the current repository
evalgate integrity - Inspect integrity and workflow-governance signals
evalgate integrity - Inspect integrity and workflow-governance signals
evalgate judge — Run, compare, or configure pluggable judges
evalgate judge — Run, compare, or configure pluggable judges
evalgate knowledge - Inspect learned workflow hints and playbook guidance
evalgate knowledge - Inspect learned workflow hints and playbook guidance
evalgate label — Interactive trace labeling for golden dataset
evalgate label — Interactive trace labeling for golden dataset
evalgate link — Attach the current Git repository
evalgate link — Attach the current Git repository
evalgate login — Authenticate this CLI
evalgate login — Authenticate this CLI
evalgate logout — Revoke and remove the CLI session
evalgate logout — Revoke and remove the CLI session
evalgate mcp - Inspect, audit, or proxy MCP servers with evidence capture
evalgate mcp - Inspect, audit, or proxy MCP servers with evidence capture
evalgate measurement - Inspect and execute evaluator validation
evalgate measurement - Inspect and execute evaluator validation
evalgate migrate — Migrate legacy config formats
evalgate migrate — Migrate legacy config formats
evalgate open — Open the EvalGate control plane
evalgate open — Open the EvalGate control plane
evalgate packs - Discover and install first-party domain evaluation packs
evalgate packs - Discover and install first-party domain evaluation packs
evalgate plan - Preview an autonomous workflow plan
evalgate plan - Preview an autonomous workflow plan
evalgate print-config — Show resolved config
evalgate print-config — Show resolved config
evalgate promote — Promote candidate eval cases to regression suite
evalgate promote — Promote candidate eval cases to regression suite
evalgate prompts - Manage governed Prompt Hub artifacts
evalgate prompts - Manage governed Prompt Hub artifacts
evalgate quality-profile - Scaffold evalgate.quality.json from product understanding
evalgate quality-profile - Scaffold evalgate.quality.json from product understanding
evalgate red-team — Fetch governed release and finding evidence
evalgate red-team — Fetch governed release and finding evidence
evalgate replay — Replay a candidate eval case (deprecated alias)
evalgate replay — Replay a candidate eval case (deprecated alias)
evalgate replay-candidate — Replay a candidate eval case
evalgate replay-candidate — Replay a candidate eval case
evalgate replay-decision - Compare two run reports and decide keep/discard
evalgate replay-decision - Compare two run reports and decide keep/discard
evalgate repo - Scan an exact connected repository commit for AI systems
evalgate repo - Scan an exact connected repository commit for AI systems
evalgate rollback - Remove files created by one init transaction
evalgate rollback - Remove files created by one init transaction
evalgate run — Run evaluation specifications
evalgate run — Run evaluation specifications
evalgate run-cli - Run an agent/CLI command with evidence capture
evalgate run-cli - Run an agent/CLI command with evidence capture
evalgate status — Summarize activation and gate readiness
evalgate status — Summarize activation and gate readiness
evalgate sync — Push/pull labels and prompt state between CLI and web
evalgate sync — Push/pull labels and prompt state between CLI and web
evalgate synthesize — Draft quarantined eval cases from examples or labeled failures
evalgate synthesize — Draft quarantined eval cases from examples or labeled failures
evalgate synthesize-run — Run durable, reviewable synthetic-data generation
evalgate synthesize-run — Run durable, reviewable synthetic-data generation
evalgate templates — List starter evaluation templates
evalgate templates — List starter evaluation templates
evalgate trace — Inspect stored trajectory metrics for a run
evalgate trace — Inspect stored trajectory metrics for a run
evalgate understand - Build an evidence-backed working theory of the product
evalgate understand - Build an evidence-backed working theory of the product
evalgate validate — Validate spec files without running them
evalgate validate — Validate spec files without running them
evalgate watch — Watch mode (re-execute on file save)
evalgate watch — Watch mode (re-execute on file save)
evalgate whoami — Show the authenticated identity
evalgate whoami — Show the authenticated identity
evalgate workflow - Inspect or generate workflow-native coverage bundles
evalgate workflow - Inspect or generate workflow-native coverage bundles