Publish npm packages
Publish @shellui/sdk, @shellui/core, and @shellui/cli with one script. The npm dist-tag comes from the root package.json version:
- Version contains
alpha(for example0.2.0-alpha.0) → tagalpha - Version contains
beta(for example0.2.0-beta.1) → tagbeta - Otherwise → tag
latest
Put alpha or beta in the version string for pre-releases so latest is not overwritten.
Steps
npm login- Set the version in the root
package.json - Sync packages:
pnpm run version:sync - Build:
pnpm run build - From the repo root:
pnpm run publish
That runs scripts/publish-with-tag.js in order SDK → Core → CLI. You do not pass the tag by hand.
Before publishing, the script runs pnpm run changelog:check. It stops the release unless:
- The root version is
x.y.z,x.y.z-alpha.N, orx.y.z-beta.N CHANGELOG.mdhas no active## [Unreleased]section- Every release heading reads
## [<version>] - YYYY-MM-DD, and the topmost one matches the root version (for example## [0.6.0] - 2026-10-07)
Run pnpm run changelog:check on its own to validate the changelog before you start.
For a later bump: change the root version, pnpm run version:sync, pnpm run publish. Stable releases omit alpha / beta.
If the release changes agent-relevant APIs or config, update the matching skill in shellui/skills, bump metadata.version and that skill's CHANGELOG.md, and keep the skill lean - see ADR 0001.
Test the CLI locally
pnpm run build
cd packages/cli
pnpm link --global
In another project:
pnpm link --global @shellui/cli
shellui --version
Failures
- "Package already exists": bump the version and
pnpm run version:syncbefore publishing again - "Access denied":
npm loginand publish rights on@shellui - Wrong tag: check that the root version contains
alphaorbetafor pre-releases - "CHANGELOG.md is not ready": rename the top release heading to the root version with today's date, and move any
## [Unreleased]notes into it - "Missing files": check the
filesfield in each packagepackage.json