bt eval is currently macOS and Linux only.File selection
bt eval— discover and run all eval files in the current directory (recursive)bt eval tests/— discover eval files under a specific directorybt eval "tests/**/*.eval.ts"— glob patternbt eval a.eval.ts b.eval.ts— one or more explicit files
node_modules, .venv, venv, site-packages, dist-packages, and __pycache__ are excluded from automatic discovery. Explicit paths and globs bypass these exclusions.
Runtime configuration
- TypeScript
- Python
Requires Node.js 18.19.0+ or 20.6.0+. Bun 1.0+ and Deno with Node compatibility mode are also supported.By default,
bt eval auto-detects a runner from your project (tsx, vite-node, ts-node, then ts-node-esm). Set one explicitly with --runner / BT_EVAL_RUNNER:bt eval automatically resolves locally installed binaries from node_modules/.bin, so you can write --runner tsx instead of --runner ./node_modules/.bin/tsx (for example). If you see ESM or top-level await errors, try --runner vite-node.Sampling modes
Run a subset of your evaluation data as a non-final smoke run to catch obvious regressions before committing to the full dataset.When
--first or --sample is used, the experiment summary is labeled as non-final in Braintrust. Omitting both flags runs the full dataset and marks the summary as final.Flags
Summary output
When using--jsonl or reading SSE output, each evaluator summary object includes these fields:
Parameters
--param overrides values for evaluators that declare a parameters schema via loadParameters() (TypeScript) or load_parameters() (Python). This is the same parameters system used by remote evals, where parameters are version-tracked in Braintrust and appear as UI controls in the playground. See Create evaluation parameters for how to define and load parameters.
Each evaluator only receives the keys it declares. Extra keys are silently filtered, so a single command can target multiple evaluators with different schemas without errors.
parameters schema are unaffected.
Parameter matrix
--matrix-param works with the same parameters system as --param. Specify multiple values for one or more parameters and bt eval runs one experiment per combination, naming each <experiment-name> [key=value, ...].
--matrix-param requires exactly one evaluator to be selected. If your file exports multiple evaluators, use --filter to narrow down to one. It is not supported for eval files that export btEvalMain.
Passing arguments to the eval file
Use-- to forward extra arguments to the eval file via process.argv:
Running in CI
SetBRAINTRUST_API_KEY instead of using OAuth login:
--no-input and --json for non-interactive output: