{"id":37080266,"url":"https://github.com/ciembor/spotify-cmd","last_synced_at":"2026-01-14T09:44:31.892Z","repository":{"id":213786373,"uuid":"734924322","full_name":"ciembor/spotify-cmd","owner":"ciembor","description":"Command line Spotify client","archived":false,"fork":false,"pushed_at":"2025-12-21T11:24:45.000Z","size":64,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-22T02:53:09.626Z","etag":null,"topics":["command-line-tool","spotify","spotify-client","spotifyd","spotipy","terminal-app"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/spotify-cmd/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ciembor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-12-23T03:27:07.000Z","updated_at":"2025-12-21T11:24:46.000Z","dependencies_parsed_at":"2025-12-19T18:06:47.982Z","dependency_job_id":null,"html_url":"https://github.com/ciembor/spotify-cmd","commit_stats":null,"previous_names":["ciembor/spotify-cmd"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/ciembor/spotify-cmd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ciembor%2Fspotify-cmd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ciembor%2Fspotify-cmd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ciembor%2Fspotify-cmd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ciembor%2Fspotify-cmd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ciembor","download_url":"https://codeload.github.com/ciembor/spotify-cmd/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ciembor%2Fspotify-cmd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28416120,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T08:38:59.149Z","status":"ssl_error","status_checked_at":"2026-01-14T08:38:43.588Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["command-line-tool","spotify","spotify-client","spotifyd","spotipy","terminal-app"],"created_at":"2026-01-14T09:44:31.286Z","updated_at":"2026-01-14T09:44:31.886Z","avatar_url":"https://github.com/ciembor.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📻 spotify-cmd v0.1.17\n\n`spotify-cmd` is a Spotify client that allows controlling the playback of **albums and playlists from a user's library** (based on names or Spotify URIs) and individual tracks (based solely on Spotify URIs). The application is intended for use with [spotifyd](https://github.com/Spotifyd/spotifyd), but it works with any Spotify-enabled device.\n\n## Installation\n\nEnsure you have Python 3 installed. Package is available on PyPi: https://pypi.org/project/spotify-cmd/. Install it using `pip3`:\n\n```bash\npip3 install spotify-cmd\n```\n\n### Debian/Ubuntu (apt)\n\n```bash\ncurl -fsSL https://maciej-ciemborowicz.eu/apt/spotify-cmd.gpg | sudo gpg --dearmor -o /usr/share/keyrings/spotify-cmd-archive-keyring.gpg\necho \"deb [signed-by=/usr/share/keyrings/spotify-cmd-archive-keyring.gpg] https://maciej-ciemborowicz.eu/apt ./\" | sudo tee /etc/apt/sources.list.d/spotify-cmd.list\nsudo apt update\nsudo apt install spotify-cmd\n```\n\nAfter installing from apt, the daemon is managed by systemd. Create the config at `/var/lib/spotify-cmd/.config/spotify-cmd/config.ini`, then restart:\n\n```bash\nsudo systemctl restart spotify-cmd\nsudo systemctl status spotify-cmd --no-pager\n```\n\nIf the service stays inactive, you need a token cache at `/var/lib/spotify-cmd/.config/spotify-cmd/cache/token-cache`. You can either generate it by running a one-time OAuth flow as the service user, or copy it from a user cache.\n\n```bash\nsudo systemctl stop spotify-cmd\nsudo -u spotify-cmd /usr/bin/spotify-cmd-daemon --foreground\n# Complete the OAuth flow in your browser (use an SSH tunnel if remote).\nsudo systemctl start spotify-cmd\n```\n\nOr copy an existing cache:\n\n```bash\nsudo install -d -o spotify-cmd -g spotify-cmd /var/lib/spotify-cmd/.config/spotify-cmd/cache\nsudo cp ~/.config/spotify-cmd/cache/token-cache /var/lib/spotify-cmd/.config/spotify-cmd/cache/token-cache\nsudo chown spotify-cmd:spotify-cmd /var/lib/spotify-cmd/.config/spotify-cmd/cache/token-cache\nsudo systemctl restart spotify-cmd\n```\n\nIf you want to run the client as a regular user (for example `pi`), add it to the `spotify-cmd` group so it can access the daemon socket:\n\n```bash\nsudo usermod -aG spotify-cmd \u003cuser\u003e\n```\n\n### Headless spotifyd (Raspberry Pi, servers)\n\nWhen using spotifyd on headless hosts, run it in the foreground under systemd and disable MPRIS to avoid DBus/X11 issues:\n\n```ini\n[global]\nuse_mpris = false\n```\n\n## Configuration\n\nThe application configuration should be located in `~/.config/spotify-cmd/config.ini`. Below is a detailed guide on each configuration option:\n\n```ini\n[SPOTIFY]\nclient_id = your_client_id\nclient_secret = your_client_secret\ndevice_name = your_device_name  # optional; if omitted, uses the current active device\nredirect_uri = http://localhost:8888/callback\n\n[SPOTIFY_CMD_DAEMON]\nsocket_path = /run/spotify-cmd/spotify-cmd.sock\nsocket_buffer_size = 1024\n```\n\n* **client_id**, **client_secret** are required. Obtain these by creating an app at the [Spotify Developer Dashboard](https://developer.spotify.com/dashboard/applications).\n* **device_name** is optional. If set, `spotify-cmd-daemon` will force to use it even if another is active; if omitted, it uses the current active device.\n* **redirect_uri** is used for Spotify authentication. If not set, it defaults to 'http://localhost:8888/callback'.\n* **socket_path** specifies the Unix socket path for the daemon. Defaults to '/run/spotify-cmd/spotify-cmd.sock' on Linux and '/tmp/spotify-cmd-daemon.sock' on other systems.\n* **socket_buffer_size** defines the buffer size for socket communication. Defaults to 1024.\n\n## Commands\n\n`spotify-cmd` offers the following commands:\n\n* `get playlists`: Lists the user's playlists.\n* `get albums`: Lists the user's albums.\n* `play playlist \u003cname\u003e`, `play album \u003cname\u003e`, `play uri \u003cspotify_uri\u003e`: Plays a specific playlist, album, or resource by Spotify URI.\n* `play`, `pause`, `next`, `previous`: Controls playback.\n* `set shuffle \u003con|off\u003e`: Toggles shuffle mode.\n* `set volume \u003c0-100\u003e`: Sets the volume level.\n* `find \u003csearch_type\u003e \u003cquery\u003e`: Searches for items on Spotify. Acceptable search types are `album`, `artist`, `playlist`, `track`, `episode`, and `show`.\n* `version`: Prints the installed `spotify-cmd` version.\n\n## Output Format\n\nSelect output format using the `--format` flag:\n\n* `--format text`: Plain text output (default).\n* `--format json`: Output in JSON format.\n* `--format verbose`: Verbose text information.\n\n## Usage Examples\n\n``` bash\nspotify-cmd get albums\nspotify-cmd get playlists\nspotify-cmd play album \"Listening Tree\"\nspotify-cmd play uri spotify:album:5zKTfU3vyuZfLgtYRfJyza\nspotify-cmd find artist \"Nils Frahm\"\n```\n\n## For Developers\n\nDevelopers can create interfaces for `spotify-cmd-daemon` using `/run/spotify-cmd/spotify-cmd.sock` (Linux) or `/tmp/spotify-cmd-daemon.sock` (other systems). Socket handling and data format details are in the `./src/common` directory (there is no documentation).\n\nDaemon helper:\n\n* `spotify-cmd-daemon --version` prints the installed daemon version.\n\n## Planned Features and Upcoming Development\n\n* Displaying tracks from specific albums or playlists.\n* MPRIS D-Bus interface support to reduce server queries.\n* `spotify-cmd-ui`: A ncurses-based UI for track display and control, working with the same daemon.\n* ~~Search functionality.~~ [Done in 0.1.4]\n* Support for other resource types like artists.\n* Config instructions after installation / creation of default config.\n\n## License\n\nThis project is licensed under the terms of the GNU General Public License. Detailed information can be found in the [LICENSE.md](LICENSE.md) file.\n\n## Author\n\nProject created by Maciej Ciemborowicz.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fciembor%2Fspotify-cmd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fciembor%2Fspotify-cmd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fciembor%2Fspotify-cmd/lists"}