Skip to main content
The ZeroEval CLI ships with the Python SDK and gives you terminal access to monitoring, prompts, judges, and optimization. It is designed to be agent-friendly and works well in CI pipelines, scripted workflows, and agent toolchains.

Setup

Run the interactive setup to save your API key and resolve your project:
This opens the ZeroEval dashboard, prompts for your API key, saves it to your shell config (e.g. ~/.zshrc, ~/.bashrc), and links your project automatically.
For non-interactive environments like CI or coding agents, use auth set instead:

Auth commands

Auth resolution

The CLI resolves credentials in this order:
  1. Explicit CLI flags (--project-id, --api-base-url)
  2. Environment variables (ZEROEVAL_API_KEY, ZEROEVAL_PROJECT_ID, ZEROEVAL_BASE_URL)
  3. Global CLI config file
Config file location:
  • macOS / Linux: ~/.config/zeroeval/config.json (or $XDG_CONFIG_HOME/zeroeval/config.json)
  • Windows: %APPDATA%/zeroeval/config.json

Global flags

Global flags must appear before the subcommand:

Output modes

  • text (default) — human-readable; dict/list payloads are pretty-printed as JSON.
  • json — stable, machine-readable JSON to stdout. Errors go to stderr as structured JSON. Confirmation prompts (e.g. optimize promote) are auto-skipped in JSON mode.

Exit codes

Querying and filtering

Most list and get commands support --where, --select, and --order for client-side filtering, projection, and sorting.

--where

Filter rows. Repeatable — multiple clauses are AND-ed.
Supported operators: = (exact), ~ (substring), in (JSON array).

--select

Project specific fields. Comma-separated, supports dotted paths.

--order

Sort results by a field. Defaults to ascending.

Monitoring

Monitoring commands require a --project-id (resolved automatically after zeroeval setup).

Sessions

Traces

traces spans returns the spans belonging to a specific trace, useful for debugging individual requests.

Spans

Prompts

List and inspect

Submit feedback

Provide feedback on a prompt completion for DSPy optimization and prompt tuning:
For scored judges, add judge-specific fields:
--thumbs-up and --thumbs-down are mutually exclusive and one is required.

Judges

List and inspect

Filter evaluations

Create a judge

Or load the prompt from a file:

Submit judge feedback

For scored judges with per-criterion feedback:

Optimization

Start, inspect, and promote prompt or judge optimization runs. All optimization commands require --project-id.

Prompt optimization

Judge optimization

Spec (machine-readable manual)

The spec commands dump the CLI’s command and parameter contract as JSON or Markdown, useful for agents and toolchains that need to discover available commands programmatically.

CI / automation recipes

Get the latest traces as JSON

Check judge pass rate

Promote an optimization run non-interactively

Tracing quickstart

Get your first trace in under 5 minutes

Judges

How calibrated judges evaluate your production traffic

Prompt setup

Add ze.prompt() to your Python or TypeScript codebase

Skills

Let your coding agent handle SDK install and judge setup