中文版本: README_CN.md
BM is a modern terminal music player written in Go, featuring a rich set of functions and a beautiful TUI interface. It supports FLAC, MP3, WAV, and OGG audio formats, providing album cover display, playlist management, fuzzy search, and more. This project exists purely because I love kew so much, but I'm not familiar with C, so I wrote this terminal music player in Go that better suits my aesthetic and habits.
- Multi-format support: FLAC, MP3, WAV, OGG
- Playback control: Play/Pause, Fast forward/Rewind (5-second intervals)
- Volume control: Logarithmic volume curve with fine adjustment
- Speed control: 0.1x to 4.0x playback speed control
- High-quality resampling: Support for multiple resampling quality options
- Responsive design: Adapts to terminal dimensions
- Album cover display: Supports Kitty, Sixel, iTerm2 image protocols
- Smart color scheme: Extracts colors from album covers for UI
- Multi-page system: Player, Playlist, and Library main pages
- Filesystem browsing: Complete directory navigation functionality
- Fuzzy search: Supports Chinese and English fuzzy matchinga
- Playlist: Dynamic playlist management
- Playback history: Records up to 100 playback history entries
- Corrupted file detection: Automatically marks unplayable files
- MPRIS2 support: Complete D-Bus MPRIS2 interface
- Desktop notifications: Sends notifications on song changes
- Global shortcuts: Supports system media keys
- Configuration persistence: Automatically saves settings and state
- Key mappings: Fully customizable all shortcuts
- Playback modes: Single loop, list loop, shuffle, memory mode
- Startup behavior: Configurable default page and auto-play
- Image protocol: Auto-detection or manual specification of terminal image protocol
# Using yay
yay -S bm-terminal-music-player
# Or using paru
paru -S bm-terminal-music-player-
Install Go
# Arch Linux sudo pacman -S go -
Clone repository and build
git clone https://github.com/zyoung11/BM.git cd BM go build -ldflags="-s -w" .'
-
Install to system path (optional)
sudo cp bm /usr/local/bin/
Download the binary for your platform from the Releases page, grant execute permissions, and you're ready to use it.
# Start player (specify music library directory)
bm /path/to/music/library
# Play single audio file
bm /path/to/song.flac
# Start player (interactive library selection)
bm
# Show help information
bm helpYou can use FNE another tool I made to decrypt encrypted music files from NetEase Cloud Music into the FLAC format that BM can use, but you will need a Windows computer and a NetEase Cloud Music membership.
| Key | Function |
|---|---|
ESC |
Exit program |
TAB |
Cycle through pages |
1 |
Switch to player page |
2 |
Switch to playlist page |
3 |
Switch to library page |
| Key | Function |
|---|---|
Space |
Play/Pause |
E / L |
Fast forward 5 seconds |
Q / H |
Rewind 5 seconds |
W / ↑ |
Increase volume |
S / ↓ |
Decrease volume |
X / K |
Increase playback speed |
Z / J |
Decrease playback speed |
D / → |
Next song |
A / ← |
Previous song |
R |
Toggle playback mode |
C |
Toggle text color (cover color/white) |
Backspace |
Reset volume and playback speed |
| Key | Function |
|---|---|
K / W / ↑ |
Navigate up |
J / S / ↓ |
Navigate down |
L / D / → |
Enter directory |
H / A / ← |
Exit directory |
Space |
Toggle selection of current item |
E |
Toggle selection of all items |
F |
Enter search mode |
| Key | Function |
|---|---|
K / W / ↑ |
Navigate up |
J / S / ↓ |
Navigate down |
Space |
Remove song from playlist |
Enter |
Play selected song |
F |
Enter search mode |
| Key | Function |
|---|---|
Enter |
Confirm search |
ESC |
Exit search |
Backspace |
Delete search character |
Configuration file is located at ~/.config/BM/config.toml and will be automatically created on first run.
The configuration file supports complete key mapping customization, supporting single keys or key lists. Refer to the generated default configuration file for detailed settings.
- Embedded cover in audio file
- Image files in the same directory (preferentially selects files containing keywords like cover, folder, album)
- Default cover image (
~/.config/BM/default.jpg)
- JPEG/JPG
- PNG
- Kitty: Modern terminals (Kitty, WezTerm, Ghostty and more)
- Sixel: Traditional terminal support
- iTerm2: macOS iTerm2 terminal
- Auto: Automatically detects best available protocol
BM implements a complete MPRIS2 (Media Player Remote Interfacing Specification) interface, supporting:
- System media key control (Play/Pause/Next/Previous)
- Playback status synchronization
- Metadata transmission
- Volume control
- Playback position synchronization
Thanks to the following open source projects:
- beep - Go audio playback library
- tag - Audio metadata reading
- dbus - D-Bus Go bindings
- go-term - Terminal control library
- go-sixel - DRCS/Sixel Encoder/Decoder

