Skip to main content

heddle_client/
auth_args.rs

1//! CLI argument definitions for `heddle auth` commands.
2
3use clap::Subcommand;
4
5#[derive(Subcommand, Clone, Debug)]
6pub enum AuthCommands {
7    /// Authenticate with a Heddle server
8    Login {
9        /// Heddle server address
10        #[arg(long, default_value = "grpc.heddle.sh")]
11        server: String,
12
13        /// Don't open a browser automatically
14        #[arg(long)]
15        no_browser: bool,
16    },
17
18    /// Remove stored credentials for a server
19    Logout {
20        /// Heddle server address
21        #[arg(long)]
22        server: Option<String>,
23    },
24
25    /// Show current authentication status
26    Status {
27        /// Heddle server address
28        #[arg(long)]
29        server: Option<String>,
30    },
31
32    /// Create a service token for CI/scripts, scoped to a namespace
33    CreateServiceToken {
34        /// Display name for the service account (e.g. "github-ci-main")
35        name: String,
36        /// Namespace to scope the token to (e.g. "heddle/platform")
37        #[arg(long)]
38        namespace: String,
39        /// Heddle server address
40        #[arg(long)]
41        server: Option<String>,
42    },
43}