Skip to docs content

Run scripts and binaries

scpm follows npm and pnpm script conventions while adding an install-state check before script execution.

Scripts

scpmr build
scpm test
scpm start
scpm stop
scpm restart

scpmr is shorthand for scpm run. Before running a script, scpm checks node_modules/.scpm-state. If the manifest or lockfile changed, scpm installs first. Use --no-install when you want to skip that check.

scpm run --no-install build
scpm test --no-install

Use --if-present for optional scripts:

scpm run --if-present lint

When no package.json script matches, scpm run <name> falls back to a local binary with the same name in node_modules/.bin. Scripts still win over bins, so a project can override a tool command with its own script.

Local binaries

scpm exec vitest
scpm exec tsc -- --noEmit

exec runs a binary from the project context with node_modules/.bin on PATH.

One-off binaries

scpmx cowsay hi
scpmx -p create-vite create-vite my-app

scpmx is shorthand for scpm dlx. It first checks for a matching local binary in the current project. If none is installed, it installs into a throwaway project and runs the requested binary. Pass -p / --package when the package name differs from the binary name or when you want to force a throwaway install.

Shortcuts: scpmr and scpmx

scpmr and scpmx are multicall shims for scpm run and scpm dlx. They ship side by side with scpm in the release archives and dispatch purely on argv[0], so any flag that works on the full command works on the shim:

scpmr build            # scpm run build
scpmr -r test          # scpm -r run test
scpmx cowsay hi        # scpm dlx cowsay hi
scpmx -p create-vite create-vite my-app

The shims are identical scpm binaries with a different filename; there is nothing to configure. If you install scpm by hand — for example by copying the binary out of the tarball — bring scpmr and scpmx along so the shortcuts resolve on PATH.

Workspace runs

scpm -r run build
scpm -F '@scope/*' run test
scpm -F './packages/api' exec tsc -- --noEmit
scpm -F 'api...' run build

-r is sugar for --filter=*. Filters support exact names, globs, paths, dependency/dependent graph selectors, git-ref selectors, and exclusions.