/wbPublish — Command Hub
/wbPublish is the WB-Labs npm publication pipeline. It handles the full publish workflow — version bump validation, pre-publish checks, registry configuration, and topological publish ordering — turning a tested and audited codebase into a publicly installable npm module. It runs only after /wbRelease and refuses otherwise.

The publish path, end to end. /wbPublish executes what /wbRelease planned — it is deliberately not the command that decides a version.
🎯 Strategic Position
/wbPublish is the final gate in the package distribution pipeline. Every other command ensures the package is correct; /wbPublish ensures it's deliverable. It runs a five-point pre-check automatically (recent release report exists, version matches, workspace:* unpicked, dist/ aligned, version not already on npm) and refuses with specific fixes if any fail. After publish, it demands a /wbRelease --restore — skipping this leaves your dev tree with pinned versions instead of workspace:*, breaking local package linking.
- After
/wbReleasehas run — in the same cycle, not days later. - Not before — the command refuses without a recent release report.
- Never for quick tests — use
pnpm linkor local tarball install instead.
🛠️ Operating Modes
| Mode | Trigger | Output |
|---|---|---|
| Publish | /wbPublish <pkg> | Build, verify, and publish to npm registry |
| Dry run | /wbPublish <pkg> --dry-run | Shows what would publish without pushing |
| Prerelease | /wbPublish <pkg> --prerelease=<tag> | Publish under a tag like @beta or @canary |
✅ What a useful publish report contains
- The release plan it read — topological publish order.
- Build verification —
build-info.jsoninspected, version and tier metadata confirmed. - Per-package publish status — success, failure, or skipped with reason.
- The restore reminder —
--restoremust be run after publish. - The next command — typically
/wbDeploy <consumer-app>.
🚫 What it cannot do
| Not this | Use instead |
|---|---|
| Run tests before publish | /wbTest — run before /wbRelease |
| Create changelogs or bump versions | /wbRelease |
| Deploy an application | /wbDeploy |
| Announce the release | /wbBroadcast |
| Re-publish the same version | npm publish directly (check registry first) |
📚 Reading Order
- ELI5 — the one-paragraph mental model.
- Practical — step-by-step on a real project.
- Expert — architecture, edge cases, and when NOT to use.
- Examples — annotated transcripts from actual sessions.
- Exhaustive simulation · Live demo.
🔗 Related
wbPublish.md— the command reference this hub orients you around./wbRelease— must run first; required gate for/wbPublish./wbDeploy— deploy an application (not an npm package)./wbTest— run tests before the release cycle begins./wbNext— ranked next action after publish.
Quick Reference
/wbPublish <pkg> # build + publish to npm
/wbPublish <pkg> --dry-run # show what would publish, don't push
/wbPublish <pkg> --prerelease=beta # publish under a prerelease tag← Home · Commands · Install | wb-flow on npm · flow.wbc-ui.com · wi-bg.com
