Neofetch-style CLI for music written in Python
This project is originally created and maintained by ashish0kumar. Please visit the original repository to show your support.
- Beautiful terminal display with album cover art and artist photos
- Comprehensive metadata including tracks, albums, and artist information
- Interactive clickable links for Spotify URLs and cover art
- Responsive sizing via customizable image dimensions
- Cross-platform support, works in all modern terminals
- Image rendering with chafa support and fallback ANSI block art
Type | Metadata Displayed |
---|---|
Tracks | Name, Artist, Album, Duration, Track Number, Explicit, Release Date, Popularity, Genres |
Albums | Name, Artist, Type, Release Date, Track Count, Duration, Popularity, Genres, Label, Top Tracks |
Artists | Name, Followers, Popularity, Genres, Albums & Singles Count, Top Tracks |
# Clone the repository
git clone https://github.com/elxecutor/mufetch.git
cd mufetch
# Install dependencies
pip install -r requirements.txt
# Make executable (optional)
chmod +x mufetch.py
git clone https://github.com/elxecutor/mufetch.git
cd mufetch
pip install -e .
After development installation, you can use mufetch
command directly:
mufetch auth # Setup Spotify credentials
mufetch search "your song"
- Python 3.7 or higher
- pip package manager
# Ubuntu/Debian
sudo apt install chafa
# macOS
brew install chafa
# Arch Linux
sudo pacman -S chafa
First, set up your Spotify API credentials:
python mufetch.py auth
You'll need to:
- Go to https://developer.spotify.com/dashboard
- Create a new app
- Copy your Client ID and Client Secret
# Auto search (tries track, then album, then artist)
python mufetch.py search "Bohemian Rhapsody"
# Search for specific types
python mufetch.py search "Queen" --type artist
python mufetch.py search "A Night at the Opera" --type album
python mufetch.py search "We Will Rock You" --type track
# Customize image size (15-35)
python mufetch.py search "Pink Floyd" --size 25
python mufetch.py search --help
-t, --type
: Search type (auto, track, album, artist) - default: auto-s, --size
: Image size (15-35) - default: 20
Configuration is stored in ~/.config/mufetch/config.yaml
.
You can also set credentials via environment variables:
MUFETCH_SPOTIFY_CLIENT_ID
MUFETCH_SPOTIFY_CLIENT_SECRET
mufetch/
├── mufetch.py # Main entry point
├── requirements.txt # Python dependencies
├── setup.py # Installation script
├── demo.py # Feature demonstration script
├── README.md # Project documentation
├── LICENSE # MIT license
├── CODE_OF_CONDUCT.md # Code of conduct
├── CONTRIBUTING.md # Contribution guidelines
├── .github/ # GitHub workflows and templates
└── src/
├── __init__.py
├── config.py # Configuration management
├── spotify_client.py # Spotify API client
├── display.py # Terminal display and formatting
└── commands/
├── __init__.py
├── auth.py # Authentication command
└── search.py # Search command
- requests: HTTP client for Spotify API calls
- PyYAML: Configuration file parsing
- Pillow: Image processing for fallback rendering
The tool supports two image rendering methods:
- chafa (recommended): High-quality terminal graphics
- ANSI blocks: Fallback method using colored terminal blocks
Install chafa for the best visual experience.
# Search for a popular track
python mufetch.py search "Hotel California"
# Find artist information
python mufetch.py search "The Beatles" --type artist
# Look up an album with custom image size
python mufetch.py search "Dark Side of the Moon" --type album --size 30
A demonstration script is included to showcase the features:
python demo.py
This script will walk you through the authentication process and demonstrate various search capabilities.
- Works on Linux, macOS, and Windows
- Requires a terminal with true color support for best results
- Supports clickable links in compatible terminals
Contributions are welcome! Please read our Contributing Guidelines before submitting pull requests or issues.
MIT License - see LICENSE file for details.