Linux-first terminal Last.fm client (minimal output)
Project description
legato (Linux-only)
A minimal terminal client for Last.fm.
Install (recommended)
python3 -m pip install --user pipx
pipx ensurepath
pipx install legato
Setup
Legato uses the Last.fm desktop/web auth flow: it opens a browser to approve access, then polls for a session key. Session keys are long-lived unless the user revokes your app in Last.fm settings.
legato setup
Output style
No bordered tables. Plain text. Links are terminal hyperlinks (OSC 8) where supported.
YouTube
legato yt prints a YouTube search link for the current track and notes that a smarter matcher is coming soon.
App credentials (important)
Last.fm requires an API key + shared secret for your application (not the user). You must set these before release.
Edit:
src/legato/lastfm.py->APP_API_KEYandAPP_API_SECRET
Commands
legato current(now playing / last scrobble)legato fm(FMbot-style alias for current)legato disconnect(remove saved session + username from local config)legato recent [-n N] [--user USER]legato top artist|album|track [-p day|week|month|quarter|year|overall|alltime|all] [--year YYYY] [-n N]legato artist|album|track [--name ...] [--artist ...]legato artist "ARTIST"legato album "ARTIST | ALBUM"legato track "ARTIST | TRACK"legato album [--query "ARTIST | ALBUM"] [--user USER]legato plays [--target artist|album|track] [--query "..."] [--name ...] [--artist ...] [--user USER]legato np ARTIST TRACK [--album ...](update now playing)legato scrobble ARTIST TRACK [--album ...] [--ts now|UNIX]legato scrobble "ARTIST | TRACK[ | ALBUM]" [--album ...] [--ts now|UNIX]legato first [--query "ARTIST[ | TRACK]"] [--artist ...] [--track ...] [--user USER]legato taste OTHER_USER [--user USER] [-p period] [-n N]legato love [ARTIST] [TRACK](defaults to current)legato unlove [ARTIST] [TRACK]legato profile [--user USER]legato friends [--user USER] [-n N]legato pace [-i 5000] [-p month|week|year|day]legato yt [ARTIST] [TRACK] [--open]legato theme set <color>(accent color; default bright red)legato theme showlegato doctorlegato api METHOD [key=value ...](power-user escape hatch; read methods only unless --write)
Notes
Legato aims to cover the core Last.fm functionality exposed by the official API (recent, now playing, scrobble, top, info, love/unlove, profile, friends). Discord-server-only features are intentionally omitted.
Publish to PyPI (GitHub Actions)
This repo includes publish workflow that:
- builds package artifacts,
- runs
twine check, - publishes to PyPI when you push a tag like
v0.5.0.
One-time setup
- Create a PyPI API token (scope it to this project).
- In GitHub: Settings → Secrets and variables → Actions → New repository secret.
- Add secret name:
PYPI_API_TOKEN, value: your token.
Release flow
- Bump version in
pyproject.toml. - Commit and push.
- Create and push a tag:
git tag v0.5.0
git push origin v0.5.0
- Watch Actions run; after success users can install/update with:
pipx install legato
# or
pipx upgrade legato
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file legato_fm-1.0.1.tar.gz.
File metadata
- Download URL: legato_fm-1.0.1.tar.gz
- Upload date:
- Size: 16.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2173286e14972bd86809b5d31ab5ee35e695cd30294cb619541bee8398523899
|
|
| MD5 |
2aae139b244ea37889740dab0b756203
|
|
| BLAKE2b-256 |
77aad3302e53ffa66d351d5d227ffee7f2adfe8d56ad4a1334c2c403deb95b13
|
Provenance
The following attestation bundles were made for legato_fm-1.0.1.tar.gz:
Publisher:
publish-pypi.yml on vista747/legato
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
legato_fm-1.0.1.tar.gz -
Subject digest:
2173286e14972bd86809b5d31ab5ee35e695cd30294cb619541bee8398523899 - Sigstore transparency entry: 1008442346
- Sigstore integration time:
-
Permalink:
vista747/legato@415c57780580c0be2f93b3655f982d7d173be22a -
Branch / Tag:
refs/heads/main - Owner: https://github.com/vista747
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@415c57780580c0be2f93b3655f982d7d173be22a -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file legato_fm-1.0.1-py3-none-any.whl.
File metadata
- Download URL: legato_fm-1.0.1-py3-none-any.whl
- Upload date:
- Size: 16.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16f87c12b53d2f8edabecf17ae0a7117124fd0afa67288f9360f15bdd7ff6c39
|
|
| MD5 |
4a6a1741590a8fc0a797861e9b30cfca
|
|
| BLAKE2b-256 |
597feac1b816519f53d0ccf962df3e06772bbde20f08504305e89aebf392bda1
|
Provenance
The following attestation bundles were made for legato_fm-1.0.1-py3-none-any.whl:
Publisher:
publish-pypi.yml on vista747/legato
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
legato_fm-1.0.1-py3-none-any.whl -
Subject digest:
16f87c12b53d2f8edabecf17ae0a7117124fd0afa67288f9360f15bdd7ff6c39 - Sigstore transparency entry: 1008442349
- Sigstore integration time:
-
Permalink:
vista747/legato@415c57780580c0be2f93b3655f982d7d173be22a -
Branch / Tag:
refs/heads/main - Owner: https://github.com/vista747
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@415c57780580c0be2f93b3655f982d7d173be22a -
Trigger Event:
workflow_dispatch
-
Statement type: