The @mux/cli npm package is a thin Node.js shim. When a user runs npm install -g @mux/cli, npm installs the matching platform-specific binary package via optionalDependencies:
| Package | Platform |
|---|---|
@mux/cli-darwin-arm64 |
macOS Apple Silicon |
@mux/cli-darwin-x64 |
macOS Intel |
@mux/cli-linux-x64 |
Linux x64 |
@mux/cli-linux-arm64 |
Linux ARM64 |
The shim (bin/mux) detects the platform and spawns the correct binary.
Releases are published automatically via GitHub Actions using npm Trusted Publishing (OIDC, no tokens required).
git tag v1.0.0
git push origin v1.0.0For pre-release versions, the npm dist-tag is inferred from the version string:
git tag v1.0.0-beta.1 # publishes to "beta" tag
git tag v1.0.0-rc.1 # publishes to "rc" tag
git tag v1.0.0 # publishes to "latest" tagThe release.yml workflow:
- Build -- Compiles binaries on 4 platform-specific runners (macOS, Linux)
- Release -- Creates a GitHub Release with the binaries attached
- Publish -- Runs
scripts/publish.shwhich:- Sets the version across all 5
package.jsonfiles - Copies each binary into its platform package
- Publishes all 4 platform packages to npm
- Publishes the main
@mux/clipackage from a staging directory (stripped of dev dependencies)
- Sets the version across all 5
npm view @mux/cli versions --json
npx @mux/cli@latest --helpYou can publish from your local machine for testing. Only your current platform binary will be built (cross-compilation fails due to native dependencies).
./scripts/publish.sh 1.0.0-beta.1This will:
- Build binaries for all platforms it can (skips failures)
- Sync versions across all packages
- Publish platform packages that have binaries
- Publish the main
@mux/clipackage
You must be logged into npm with access to the @mux org.
Each of the 5 npm packages is configured with a Trusted Publisher on npmjs.com:
- Organization:
muxinc - Repository:
cli - Workflow:
release.yml
This allows the GitHub Actions workflow to publish without npm tokens. If a new platform package is added, configure the Trusted Publisher in its npmjs.com settings.