Skip to content

spotify-cli


spotify-cli / commands/playlists

commands/playlists

CLI command handlers for playlist operations.

Variables

playlistAddCommand

const playlistAddCommand: CommandHandler

Defined in: src/commands/playlists.ts:57

Handles spotify playlist add <playlist_id> [<uri>...] [--uris-file <path>] [--position N].

Adds one or more tracks to a playlist at an optional position. URIs may be passed as positional args, via --uris-file <path> (one per line, blank lines and # comments allowed), or by passing - as a positional and piping URIs on stdin. All sources are concatenated.


playlistCommand

const playlistCommand: CommandHandler

Defined in: src/commands/playlists.ts:15

Handles spotify playlist <id>. Outputs playlist details.


playlistCreateCommand

const playlistCreateCommand: CommandHandler

Defined in: src/commands/playlists.ts:179

Handles spotify playlist create <name> [--description ...] [--public].

Creates a new playlist for the current user.


playlistRemoveCommand

const playlistRemoveCommand: CommandHandler

Defined in: src/commands/playlists.ts:111

Handles spotify playlist remove <playlist_id> [<uri>...] [--uris-file <path>] [--match name] [--index N].

Removes tracks by URI, name substring match, or 1-based index. URIs may be passed as positional args, via --uris-file <path> (one per line, blank lines and # comments allowed), or by passing - and piping URIs on stdin. --match and --index can be repeated.


playlistRenameCommand

const playlistRenameCommand: CommandHandler

Defined in: src/commands/playlists.ts:199

Handles spotify playlist rename <id> <new_name>.

Renames an existing playlist.


playlistsCommand

const playlistsCommand: CommandHandler

Defined in: src/commands/playlists.ts:27

Handles spotify playlist list [--limit N] [--offset N].

Lists the current user's playlists.


playlistTracksCommand

const playlistTracksCommand: CommandHandler

Defined in: src/commands/playlists.ts:39

Handles spotify playlist tracks <id> [--limit N] [--offset N].

Lists the tracks in a playlist with optional pagination.


playlistUpdateCommand

const playlistUpdateCommand: CommandHandler

Defined in: src/commands/playlists.ts:218

Handles spotify playlist update <id> [--name ...] [--description ...] [--public|--private] [--collaborative|--no-collaborative].

Updates one or more details of an existing playlist. At least one field flag must be provided.

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