βββ βββ ββββββββββ ββββββββββββ ββββββββββ ββββββββ
βββ ββββ ββββββββββββββββββββββββ βββββββββββββββββββ
βββ βββββββ ββββββββ βββ βββ βββββββββββββββββ
βββ βββββ ββββββββ βββ βββ βββββββββββββββββ
βββββββββββ βββ βββ βββ βββββββββββββββββββββββββ
βββββββββββ βββ βββ βββ βββββββ βββββββ ββββββββ
π΅ 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