Skip to content

sbdh11/musicfetch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎵 musicfetch

Neofetch-style Spotify search CLI with clean text or rich grid output

musicfetch preview

npm license


Features

  • 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)

Installation

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.


Setup

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.


Usage

musicfetch --help
node ./bin/spotify.js --help

Commands

  • track <query>: search tracks
    • Options: --limit <n>, --artist <name>, --grid
  • album <query>: search albums
    • Options: --limit <n>, --grid

Examples

# 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

Troubleshooting

  • 401/400 from Spotify API: verify .env has correct SPOTIFY_CLIENT_ID and SPOTIFY_CLIENT_SECRET, and that your shell loads it from the current directory.
  • Sharp install issues: install platform build tools or run npm rebuild sharp.

Inspiration

ALso project is inspired by the presentation style of neofetch and by mufetch.


License

MIT

About

🎵 Neofetch-style Spotify search CLI with clean text or rich grid output

Resources

Stars

Watchers

Forks

Packages

No packages published