██╗ ██╗ ██╗██████╗ ████████╗██╗ ██╗██████╗ ███████╗
██║ ╚██╗ ██╔╝██╔══██╗╚══██╔══╝██║ ██║██╔══██╗██╔════╝
██║ ╚████╔╝ ██████╔╝ ██║ ██║ ██║██████╔╝█████╗
██║ ╚██╔╝ ██╔══██╗ ██║ ██║ ██║██╔══██╗██╔══╝
███████╗██║ ██║ ██║ ██║ ╚██████╔╝██████╔╝███████╗
╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝
🎵 A powerful song downloader built in Go 🎵
lyrtube-cli is a powerful command-line audio downloader built in Go, powered by yt-dlp and lrclib.net. It allows you to download high-quality audio from YouTube and other supported platforms with automatic lyrics embedding.
Before using lyrtube-cli, make sure you have the following installed on your system:
- Python 3 - Required by yt-dlp
- FFmpeg - Required for audio processing and lyrics embedding
macOS (using Homebrew):
brew install python3 ffmpegUbuntu/Debian:
sudo apt update
sudo apt install python3 ffmpegWindows:
- Download Python 3 from python.org
- Download FFmpeg from ffmpeg.org
- 🎵 High-quality audio downloads from YouTube and other platforms
- 📝 Automatic lyrics fetching from lrclib.net
- 🎯 Multiple lyrics modes: embed into audio files or save as .lrc files
- 📁 Playlist support with individual track processing
- ⚙️ Configurable settings for output directory, audio format, and quality
- 🎨 Beautiful terminal UI with progress indicators
- 🖼️ Thumbnail embedding into audio files
- 📊 Metadata extraction and embedding
- Go to the Releases page
- Download the appropriate binary for your operating system
- Make it executable (Linux/macOS):
chmod +x lyrtube-cli - Move to your PATH or run directly
Prerequisites:
- Go 1.24.5 or later
Steps:
# Clone the repository
git clone https://github.com/cesp99/lyrtube-cli.git
cd lyrtube-cli
# Build the application
go build -o lyrtube-cli
# (Optional) Install globally
sudo mv lyrtube-cli /usr/local/bin/On your first run, lyrtube-cli will guide you through an interactive setup wizard:
./lyrtube-cli download "https://www.youtube.com/watch?v=example"The wizard will ask you to configure:
- Output directory - Where to save downloaded files
- Audio format - mp3, m4a, flac, etc.
- Audio quality - 128k, 192k, 320k, best
- Lyrics mode - none, lrc (separate file), embedded (into audio)
./lyrtube-cli download "https://www.youtube.com/watch?v=dQw4w9WgXcQ"./lyrtube-cli download "https://www.youtube.com/playlist?list=example"./lyrtube-cli download "https://www.youtube.com/watch?v=example" \
--out "/path/to/output" \
--format "mp3" \
--quality "320k"./lyrtube-cli config show./lyrtube-cli config edit| Flag | Short | Description | Example |
|---|---|---|---|
--out |
-o |
Output directory | -o /path/to/music |
--format |
-f |
Audio format | -f mp3 |
--quality |
-q |
Audio quality | -q 320k |
The configuration file is stored at:
- Linux/macOS:
~/.lyrtube-cli/config.yaml - Windows:
%USERPROFILE%\.lyrtube-cli\config.yaml
output_dir: "~/Music/lyrtube-cli"
audio_format: "mp3"
audio_quality: "192k"
lyrics_mode: "embedded" # none, lrc, embeddednone- Don't download lyricslrc- Save lyrics as separate .lrc filesembedded- Embed lyrics directly into audio files (recommended)
lyrtube-cli/
├── cmd/ # CLI commands
│ ├── download.go # Download command
│ ├── config.go # Configuration commands
│ └── root.go # Root command
├── internal/
│ ├── config/ # Configuration management
│ ├── downloader/ # Audio downloading logic
│ ├── embedded/ # Embedded yt-dlp binary
│ ├── lyrics/ # Lyrics fetching and processing
│ ├── processor/ # Lyrics processing workflow
│ └── ui/ # Terminal UI components
└── main.go # Application entry point
# Build for current platform
go build -o lyrtube-cli
# Build for multiple platforms
GOOS=linux GOARCH=amd64 go build -o lyrtube-cli-linux-amd64
GOOS=windows GOARCH=amd64 go build -o lyrtube-cli-windows-amd64.exe
GOOS=darwin GOARCH=amd64 go build -o lyrtube-cli-darwin-amd64We welcome contributions! Here's how you can help:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes and add tests if applicable
- Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
- Follow Go best practices and conventions
- Add tests for new functionality
- Update documentation as needed
This project is licensed under the GPL-3.0 License - see the LICENSE file for details.
Everyone is free to contribute, modify, and distribute this software under the terms of the GPL-3.0 license.
- yt-dlp - The powerful media downloader that powers this tool
- lrclib.net - Free lyrics database API
- Cobra - CLI framework for Go
- FFmpeg - Media processing toolkit
If you encounter any issues or have questions:
- Check the Issues page
- Create a new issue if your problem isn't already reported
- Provide detailed information about your system and the error
Made with ❤️ and Go