ncm-cli-setup
Original:🇨🇳 Chinese
Translated
1 scripts
Install and configure ncm-cli (NetEase Cloud Music CLI tool). Use this skill when users need to install ncm-cli, configure API Key, install mpv player, or troubleshoot installation issues.
6installs
Sourcenetease/skills
Added on
NPX Install
npx skill4agent add netease/skills ncm-cli-setupTags
Translated version includes tags in frontmatterSKILL.md Content (Chinese)
View Translation Comparison →ncm-cli Installation and Configuration
ncm-cli is a CLI tool for NetEase Cloud Music (supports music search, playback control, playlist management, and TUI player).
Installation Process
Step 1: Install ncm-cli and mpv
1.1 Install ncm-cli
bash
npm install -g @music163/ncm-cliVerify installation:
bash
ncm-cli --version1.2 Install mpv
Playback functionality requires the mpv player. First check if it is already installed:
bash
mpv --versionmacOS / Windows: If not installed, run the installation script directly:
bash
python3 scripts/install_mpv.pyLinux: Ask the user if playback functionality is needed:
- If it's a desktop environment and local playback is required → run
python3 scripts/install_mpv.py - If it's a server environment and playback is not needed → skip, commands like search/playlist can still be used normally
The installation script will automatically identify the package manager:
- macOS: Homebrew () or MacPorts
brew install mpv - Linux: apt / dnf / pacman / zypper
- Windows: winget / Chocolatey / Scoop
Step 2: Configure API Key
Using ncm-cli requires setting the API Key first:
bash
ncm-cli config set appId <your AppId>
ncm-cli config set privateKey <your PrivateKey>If you don't have an API Key yet, please go to NetEase Cloud Music Open Platform to apply for an API Key (appId and privateKey).
Step 3: Configure Default Player
Ask the user to select the default player:
- mpv (built-in player): Lightweight, cross-platform, requires completing mpv installation in Step 1 first
- orpheus (Cloud Music App): Calls the local NetEase Cloud Music client for playback, only supports macOS
Execute according to the user's selection:
bash
ncm-cli config set player mpv # Select built-in player
ncm-cli config set player orpheus # Select Cloud Music AppStep 4: Login
Login is required, please use:
bash
ncm-cli login --backgroundCommon Issues
| Issue | Solution |
|---|---|
| Check if the npm global bin directory is in PATH: |
| Re-run |
| Login timeout | Re-run |
Basic Information
- Requires Node.js >= 18