Skip to main content

Subcommands

The CLI uses the project of your langwatch login, or the key in LANGWATCH_API_KEY. Reading runs needs analytics:view; starting or cancelling one needs analytics:manage.

run

The question goes first, or as --ask when you want several. estimate takes the same flags, less --name, --estimate, --detach and --show.

What run prints

The statement it wrote and the two window values, then one progress line that updates in place:
When the run ends, the headline replaces it, followed by the first rows and the results command that reads the rest:
A run over more than 1,000 rows prints its estimate before it starts. Ctrl-C stops watching; the run keeps going, and the command prints the status line that reads it back.

Exit code

run exits 0 when the run finished and non-zero when it failed, was cancelled or was interrupted before it ended, so a script can tell a red run from a green one. --detach exits 0 as soon as the run is created.

estimate

Prints the rows, the requests, the tokens and the cost, and judges no row. See Limits and cost for how the number is reached.

status

Prints the run:
  • its id, name and status
  • rows judged over rows total, the matched count, and the unjudged rows
  • the tokens and the cost
  • the questions, the matches per question, and the statement
Pass --wait to follow the run until it ends, for up to 45 minutes or the number of minutes you give. It exits non-zero when the run failed. A run’s status is one of queued, planning, running, finished, failed or cancelled.

list

results

Each verdict prints as the trace, the question, the status, the answer with its probability, and the conversation. See Results for the JSON shape.

sample

-n, --number <n> sets how many rows to read, at most 25 (default 5). The text is re-read through the run’s own statement, so sampling judges no row again and is not charged. A text longer than 2,000 characters is cut on screen; read it whole with -o json.

cancel

Stops the run before its next page and keeps every verdict it wrote. Cancelling a run that already ended answers instant_eval_already_finished.

Output formats

Every subcommand takes the shared output flags: -o table|json|agents|yaml, --json <fields> and --jq <path>. In -o json, run still waits for the run and prints one document holding the run and the verdicts of the rows it showed. The statement is a field of that document rather than a printed block, and the progress line goes to standard error, so standard output holds one object.
Last modified on October 12, 2026