Installation
Install snpm on macOS, Linux, or Windows
Install from npm (recommended)
npm install -g snpmThe npm package downloads a pre-built native binary for your platform and exposes:
snpm— the primary CLI.spx— a shorthand forsnpm dlx.
Supported platforms: macOS, Linux, and Windows on x64 and arm64. Node.js 18+ is required for the install script.
Install from a GitHub Release
Native binaries are published for each release at github.com/binbandit/snpm/releases. Download the archive for your platform and place the snpm (and optionally snpm-switch) binaries on your PATH.
Build from source
If you want to track main or contribute:
Prerequisites
- Rust toolchain — install from rustup.rs.
- Git.
git clone https://github.com/binbandit/snpm.git
cd snpm
cargo install --path snpm-cli --force
cargo install --path snpm-switch --force # optional: pinned packageManager supportThis installs snpm and (optionally) snpm-switch into your Cargo bin directory (usually ~/.cargo/bin).
Verify
snpm --version
snpm configsnpm config prints the resolved cache/data paths, registry, install settings, allow-scripts list, and logging configuration.
Pin snpm per project
snpm-switch honors the packageManager field in package.json and downloads the requested snpm build on demand:
{
"packageManager": "snpm@2026.5.16"
}Helpful commands:
snpm switch which # show the resolved snpm binary
snpm switch cache # inspect/clear the version cache
snpm switch list # list cached snpm versions
snpm --switch-version 2026.5.16 install # one-off override
snpm --switch-ignore-package-manager installWhen the npm shim is installed, it automatically prefers snpm-switch if it is available.
Update
# npm install
npm update -g snpm
# from source
cd snpm
git pull
cargo install --path snpm-cli --forceUninstall
# npm install
npm uninstall -g snpm
# cargo install
cargo uninstall snpm-cli
cargo uninstall snpm-switchTo also reclaim the on-disk store, run snpm clean --all.