Crate atune_cli
Expand description
atune — the command-line interface to the atune tuner.
hone’s interaction model, modernized: no daemon and no RPC stack, because
the journal file is the coordination point (tune any
program). Twelve subcommands:
run— the headline one-shot tuner: sample the--paramdistributions, substitute them into a child process’s argument vector and environment, runNtrials (up toKat once), and map each child’s stdout/exit-status to a trial outcome;ask/tell— the scripted handshake, for tuning a program in any language from a shell loop;best/trials— read a study back, as text or JSON;export— write a study as an Optuna journal file (--optuna), so it opens in optuna-dashboard with zero atune GUI code;import— read an Optuna journal file into an atune storage (the M5.1 reverse ofexport);top— a live terminal view of a study (ratatui), read-only, no server;report— a self-contained static HTML report of a study;importance— rank a study’s parameters by in-house PED-ANOVA importance;doctor— read a study and report findings that likely cost you budget: a crowded bound, an inert parameter, a scale that hides the optimum, a sampler that no longer fits;serve— expose a study over TCP so remote workers share it throughRemoteStorage(M5.2); the one subcommand that is a server, and the only one whose default (loopback) and non-loopback-opt-in warning are a security posture (add workers).
Every fallible path returns a value: a bad argument or a failed child is a
CliError and a non-zero exit, never a panic. Argument parsing itself is
clap’s, which exits with its own message on a malformed invocation.
§Why this is a library
The binary (src/main.rs) is a shim over run. The command-line surface
itself lives in cli, public, so that it can be read from outside the
crate: the documentation generator walks Cli through
clap::CommandFactory to produce the CLI reference page, which is only
possible if the clap types are reachable. It also makes the surface
unit-testable without spawning a process.
Re-exports§
Modules§
- cli
- The command-line surface, as
clapderive types.
Functions§
- run
- Parses the command line, dispatches, and exits non-zero on failure.