Yandex Music Control
Use the bundled helper script for deterministic operations instead of rewriting API snippets.
First use
- Read
references/token-and-control.md. - Check whether the token is already available via
YM_TOKENor the workspace config file. - If the token is missing, ask the user for a token or guide them to provide one; do not invent an extraction flow.
- Validate the token with:
scripts/ymctl.py auth-check
Runtime
Prefer the skill-local virtualenv interpreter when present:
./.venv/bin/python scripts/ymctl.py ...
If .venv is missing, create it and install the library:
python3 -m venv .venv
./.venv/bin/pip install yandex-music
Save token
./.venv/bin/python scripts/ymctl.py auth-set <TOKEN>
./.venv/bin/python scripts/ymctl.py auth-set <TOKEN> --device '<device-id>'
./.venv/bin/python scripts/ymctl.py auth-where
./.venv/bin/python scripts/ymctl.py auth-clear
Default config path:
/root/.openclaw/workspace/.openclaw/yandex-music-control/config.json
Common commands
Search tracks:
./.venv/bin/python scripts/ymctl.py search 'кино группа крови'
./.venv/bin/python scripts/ymctl.py search 'масло черного тмина' --type artist
Current track:
./.venv/bin/python scripts/ymctl.py now-playing
Likes and playlists:
./.venv/bin/python scripts/ymctl.py likes --limit 20
./.venv/bin/python scripts/ymctl.py playlists
./.venv/bin/python scripts/ymctl.py like 'shortparis страшно'
./.venv/bin/python scripts/ymctl.py unlike 'shortparis страшно'
Behavior rules
- This skill is read/search oriented: do not claim live transport control.
now-playinguses a local Ynison websocket probe for modern clients.- Do not echo secrets back into chat.
- Keep token handling local to env vars or the workspace config file.
Files
- Helper script:
scripts/ymctl.py - Control/token notes:
references/token-and-control.md