spotify-cli / commands/player
commands/player
CLI command handlers for playback control.
Variables
devicesCommand
constdevicesCommand:CommandHandler
Defined in: src/commands/player.ts:149
Handles spotify devices. Lists all available playback devices.
nextCommand
constnextCommand:CommandHandler
Defined in: src/commands/player.ts:54
Handles spotify next [--device <id>].
nowCommand
constnowCommand:CommandHandler
Defined in: src/commands/player.ts:19
Handles spotify now.
Outputs the currently playing track, or {"status": "not_playing"} if idle.
pauseCommand
constpauseCommand:CommandHandler
Defined in: src/commands/player.ts:48
Handles spotify pause [--device <id>].
playCommand
constplayCommand:CommandHandler
Defined in: src/commands/player.ts:29
Handles spotify play [--uri <uri>] [--context <uri>] [--device <id>] [--offset <n>] [--position <ms>].
Starts or resumes playback, optionally targeting a specific device, URI, or position.
prevCommand
constprevCommand:CommandHandler
Defined in: src/commands/player.ts:60
Handles spotify prev [--device <id>].
queueAddCommand
constqueueAddCommand:CommandHandler
Defined in: src/commands/player.ts:126
Handles spotify queue add <uri> [--device <id>].
Adds a track to the end of the playback queue.
queueCommand
constqueueCommand:CommandHandler
Defined in: src/commands/player.ts:116
Handles spotify queue. Outputs the current playback queue.
recentCommand
constrecentCommand:CommandHandler
Defined in: src/commands/player.ts:172
Handles spotify recent [--limit N] [--after <timestamp>] [--before <timestamp>].
Lists recently played tracks with optional cursor-based pagination.
repeatCommand
constrepeatCommand:CommandHandler
Defined in: src/commands/player.ts:106
Handles spotify repeat <off|track|context> [--device <id>].
seekCommand
constseekCommand:CommandHandler
Defined in: src/commands/player.ts:70
Handles spotify seek <ms> [--device <id>].
Seeks to a position in the currently playing track. Position must be non-negative.
shuffleCommand
constshuffleCommand:CommandHandler
Defined in: src/commands/player.ts:96
Handles spotify shuffle <on|off> [--device <id>].
transferCommand
consttransferCommand:CommandHandler
Defined in: src/commands/player.ts:159
Handles spotify transfer <device_id> [--play].
Transfers playback to a different device.
volumeCommand
constvolumeCommand:CommandHandler
Defined in: src/commands/player.ts:84
Handles spotify volume <0-100> [--device <id>].
Sets playback volume. Value must be between 0 and 100 inclusive.