spotify_cli/cli/args/auth.rs
1//! Authentication command definitions.
2
3use clap::Subcommand;
4
5#[derive(Subcommand)]
6pub enum AuthCommand {
7 /// Login to Spotify (opens browser for OAuth)
8 Login {
9 /// Force re-authentication (new browser flow)
10 #[arg(long, short = 'f')]
11 force: bool,
12 },
13 /// Logout and clear stored tokens
14 Logout,
15 /// Refresh the access token
16 Refresh,
17 /// Check authentication status
18 Status,
19}
20
21#[derive(Subcommand)]
22pub enum PinCommand {
23 /// Add a pinned resource
24 Add {
25 /// Resource type: playlist, track, album, artist, show, episode, audiobook
26 #[arg(value_parser = ["playlist", "track", "album", "artist", "show", "episode", "audiobook"])]
27 resource_type: String,
28 /// Spotify URL or ID
29 url_or_id: String,
30 /// Human-friendly alias for searching
31 alias: String,
32 /// Optional comma-separated tags
33 #[arg(long, short = 't')]
34 tags: Option<String>,
35 },
36 /// Remove a pinned resource
37 Remove {
38 /// Alias or ID of the pin to remove
39 alias_or_id: String,
40 },
41 /// List pinned resources
42 List {
43 /// Filter by resource type
44 #[arg(long, short = 'T', value_parser = ["playlist", "track", "album", "artist", "show", "episode", "audiobook"])]
45 resource_type: Option<String>,
46 },
47}