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

musher-cli

v0.3.0

Published

Command-line client for the Cloud Musher board API — drive tickets, decisions, docs and workspaces from the terminal with a personal access token.

Readme

musher-cli

A small command-line client for the Cloud Musher board API. It lets a person — or an AI agent running headless — drive the board (tickets, docs & decisions, workspaces) from the terminal by talking to the REST API with a personal access token (PAT). The CLI acts as that user and inherits their role (viewer / editor / admin), so RBAC is enforced server-side.

This is a local operator tool. It is never deployed to a server.

Requirements

  • Node.js ≥ 20 (uses the global fetch)

Install / build

npm install
npm run build      # tsc → dist/
node dist/index.js --help

Optionally link it so musher is on your PATH:

npm link           # then: musher --help

Authentication — folder-local .env

The CLI's identity and workspace come from the folder you stand in. Each workspace folder carries its own ./.env; one shared musher binary aliases to whichever folder you run it from. There is no ambient global identity.

Tokens are created in the web Settings panel (not the CLI). Once you have a msh_… PAT, scaffold the folder:

musher init                        # prompts for API URL, token, workspace → writes ./.env (0600)
musher init --url http://localhost:3001 --token msh_xxx --workspace musher
musher init --force                # overwrite an existing ./.env

init validates the token against /api/auth/me before writing, refuses to clobber an existing ./.env without --force, and writes mode 0600. Copy .env.example by hand if you prefer.

./.env holds three keys:

MUSHER_API_URL=http://localhost:3001
MUSHER_TOKEN=msh_…
MUSHER_WORKSPACE=musher            # workspace slug (recommended) or id

musher login also writes ./.env (URL + token, preserving any workspace); musher logout clears the token from ./.env. Neither writes ~/.musher/config.json anymore.

The nearest .env is auto-loaded at startup — the CLI searches the current directory then walks up to the first .env it finds, so subfolders inherit their parent workspace folder's context. Real environment variables always win over .env file values.

Run a command from a folder with no .env and no token and you get:

No .env or MUSHER_TOKEN in this folder — run 'musher init' here.

Precedence

| What | Order (first wins) | | --- | --- | | workspace | --workspace flag → real MUSHER_WORKSPACE env → .env file → (error) | | token | real MUSHER_TOKEN env → .env file → deprecated ~/.musher/config.json (warns) | | apiUrl | real MUSHER_API_URL env → .env file → deprecated global config (warns) → http://localhost:3001 |

Every workspace-scoped command (tickets ls/new, docs ls/new/get/edit/accept/reject/supersede) defaults its workspace from this chain, so no --workspace flag is needed inside a configured folder:

cd my-workspace && musher tickets ls          # scoped to MUSHER_WORKSPACE from ./.env
MUSHER_TOKEN=msh_xxx MUSHER_WORKSPACE=musher musher tickets ls --json   # env-only, for CI

Workspace id vs slug: the CLI forwards whatever you set (id or slug). The API resolves slugs everywhere; a workspace id (UUID) currently works only on some read paths (RBAC + a few ?workspace= filters) — the ticket list filter and the create handlers are slug-only. Use the slug (e.g. musher) for reliable end-to-end behavior today.

Deprecated: ~/.musher/config.json is now a read-only fallback and emits a one-line deprecation warning when used. It is scheduled for removal next release — migrate to ./.env via musher init.

Commands

Every read command accepts --json for raw, agent-friendly output.

| Command | Description | | --- | --- | | musher init [--url] [--token] [--workspace] [--force] | Scaffold ./.env for this folder | | musher login [--url] [--token] | Authenticate → writes ./.env | | musher logout | Clear the token from ./.env | | musher whoami [--json] | Show the authenticated user | | musher tickets ls [--workspace <slug>] [--lane <lane>] [--json] | List tickets | | musher tickets get <id> [--json] | Show a ticket incl. body | | musher tickets new --title <t> [--workspace <slug>] [--type] [--prio] [--epic] [--agents a,b] [--body <md>] [--json] | Create a ticket | | musher tickets edit <id> [--title] [--prio] [--type] [--epic] [--agents] [--body] | Edit provided fields | | musher tickets move <id> <lane> [--evidence <text>] | Transition a ticket | | musher tickets rm <id> [--yes] | Delete a ticket (admin) | | musher tickets comment <id> <body…> | Add a comment | | musher tickets comments <id> [--json] | List comments | | musher docs ls [--workspace <slug>] [--kind <kind>] [--json] | List documents (filter by --kind decision) | | musher docs get <ref> [--workspace <slug>] [--json] | Show a document/decision (by ref, id, or path) | | musher docs new --title <t> [--group <g>] [--kind <kind>] [--workspace <slug>] [--body <md>] | Create a document (or a decision with --kind decision) | | musher docs edit <id> [--title] [--group] [--workspace] [--body] | Edit provided fields | | musher docs accept <ref> [--workspace <slug>] | Accept a decision → active (admin) | | musher docs reject <ref> [--workspace <slug>] | Reject a decision → deprecated (admin) | | musher docs supersede <ref> --by <ref2> [--workspace <slug>] | Supersede a decision (admin) | | musher workspaces ls [--json] | List workspaces | | musher users ls [--json] | List users |

Global: musher --version, musher --help, musher <group> --help.

Errors

Failures print a friendly message and exit non-zero:

  • no token in folderNo .env or MUSHER_TOKEN in this folder — run 'musher init' here.
  • 401Not authenticated. Run \musher init` here (or set MUSHER_TOKEN).`
  • 403Permission denied — your role (<role>) can't do that.
  • network error → Can't reach the Musher API at <url>. Is it running?

.env holds a real PAT — it is gitignored (only .env.example is committed) and written mode 0600. Never commit or print it.