Skip to main content

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        /// Run only the scenario with this ID (runs all scenarios if omitted)
49        #[arg(long)]
50        scenario: Option<String>,
51
52        /// LLM provider name as declared in `[[llm.providers]]` (uses default if omitted)
53        #[arg(long)]
54        provider: Option<String>,
55
56        /// Run with a baseline (non-agentic) configuration that disables tools and memory
57        #[arg(long)]
58        baseline: bool,
59
60        /// Resume a previously interrupted run, skipping already-completed scenarios
61        #[arg(long)]
62        resume: bool,
63
64        /// Disable deterministic mode — by default temperature is forced to 0.0 for
65        /// reproducibility; pass this flag to use the provider's configured temperature
66        #[arg(long)]
67        no_deterministic: bool,
68    },
69
70    /// Print a human-readable summary of results from a previous benchmark run
71    Show {
72        /// Path to the `results.json` file produced by `bench run`
73        #[arg(long)]
74        results: std::path::PathBuf,
75    },
76}