Skip to content

CLI: export

Terminal window
vally export --eval-spec <path> [--eval-spec <path> ...] --exporter <specifier> [options] [-- key=value ...]
vally export --suite <name> --exporter <specifier> [options] [-- key=value ...]

Convert one or more eval specs to a format consumed by another evaluation tool. The export command validates each eval spec, resolves its agent and grading environments, loads an exporter plugin, and invokes it to generate output files. Exporters receive grader-only files separately so they can keep them out of the agent-visible task environment.

Select specs with repeatable --eval-spec paths or a named --suite.

Flag Type Required Description
--eval-spec <path> string Unless --suite is given Path to an eval.yaml file. Repeatable. Cannot be combined with --suite.
--suite <name> string Unless --eval-spec is given Named suite from .vally.yaml. Cannot be combined with --eval-spec or --tag.
--exporter <specifier> string Yes Exporter plugin to load (npm package name or local path)
--grader-plugin <specifier> string No Grader plugin to load from an npm package or local path. Prevents unknown-grader-type errors during validation. Additive and repeatable.
--output-dir <dir> string No Directory for output files (default: ./<exporter-name>/)
--tag <key=values> string No Filter stimuli by tag (repeatable). Use key=values to include or key!=values to exclude, e.g. --tag cost=free,low --tag flaky!=yes. Cannot be combined with --suite. A filter that matches zero stimuli exits with code 1.
--param <key=value> string No Set a param value (repeatable, e.g. --param MODEL=gpt-4o). Overrides eval param files and .vally.yaml.
--verbose boolean No Show resolved eval schema and plugin details

Options after -- are forwarded to the exporter plugin as key=value pairs.

An eval spec can supply exporter defaults:

defaults:
exporter:
- name: harbor
args:
baseImage: ubuntu:24.04

name matches an exporter plugin’s registered name, not the package or path passed to --exporter. That flag is still required; defaults do not load or select a plugin.

CLI arguments override individual defaults:

Terminal window
vally export --eval-spec eval.yaml \
--exporter @microsoft/vally-exporter-harbor \
-- baseImage=ubuntu:22.04
Code Meaning
0 Export completed successfully
1 Error or empty selection
Terminal window
vally export --eval-spec eval.yaml --exporter @contoso/vally-exporter-foo
Terminal window
vally export --eval-spec ./evals/my-eval/eval.yaml \
--exporter @contoso/vally-exporter-foo \
--output-dir ./exported \
--tag cost=free,low
Terminal window
vally export --eval-spec eval.yaml \
--exporter @contoso/exporter \
-- baseImage=ubuntu:22.04 format=compact
Terminal window
vally export \
--eval-spec ./evals/login/eval.yaml \
--eval-spec ./evals/checkout/eval.yaml \
--exporter @contoso/vally-exporter-foo \
--output-dir ./exported

Each spec is written into its own subdirectory of ./exported, named after the spec’s name field (sanitized) — for example ./exported/login/ and ./exported/checkout/. If two specs resolve to the same subdirectory name (compared case-insensitively, for cross-platform safety), the command reports an error and exits without writing anything.

Use a named suite to export a large benchmark without listing every file on the command line:

.vally.yaml
suites:
benchmark:
evals: ["benchmarks/**/eval.yaml"]
Terminal window
vally export --suite benchmark \
--exporter @contoso/vally-exporter-foo \
--output-dir ./exported