spotme
A small command-line tool for managing my Spotify library and playback — find unavailable or duplicate tracks in your liked songs, control playback, and see what's playing.
Built on spotipy.
Requirements
- Python 3.10+
- A Spotify developer app (client ID + secret)
- Spotify Premium (required by Spotify for playback control)
Setup
Install from PyPI with pipx (recommended):
pipx install spotme-cli
It's published as spotme-cli because the plain spotme name was already taken on PyPI — the command you run is still spotme.
To install from a local checkout instead:
pipx install .
Or set up a development environment:
python3 -m venv .venv
source .venv/bin/activate
pip install -e '.[dev]'
Credentials
The quickest way is to run the setup command and answer the prompts:
spotme init
That writes ~/.config/spotme/.env for you. To do it manually, copy the example config and add your keys from the Spotify developer dashboard:
mkdir -p ~/.config/spotme
cp .env.example ~/.config/spotme/.env
Fill in SPOTIPY_CLIENT_ID and SPOTIPY_CLIENT_SECRET. Keep SPOTIPY_REDIRECT_URI as http://127.0.0.1:8888/callback, and make sure that URI is added to your app's redirect URIs in the Spotify dashboard.
A .env in the current directory also works and takes precedence — handy while developing.
Usage
spotme <command>
From a repo checkout without installing, python -m spotme <command> works too.
| Command | Description |
|---|---|
init |
set up spotify credentials |
playing |
show what's currently playing |
start |
launch spotify and start playback |
play |
start playback |
pause |
pause playback |
next |
skip to the next track |
devices |
list available devices |
activate |
transfer playback to the computer |
unavailable |
find unavailable tracks in liked songs |
duplicates |
find duplicate tracks in liked songs |
The first command you run opens a browser window for OAuth login; tokens are cached at ~/.cache/spotme/token.
Library commands (unavailable, duplicates) page through all of your liked songs and can take a moment on large libraries. Playback commands (play, pause, next, playing) require an active Spotify device.
start shows a numbered list of your available devices to pick from, plus a browser option at the end. Choosing browser opens the Spotify web player, waits for it to register as a new device, then starts playback there. Note that browser autoplay policies may require one manual click in the tab before the first remote play goes through. Any Spotify Connect device (e.g. the desktop app or a headless daemon like spotifyd) shows up in the list automatically. Enter nothing or q to cancel.
Testing
Tests use pytest and mock the Spotify API — no credentials or network needed:
pip install -e '.[dev]'
python -m pytest
Metadata
Release files for spotme-cli 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| spotme_cli-0.1.1.tar.gz | 14.6 kB | With provenance | Details for spotme_cli-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| spotme_cli-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for spotme_cli-0.1.1-py3-none-any.whl |
Total release size: 24.1 kB
Release files / spotme_cli-0.1.1.tar.gz
| Download URL | spotme_cli-0.1.1.tar.gz |
|---|---|
| Size | 14.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
85d5351a1eaf0704cffa8f2e6cadfe333bbd0e487c918a9073d20cd9d7a7743e
|
|
BLAKE2b-256 checksum How to use checksums |
63f94aa45b72bd9d4f348fce528c8c896b679e4f76c14be1f646f6b485123769
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.
Transparency logRelease files / spotme_cli-0.1.1-py3-none-any.whl
| Download URL | spotme_cli-0.1.1-py3-none-any.whl |
|---|---|
| Size | 9.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
57ad0342be32b35621de65fea46a468ceb062b69981ea579371d43c3210fcdc2
|
|
BLAKE2b-256 checksum How to use checksums |
67237a883adca54e1c6b127653e9ad06474bcf7565261cb7e160d4ab7e863f5f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.
Transparency logSecurity for spotme-cli 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for spotme_cli-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.