spotify-cli / commands/player
commands/player
CLI command handlers for playback control.
Variables
devicesCommand
constdevicesCommand:CommandHandler
Defined in: src/commands/player.ts:151
Handles spotify devices. Lists all available playback devices.
nextCommand
constnextCommand:CommandHandler
Defined in: src/commands/player.ts:55
Handles spotify next [--device <id>].
nowCommand
constnowCommand:CommandHandler
Defined in: src/commands/player.ts:20
Handles spotify now.
Outputs the currently playing track, or {"status": "not_playing"} if idle.
pauseCommand
constpauseCommand:CommandHandler
Defined in: src/commands/player.ts:49
Handles spotify pause [--device <id>].
playCommand
constplayCommand:CommandHandler
Defined in: src/commands/player.ts:30
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:61
Handles spotify prev [--device <id>].
queueAddCommand
constqueueAddCommand:CommandHandler
Defined in: src/commands/player.ts:127
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:117
Handles spotify queue. Outputs the current playback queue.
recentCommand
constrecentCommand:CommandHandler
Defined in: src/commands/player.ts:174
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:107
Handles spotify repeat <off|track|context> [--device <id>].
seekCommand
constseekCommand:CommandHandler
Defined in: src/commands/player.ts:71
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:97
Handles spotify shuffle <on|off> [--device <id>].
transferCommand
consttransferCommand:CommandHandler
Defined in: src/commands/player.ts:161
Handles spotify transfer <device_id> [--play].
Transfers playback to a different device.
volumeCommand
constvolumeCommand:CommandHandler
Defined in: src/commands/player.ts:85
Handles spotify volume <0-100> [--device <id>].
Sets playback volume. Value must be between 0 and 100 inclusive.
