Neofetch-style Spotify search CLI with clean text or rich grid output
- Beautiful terminal display with optional album art grid
- Track and album search with filters (artist, limit)
- Clean list or rich grid output modes
- Cross-platform Node.js CLI (Windows, macOS, Linux)
Available on npm: @sbdh11/musicfetch
# Local (recommended inside a project)
npm i @sbdh11/musicfetch
# Or global
npm i -g @sbdh11/musicfetch
- After a global install, run
musicfetch
directly. - If installed locally, use
npx musicfetch
or add an npm script.
Artwork rendering uses Sharp under the hood. Most platforms use prebuilt binaries; if a build is required, install platform build tools or try
npm rebuild sharp
.
Rename .env.example
to .env
in your working directory with your Spotify credentials:
SPOTIFY_CLIENT_ID=your_client_id
SPOTIFY_CLIENT_SECRET=your_client_secret
The CLI uses Spotify's Client Credentials flow and does not access private user data.
musicfetch --help
node ./bin/spotify.js --help
track <query>
: search tracks- Options:
--limit <n>
,--artist <name>
,--grid
- Options:
album <query>
: search albums- Options:
--limit <n>
,--grid
- Options:
# Find tracks named "yellow"
musicfetch track "yellow"
# Filter by artist and show more results
musicfetch track "yellow" --artist Coldplay --limit 10
# Grid output with artwork
musicfetch track "yellow" --grid
# Search albums
musicfetch album "random access memories"
# Albums as grid
musicfetch album "random access memories" --grid
- 401/400 from Spotify API: verify
.env
has correctSPOTIFY_CLIENT_ID
andSPOTIFY_CLIENT_SECRET
, and that your shell loads it from the current directory. - Sharp install issues: install platform build tools or run
npm rebuild sharp
.
ALso project is inspired by the presentation style of neofetch and by mufetch.
MIT