zeph_bench/cli.rs
1// SPDX-FileCopyrightText: 2026 Andrei G <bug-ops>
2// SPDX-License-Identifier: MIT OR Apache-2.0
3
4//! Clap subcommand definitions for `zeph bench`.
5//!
6//! The top-level entry point is [`BenchCommand`], which is nested under the root
7//! `zeph` binary as `zeph bench <subcommand>`.
8
9/// Top-level subcommands available under `zeph bench`.
10///
11/// Each variant maps to one logical operation:
12/// - [`List`][BenchCommand::List] — inspect what datasets are available locally.
13/// - [`Download`][BenchCommand::Download] — fetch a dataset from its canonical URL.
14/// - [`Run`][BenchCommand::Run] — execute a full benchmark run and write results.
15/// - [`Show`][BenchCommand::Show] — print a summary of a previously saved run.
16///
17/// # Examples
18///
19/// ```
20/// use zeph_bench::BenchCommand;
21///
22/// // The enum is parsed by Clap; construct directly in tests.
23/// let cmd = BenchCommand::List;
24/// assert!(matches!(cmd, BenchCommand::List));
25/// ```
26#[derive(clap::Subcommand, Debug)]
27pub enum BenchCommand {
28 /// List available benchmark datasets and their cache status
29 List,
30
31 /// Download a dataset to the local cache
32 Download {
33 /// Dataset name (e.g. gaia, tau-bench)
34 #[arg(long)]
35 dataset: String,
36 },
37
38 /// Run a benchmark against the agent
39 Run {
40 /// Dataset name (e.g. `locomo`, `gaia`, `frames`)
41 #[arg(long)]
42 dataset: String,
43
44 /// Directory where `results.json` and `summary.md` are written
45 #[arg(long)]
46 output: std::path::PathBuf,
47
48 /// Path to the local dataset file (JSON or JSONL).
49 ///
50 /// Required until automatic download is implemented. Obtain the file manually
51 /// from the URL shown by `zeph bench list`.
52 #[arg(long)]
53 data_file: Option<std::path::PathBuf>,
54
55 /// Run only the scenario with this ID (runs all scenarios if omitted)
56 #[arg(long)]
57 scenario: Option<String>,
58
59 /// LLM provider name as declared in `[[llm.providers]]` (uses default if omitted)
60 #[arg(long)]
61 provider: Option<String>,
62
63 /// Run with a baseline (non-agentic) configuration that disables tools and memory
64 #[arg(long)]
65 baseline: bool,
66
67 /// Resume a previously interrupted run, skipping already-completed scenarios
68 #[arg(long)]
69 resume: bool,
70
71 /// Disable deterministic mode — by default temperature is forced to 0.0 for
72 /// reproducibility; pass this flag to use the provider's configured temperature
73 #[arg(long)]
74 no_deterministic: bool,
75 },
76
77 /// Print a human-readable summary of results from a previous benchmark run
78 Show {
79 /// Path to the `results.json` file produced by `bench run`
80 #[arg(long)]
81 results: std::path::PathBuf,
82 },
83}