Skip to main content

pyspoti

An interactive terminal browser for Spotify.

Search artists, albums, and tracks — then navigate between them with a menu-driven UI. Album covers display inline on supported terminals.

Install

Requires Python 3.12+.

uv tool install pyspoti
# or
pip install pyspoti

For local development:

git clone https://github.com/gabriel-jung/pyspoti.git
cd pyspoti
uv sync

Requires a Spotify application with Client Credentials. Add the following to your ~/.zshrc or ~/.bashrc:

export SPOTIFY_CLIENT_ID="your_client_id"
export SPOTIFY_CLIENT_SECRET="your_client_secret"

Alternatively, place a .env file with the same variables in the directory where you run the command.

Usage

spotify Summoning                        # search all categories
spotify --artist Summoning               # artists only
spotify --album "Minas Morgul"           # albums only
spotify --track "Long Lost to Where"     # tracks only

Filters

spotify --genre "black metal"            # search by genre
spotify --genre "black metal" --year 2024  # genre + year
spotify --album --label "Season of Mist"   # albums by label
spotify --new                            # albums from the last two weeks
spotify --new --hipster                  # recent low-popularity albums

Interactive navigation

After selecting a result, you enter an interactive browser:

  • Artists — view top tracks, browse discography, select an album to see its tracklist, select a track to see details and navigate to its artist or album.
  • Albums — header with tracklist, select a track or navigate to the artist.
  • Tracks — header with details, navigate to artist or album.

Press 0 to go back, Ctrl+C to quit.

Output modes

spotify --artist Summoning --json   # output as JSON
spotify --artist Summoning --full   # all sections at once, no interaction
spotify -v ...                      # enable debug logging

Terminal images

Album covers and artist images render inline on terminals that support the iTerm2 or Kitty image protocol (iTerm2, Kitty, WezTerm, Mintty).

Library

The core module has no terminal dependencies — use it in scripts, pipelines, or other tools. All data is returned as plain dicts with a _type discriminator key.

from pyspoti.core import SpotifyClient, ArtistAPI, AlbumAPI, TrackAPI, SearchAPI

with SpotifyClient(client_id, client_secret) as client:
    # search
    artists = ArtistAPI(client).search("Summoning")
    albums = AlbumAPI(client).search("Minas Morgul")
    tracks = TrackAPI(client).search("Long Lost to Where")

    # cross-type search
    results = SearchAPI(client).search("Summoning")
    # → {"artists": [...], "albums": [...], "tracks": [...]}

    # fetch full details
    artist = ArtistAPI(client).get(artists[0]["id"])
    top_tracks = ArtistAPI(client).get_top_tracks(artist["id"])
    discography = ArtistAPI(client).get_albums(artist["id"])

    album = AlbumAPI(client).get(discography[0]["id"])
    track = TrackAPI(client).get(top_tracks[0]["id"])

    # download images
    client.download_image(artist["image_url"], output_dir="./images/")

License

MIT

Metadata

Release files for pyspoti 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyspoti 0.3.1
File Size Uploaded Provenance
pyspoti-0.3.1.tar.gz 11.3 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pyspoti 0.3.1
File Interpreter ABI Platform
pyspoti-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 25.4 kB

Release files / pyspoti-0.3.1.tar.gz

Download URL pyspoti-0.3.1.tar.gz
Size 11.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b00d08d9aacf4681178ab2f0c9a34823fa81c496bca544238632d8662a0672e1
BLAKE2b-256 checksum
How to use checksums
d9a1ba73f6b881dd15006a2fe98fbfcad4f06afdc92c1bb84a08034b4907989f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 Jul 25, 2026.

Transparency log

Release files / pyspoti-0.3.1-py3-none-any.whl

Download URL pyspoti-0.3.1-py3-none-any.whl
Size 14.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6bc3497e772df8b2118d94d5f1823105c86336440c56a84febecea7fda9cba72
BLAKE2b-256 checksum
How to use checksums
f4e2f39903bd8316d1e4d3ecb9f8e1319c9deaa31acf00f554c8c4e8fb59195c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 Jul 25, 2026.

Transparency log

Security for pyspoti 0.3.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.

Select from 2 files

Attestation for pyspoti-0.3.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 Jul 25, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page