Adding CLI Arguments
Client CLI arguments are defined in a shared struct to avoid duplication:
Add to
ClientArgsinmodelexpress_common/src/client_config.rs- Single source of truth for shared arguments
- Register the variable name in
modelexpress_common/src/envs.rsand reference the constant:#[arg(long, env = crate::envs::MODEL_EXPRESS_...)](never a bare string literal, so the CLI and theenvsgetters cannot drift). All env-var names live inmodelexpress_common/src/envs.rs(Rust) andmodelexpress/envs.py(Python). - Do NOT use
-vshort flag (reserved for CLI's verbose)
Update
ClientConfig::load()in the same file- Add override logic in the "APPLY CLI ARGUMENT OVERRIDES" section
Do NOT duplicate in
Cli(modelexpress_client/src/bin/modules/args.rs)CliembedsClientArgsvia#[command(flatten)]- Only add CLI-specific arguments there (e.g.,
--format,--verbose)
Add tests in the
testsmodule ofclient_config.rs