1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#[derive(clap::Args)]
pub struct AuthArgs {
/// Auto-auth from browser cookies, falling back to an interactive Chrome/Edge login
#[arg(long)]
pub login: bool,
/// Force-refresh the JWT via the stored Clerk session cookie. Use this
/// when the CLI returns `auth_expired` or `Token validation failed`
/// without requiring a full re-login from the browser.
#[arg(long)]
pub refresh: bool,
/// JWT token (manual fallback)
#[arg(long)]
pub jwt: Option<String>,
/// Read the JWT token from standard input instead of process arguments
#[arg(long, conflicts_with_all = ["jwt", "cookie", "cookie_stdin"])]
pub jwt_stdin: bool,
/// Clerk __client cookie (manual fallback for headless servers)
///
/// Accepts either the raw __client value or a full browser Cookie header.
#[arg(long)]
pub cookie: Option<String>,
/// Read the Clerk cookie from standard input instead of process arguments
#[arg(long, conflicts_with_all = ["cookie", "jwt", "jwt_stdin"])]
pub cookie_stdin: bool,
/// Device ID
#[arg(long)]
pub device: Option<String>,
/// Remove stored authentication and the interactive login profile
#[arg(long)]
pub logout: bool,
}