A Rust TUI client for NetEase Cloud Music, with an embedded fullscreen playback page.
CNMPlayer, short for Customized Netease Music Player, is a terminal music client for NetEase Cloud Music. It supports QR code, email, and phone login, browses recommendations and search results, and streams music in the terminal with local caching.
When you switch into fullscreen playback, CNMPlayer uses the embedded TMPlayer playback page.
- QR code, email, and phone login
- Session cookie restore on startup
- Home recommendations, playlist pages, author pages, album pages, and search pages
- Search suffix filters:
@single,@album,@list,@author, and the@artistalias - Stream playback with a local audio cache
- Audio quality selection with VIP-aware clamping
- Page lyrics overlay on content pages
- Theme switching, language switching, transparency, hint toggles, and configurable keybinds
- Playback visualizer with bars or oscilloscope mode
- Embedded fullscreen playback page integrated from TMPlayer
- Cache cleanup controls for downloaded audio
- Rust 2024
- TUI: ratatui + crossterm
- Networking: tokio + reqwest + ncm-api-rs
- Playback: rodio + symphonia + cpal
- Metadata and artwork: lofty + image + qrcode
- Visualization: cava, with optional
bundle-cavaembedding - Fullscreen playback integration: TMPlayer
The UI uses icon glyphs in several places. A Nerd Font is strongly recommended; otherwise some icons may render as missing glyph boxes.
Install the build dependencies provided by your distribution. On Debian/Ubuntu, this is usually enough:
sudo apt update
sudo apt install -y pkg-config libasound2-dev libdbus-1-dev libchromaprint-devCNMPlayer uses cava for the live spectrum visualizer.
If cava is not available, the app still runs, but the spectrum bars stay empty.
The executable lookup order is:
TMPLAYER_CAVA./cava./third_party/cava/cavacavainPATH
If you want to bundle a cava binary into the build, enable:
cargo build --release --features bundle-cavaFor development:
cargo runcargo build --release
./target/release/cnmplayerOn first run, the app creates its configuration files under your OS config directory.
- Linux:
~/.config/cnmplayer
You can override the asset root with CNMPLAYER_ASSET_DIR. The app will still use config/, themes/, and auth/ under that root.
Audio cache files are stored under your OS cache directory unless you set cache.path in config/default.toml.
config/default.toml: application settings, playback settings, keybinds, and cache policythemes/*.toml: theme definitionsauth/session.toml: persisted login cookie- Cache root: OS cache directory by default, or
cache.pathif you set one
Important settings in config/default.toml:
- Interface:
theme,language,transparent_background,show_hints - Login banner:
default_opening_title - Playback layout:
visualize,page_lyrics,album_border,kitty_graphics,kitty_cover_scale_percent - Bars mode:
super_smooth_bar,bars_gap,bar_number,bar_channels,bar_channel_reverse - Audio quality:
audio_quality - Keybinds:
keybind_search_box,keybind_fullscreen,keybind_settings,keybind_sidebar,keybind_quit,keybind_prev,keybind_next,keybind_toggle_play_pause,keybind_toggle_mode - Cache policy:
cache.path,cache.clean_strategy,cache.max_size_mb,cache.max_age_days,cache.clean_on_startup
The available audio quality levels are:
standardhigherexhighlosslesshiresjyeffectskydolbyjymaster
If the current account does not have VIP access, CNMPlayer clamps the quality to the free range.
Global shortcuts:
Ctrl+S: open the search boxCtrl+F: open fullscreen playbackT: open settingsP: toggle the playback sidebarQ: quit the host appEsc: close overlays or go back from the current pageCtrl+K: open helpAlt+Space: toggle play/pauseAlt+Left: previous trackAlt+Right: next trackAlt+M: toggle repeat mode
Login page:
F1: QR loginF2: username loginF3: phone loginTab/Up/Down: switch focusEnter: confirm or submit
Search box:
Enter: run the searchEsc/Ctrl+S: close the search boxBackspace: delete text- Arrow keys: move the cursor
Search, playlist, and author pages:
Enter: open or play the focused itemEscorLeft: go backTab/Down: move to the next itemShift+Tab/Up: move to the previous item
Settings keybind page:
Enter: start rebinding the selected shortcutCtrl+Alt+R: reset keybinds to defaultsEsc: return
- TMPlayer: fullscreen playback UI used by CNMPlayer
- ncm-api-rs: NetEase Cloud Music API client used by CNMPlayer
CNMPlayer is licensed under AGPL-3.0-only.
See CITATION.cff for the standard citation metadata and upstream references.