Skip to content

spotify-cli


spotify-cli / commands/auth

commands/auth

CLI command handlers for authentication.

Variables

authStatusCommand

const authStatusCommand: CommandHandler

Defined in: src/commands/auth.ts:43

Handles spotify auth status.

Reports whether the stored tokens are valid, expired, or missing.


loginCommand

const loginCommand: CommandHandler

Defined in: src/commands/auth.ts:19

Handles spotify login [--client-id <id>].

Initiates the OAuth PKCE flow, opening the user's browser to Spotify's authorization page. Outputs the token expiry and scopes on success.


logoutCommand

const logoutCommand: CommandHandler

Defined in: src/commands/auth.ts:33

Handles spotify logout.

Deletes stored OAuth tokens from disk.

MIT Licensed. Not affiliated with or endorsed by Spotify AB.