npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@leokok/poke-apple-music

v0.4.0

Published

Clone poke-music, install editable, run Apple Music MCP + Poke tunnel

Downloads

51

Readme

@leokok/poke-apple-music (npm)

Fast start

npx @leokok/poke-apple-music or npx poke-music runs a readiness check first (macOS, Homebrew as optional, Git, Node/npx, Python 3.10+, Poke login). Missing Homebrew does not block the run.
If something required is missing, it asks y/n and tries, in order:

  • Official Homebrew install script when brew is absent and you need Git/Node/Python
  • Batch brew install git, node, and/or [email protected] when Homebrew is already available
  • Git: xcode-select --install (Command Line Tools), then opening git-scm.com/mac
  • Node: fnm, nvm, or asdf if detected, then opening nodejs.org — the CLI also tries to refresh PATH in-process after brew/fnm/nvm
  • Python: pyenv if present, then python.org macOS
  • npx poke@latest login (you finish in the browser)

Only after everything passes does it clone or update poke-music under ~/.local/share/poke-apple-music/repo (each run fast-forwards with git pull, with a fallback for shallow clones), then pip install -e when HEAD changes, start the MCP server, and run poke tunnel.

If APPLE_MUSIC_MCP_PORT (default 8765) is busy, the CLI picks the next free port and passes it to Python and poke tunnel (opt out with APPLE_MUSIC_STRICT_PORTS=1).

While the bridge runs, Python stderr shows short, useful lines (e.g. what tool ran: search, play, pause) instead of raw MCP noise. For full SDK logs, set POKE_APPLE_MUSIC_RAW_SDK_LOG=1.

Updating: New CLI behavior comes from the npm package version — use npx @leokok/poke-apple-music@latest or npx poke-music@latest (same CLI). New Python/repo changes on GitHub are picked up on the next run via git in that cache (no need to bump npm for repo-only fixes, unless you change the CLI).

Non-interactive / CI: npx @leokok/poke-apple-music --yes or POKE_APPLE_MUSIC_YES=1 (auto-attempts the same fixes without prompts; still needs a TTY for poke login unless already logged in).

Set a custom tunnel label with -n/--name:

npx @leokok/poke-apple-music@latest --name "Work Mac"
# or
npx poke-music@latest -n "Work Mac"

There is no PyPI mcp-applemusic dependency — only this repo + mcp.

Requirements

  • git on your PATH
  • macOS, Python 3.10+, Node 18+
  • npx poke@latest login completed once

Usage

npx @leokok/poke-apple-music
# or (same tool):
npx poke-music

The scoped package installs binaries poke-apple-music and poke-music. The unscoped poke-music package installs poke-music only.

Fork / mirror:

export POKE_APPLE_MUSIC_REPO="https://github.com/you/poke-music.git"
npx @leokok/poke-apple-music

Local development

Use the repository root for development, not the npm package folder:

cd poke-music
npm install
node npm/poke-apple-music/cli.mjs --help
node npm/poke-apple-music/cli.mjs

Cache layout

| Path | Contents | |------|----------| | ~/.local/share/poke-apple-music/repo | Git clone of the repo | | ~/.local/share/poke-apple-music/venv | Python venv | | ~/.local/share/poke-apple-music/installed-git-head | Last pip install -e revision |

After a git pull changes HEAD, the next run reinstalls editable.

CLI options

poke-apple-music --help
  • -h, --help show usage
  • -v, --version print launcher version
  • -y, --yes run non-interactively
  • -n, --name <label> set the poke tunnel -n display label

Publish

From poke-music/npm/poke-apple-music:

npm publish --access public

The short name poke-music is a separate package — bump both package.json versions together, then cd ../poke-music && npm publish --access public (or rely on CI).

NO_COLOR

Set NO_COLOR=1 for plain output.

Troubleshooting (what the CLI tries to tell you)

| Situation | What to do | |-----------|------------| | Not macOS | Run on a Mac with the Music app. | | No git | xcode-select --install or brew install git. | | No python3 | Install from python.org or brew install python. Optional: POKE_APPLE_MUSIC_PYTHON. | | Not logged into Poke | npx poke@latest login. | | git pull / update failed | See message; often offline, divergent local edits in the cache, or permission. Wipe cache: rm -rf ~/.local/share/poke-apple-music. | | Clone / pip errors | Check internet; confirm POKE_APPLE_MUSIC_REPO; reset cache with rm -rf ~/.local/share/poke-apple-music. | | Port already in use | The CLI tries the next free port after APPLE_MUSIC_MCP_PORT (default 8765). Use APPLE_MUSIC_STRICT_PORTS=1 to fail instead of auto-bumping. | | MCP crashes on start | Open an issue on GitHub with the Python traceback (run pip install -e from a clone to debug). | | Don’t want prompts | npx @leokok/poke-apple-music --yes or POKE_APPLE_MUSIC_YES=1 (still need Poke login unless already done). | | poke login in a script | Log in once in a normal terminal; --yes won’t complete OAuth for you. |