| 41 | #[derive(Parser, Debug)] |
| 42 | #[command(version, about = "The CodSpeed CLI tool", styles = create_styles())] |
| 43 | pub struct Cli { |
| 44 | /// The URL of the CodSpeed GraphQL API |
| 45 | #[arg(long, env = "CODSPEED_API_URL", global = true, hide = true)] |
| 46 | pub api_url: Option<String>, |
| 47 | |
| 48 | /// The OAuth token to use for all requests |
| 49 | #[arg(long, env = "CODSPEED_OAUTH_TOKEN", global = true, hide = true)] |
| 50 | pub oauth_token: Option<String>, |
| 51 | |
| 52 | /// [deprecated] Load configuration from `~/.config/codspeed/{config-name}.yaml` |
| 53 | /// instead of the default `config.yaml`. Prefer `--profile` instead. |
| 54 | #[arg(long, env = "CODSPEED_CONFIG_NAME", global = true, hide = true)] |
| 55 | #[deprecated(note = "use `--profile` / `CODSPEED_PROFILE` instead")] |
| 56 | pub config_name: Option<String>, |
| 57 | |
| 58 | /// The CodSpeed profile to use |
| 59 | #[arg(long, env = "CODSPEED_PROFILE", global = true)] |
| 60 | pub profile: Option<String>, |
| 61 | |
| 62 | /// Path to project configuration file (codspeed.yaml) |
| 63 | /// If provided, loads config from this path. Otherwise, searches for config files |
| 64 | /// in the current directory and upward to the git root. |
| 65 | #[arg(long, global = true)] |
| 66 | pub config: Option<PathBuf>, |
| 67 | |
| 68 | /// The directory to use for caching installed tools |
| 69 | /// The runner will restore cached tools from this directory before installing them. |
| 70 | /// After successful installation, the runner will cache the installed tools to this directory. |
| 71 | /// Only supported on ubuntu and debian systems. |
| 72 | #[arg(long, env = "CODSPEED_SETUP_CACHE_DIR", global = true)] |
| 73 | pub setup_cache_dir: Option<String>, |
| 74 | |
| 75 | #[command(subcommand)] |
| 76 | command: Commands, |
| 77 | } |
| 78 | |
| 79 | #[derive(Subcommand, Debug)] |
| 80 | enum Commands { |
nothing calls this directly
no outgoing calls
no test coverage detected