Skip to content
Context docs
Build

CLI reference

This page lists every context evals command, what it does and the flag you need most.

Every command except traces get prints one JSON document on standard output (traces get prints a summary and writes the JSON to a file) and takes --help for its full syntax, flags and examples. context evals describe <shape> prints the JSON shape a command reads or writes, with no key needed. Commands marked write need a key with evals:write; the rest need evals:read.

The CLI needs three environment variables: CONTEXT_APP_ORIGIN (your deployment’s address), CONTEXT_ORG_ID (the Organization ID in Settings > General) and CONTEXT_API_KEY. CONTEXT_WORKSPACE_ID is optional and is used when you don’t pass --workspace.

--workflow <id> narrows evals list, evals benchmark list, evals datasets list, evals monitors list and evals traces list to one Evals workflow.

Datasets and dataset tasks

The CLI calls a dataset task an item, so its commands are the items ones.

CommandWhat it doesMain flag
evals datasets listLists a workspace’s datasets, a page at a time.--workspace <id>
evals datasets get <id>Shows one dataset and its version state.
evals datasets createWrite. Creates a dataset.--name <text>
evals datasets update <id>Write. Changes a dataset’s name or description.--name <text>
evals datasets delete <id>Write. Deletes a dataset.
evals datasets duplicate <id>Write. Copies a dataset and its dataset tasks.
evals datasets links <id>Lists the benchmarks that use a dataset.
evals datasets importWrite. Imports dataset tasks with their criteria and files from a CSV, JSON, JSONL or zip file.--from <file>, --check to preview
evals datasets versions <id>Lists a dataset’s saved versions, newest first.
evals datasets save <id>Write. Saves unsaved dataset task and criteria changes as the next version.--base-version N --working-copy-hash H
evals datasets discard <id>Write. Throws away unsaved changes, back to a saved version.--base-version N --working-copy-hash H --yes
evals datasets items list <dataset-id>Lists the dataset tasks in a dataset.--limit N
evals datasets items get <item-id>Shows one dataset task.
evals datasets items createWrite. Adds a dataset task.--dataset <id> --prompt <text>
evals datasets items update <item-id>Write. Changes a dataset task.--golden <text>
evals datasets items delete <item-id>Write. Removes a dataset task.
evals file upload <path>Write. Uploads an input or expected file for a dataset task and prints its ID.--dataset <id>

Criteria and models

CommandWhat it doesMain flag
evals criteria getShows the criteria on a dataset or a dataset task.--dataset <id> or --task <id>
evals criteria setWrite. Replaces a dataset’s or a dataset task’s criteria with a JSON file.-f <file>
evals criteria checkTries every Python check in a criteria file here first, and saves nothing. set runs the same check.-f <file>
evals criteria addWrite. Copies a criterion one dataset task carries onto other dataset tasks.--dataset <id> --criterion <name> --all
evals criteria removeWrite. Takes a criterion off dataset tasks.--dataset <id> --criterion <name> --all
evals criteria libraryLists your organization’s shared criteria, the ones a monitor can bind.--search <text>
evals criteria shareWrite. Adds or updates one shared criterion, such as an agent judge, and prints its binding.-f <file>
evals models listLists the models an agent can run, and the judge models.--agent <id> or --evaluation <id>

Benchmarks and runs

CommandWhat it doesMain flag
evals benchmark listLists a workspace’s benchmarks.--workspace <id>
evals benchmark get <id>Shows one benchmark.
evals benchmark createWrite. Creates a benchmark from an axis file.--axes <file>
evals benchmark update <id>Write. Changes a benchmark.--judge-model <model>
evals benchmark delete <id>Write. Deletes a benchmark.
evals benchmark duplicate <id>Write. Copies a benchmark and its dataset links, without runs.
evals benchmark links <id>Lists the datasets linked to a benchmark.
evals benchmark linkWrite. Links a dataset to a benchmark.--benchmark <id> --dataset <id>
evals benchmark unlinkWrite. Removes a dataset from a benchmark.--benchmark <id> --dataset <id>
evals benchmark run createWrite. Starts a run of every dataset task in every cell.--benchmark <id>
evals benchmark run list <benchmark-id>Lists a benchmark’s runs.
evals benchmark run get <run-id>Shows a run’s status and counts.
evals benchmark run watch <run-id>Waits for a run to end and prints its final status. Exits 0, 3 or 4 by outcome; see Errors.--out <path>
evals benchmark run stop <run-id>Write. Asks a run to stop. Exits 5 if it had already ended.
evals benchmark run tasks <run-id>Lists one cell’s tasks with score, verdicts, cost and latency.--cell <cell-id>
evals benchmark run task <run-id> <task-id>Shows one task’s full answer and each criterion’s reasoning.--cell <cell-id>

Monitors

These need monitoring, which your administrator turns on. See Monitors.

CommandWhat it doesMain flag
evals monitors listLists a workspace’s monitors.--agent <id>, --workflow <id>
evals monitors get <id>Shows one monitor: targets, criteria, pass mark, state and revision.--as-update
evals monitors createWrite. Creates a monitor from a JSON file.--from <file>
evals monitors update <id>Write. Replaces a monitor’s settings from a file, or changes one field.--from <file> or --pass-mark <n>
evals monitors pause <id>Write. Stops grading new requests. Results stay.--revision <n>
evals monitors resume <id>Write. Grades new requests again, charged to you.--revision <n>
evals monitors delete <id>Write. Deletes a monitor and its results.--revision <n>

Evaluations of any kind

These treat monitors (monitor:<id>) and benchmarks (benchmark:<id>) the same way.

CommandWhat it doesMain flag
evals listLists monitors and benchmarks together, with counts for each.--kind monitor|benchmark
evals get <ref>Shows one, with its criteria.
evals createWrite. Creates a monitor or a benchmark from a JSON file.--from <file>
evals run <ref>Write. Starts a run of a benchmark. A monitor runs on its own.
evals results <ref>Lists graded results, newest first: request, answer, score, pass and each criterion’s verdict.--limit N
evals add-rowsWrite. Adds dataset tasks to a dataset from a JSON file.--dataset <id> --from <file>
evals grade-rowsWrite. Adds dataset tasks that already carry their answer, and grades each one now, with no run, by every benchmark linked to the dataset. The judges are charged to you.--dataset <id> --from <file>
evals targets <kind>Lists your agents, skills, applets or Evals workflows by name, with the IDs a monitor names.--search <text>

Traces, usage and feedback

CommandWhat it doesMain flag
evals traces listLists trace sessions with filters and search.--from <when>
evals traces get <session-id>Writes one session’s full detail to a file.--out <path>
evals filter-optionsLists the models, providers, agents and users that have trace data.
evals agent <agent-id>Shows one agent’s cost, tokens and daily usage.--from <when>
evals user <user-id>Shows one user’s cost, tokens and usage by agent.--from <when>
evals feedback listLists feedback, newest first.--skill <id>

Scorecards

CommandWhat it doesMain flag
evals scorecard createWrite. Creates a rubric and attaches it to a skill.--skill <id>
evals scorecard listLists the rubrics attached to a skill.--skill <id>
evals scorecard getShows one rubric.--scorecard <id>
evals scorecard set-criteriaWrite. Replaces a rubric’s questions.--from <file>
evals scorecard renameWrite. Renames a rubric.--name <text>
evals scorecard set-descriptionWrite. Sets or clears a rubric’s description.--description <text>
evals scorecard attachWrite. Attaches a rubric to a skill.--scorecard <id> --skill <id>
evals scorecard detachWrite. Detaches a rubric from a skill.--scorecard <id> --skill <id>

Help

CommandWhat it doesMain flag
evals describePrints the JSON shape of any CLI input or output. Needs no key.