Environment
- OS: Windows 11 (26200.8037)
- ncm-cli: installed via
npm install -g @music163/ncm-cli
- mpv: v0.41.0 (installed via
winget install shinchiro.mpv, located at C:\Program Files\MPV Player\mpv.exe)
- Node.js: >= 18
- Player config:
ncm-cli config set player mpv ✓
Problem
ncm-cli play --song does not work on Windows without TUI running. The command returns {"success": true, "message": "歌曲已发送到播放服务"} but no mpv process is spawned and playback state remains stopped.
With TUI running (user manually runs ncm-cli tui in a separate terminal): playback works perfectly. ncm-cli next, ncm-cli state, ncm-cli queue add all function correctly.
Without TUI running: the play command silently fails. mpv is never started.
This makes it impossible to use ncm-cli for programmatic playback (e.g., via Claude Code or other AI agents) without requiring the user to manually keep a TUI window open.
Steps to Reproduce
ncm-cli config set player mpv → ✓
ncm-cli login --check → ✓ logged in
- Close any TUI windows
ncm-cli play --song --encrypted-id <id> --original-id <id>
- Response:
{"success": true, "message": "歌曲已发送到播放服务"}
ncm-cli state → {"status": "stopped"}
tasklist | grep mpv → no mpv process
Expected Behavior
ncm-cli play should be able to start mpv and play audio independently, without requiring TUI to be running. A headless/daemon playback mode would be ideal for AI agent integration scenarios.
Additional Context
- The
orpheus player option only supports macOS, leaving mpv as the only option on Windows
- mpv is correctly installed and works when launched manually:
"C:\Program Files\MPV Player\mpv.exe" --version → OK
- The likely cause: mpv is not in the default system PATH (installed to
C:\Program Files\MPV Player\), and ncm-cli may not be resolving the mpv binary path correctly outside of TUI context
- Even after adding mpv to PATH (
ncm-cli config set player mpv succeeds), the standalone play command still does not spawn mpv
Suggestion
- Support a headless daemon mode (e.g.,
ncm-cli daemon start) that manages mpv without TUI
- Or allow
play to directly spawn mpv when no daemon/TUI is running
- On Windows, consider checking common installation paths for mpv (e.g.,
C:\Program Files\MPV Player\)
Environment
npm install -g @music163/ncm-cliwinget install shinchiro.mpv, located atC:\Program Files\MPV Player\mpv.exe)ncm-cli config set player mpv✓Problem
ncm-cli play --songdoes not work on Windows without TUI running. The command returns{"success": true, "message": "歌曲已发送到播放服务"}but no mpv process is spawned and playback state remainsstopped.With TUI running (user manually runs
ncm-cli tuiin a separate terminal): playback works perfectly.ncm-cli next,ncm-cli state,ncm-cli queue addall function correctly.Without TUI running: the
playcommand silently fails. mpv is never started.This makes it impossible to use ncm-cli for programmatic playback (e.g., via Claude Code or other AI agents) without requiring the user to manually keep a TUI window open.
Steps to Reproduce
ncm-cli config set player mpv→ ✓ncm-cli login --check→ ✓ logged inncm-cli play --song --encrypted-id <id> --original-id <id>{"success": true, "message": "歌曲已发送到播放服务"}ncm-cli state→{"status": "stopped"}tasklist | grep mpv→ no mpv processExpected Behavior
ncm-cli playshould be able to start mpv and play audio independently, without requiring TUI to be running. A headless/daemon playback mode would be ideal for AI agent integration scenarios.Additional Context
orpheusplayer option only supports macOS, leaving mpv as the only option on Windows"C:\Program Files\MPV Player\mpv.exe" --version→ OKC:\Program Files\MPV Player\), and ncm-cli may not be resolving the mpv binary path correctly outside of TUI contextncm-cli config set player mpvsucceeds), the standaloneplaycommand still does not spawn mpvSuggestion
ncm-cli daemon start) that manages mpv without TUIplayto directly spawn mpv when no daemon/TUI is runningC:\Program Files\MPV Player\)