Skip to main content
Publish packages and modules to the npm registry. Each target is packed with bun pm pack (so workspace dependencies resolve to real version ranges), extracted into dist/publish, and published with npm publish. Versions already present on the registry are skipped, so the command is safe to re-run. Publishing requires npm credentials saved with npm:credentials:create.
Packing runs through bun, and publishing shells out to the npm binary, so both must be on your PATH. npm ships with Node.js — on Debian and Ubuntu, sudo apt install nodejs npm. Verify with npm --version.

Usage

Examples

Publish every package and module in the workspace:
Publish specific packages (comma-separated):
Publish specific modules:
Publish as a restricted (private) package:

Options

With neither --packages nor --modules, every directory under packages/ and modules/ is treated as a target. A target whose package.json version already exists on the registry is reported as ignored rather than re-published. At the end the command prints a summary of how many targets were published versus ignored.