Guides
Recipes for the workflows teams repeat every week.
Use these guides when you already understand the basics and need a concrete workflow for releases, previews, customer installs, CI, or policy debugging.
Release
Publish a production release
- 1
Build the package
buildcd packages/payments npm ci npm run build npm test - 2
Run a dry publish
dry runpackagepass publish . --tag next --dry-run - 3
Publish and promote
publishpackagepass publish . --tag latest packagepass dist-tag list @acme/payments - 4
Audit the release
auditpackagepass audit events \ --package @acme/payments \ --type package.published \ --limit 20
Previews
Ship a pull-request package
publish preview
packagepass preview publish ./packages/auth \
--channel pr-482
npm install @acme/auth@preview-pr-482When to use previews
Publish previews for customer SDK review apps, integration tests, generated-code diffs, or any workflow where consumers need a package before it becomes a stable release.
Customers
Give one customer access to one package
- 1
Create or identify the subject
subject# In the CLI, subjects can be referenced directly. # In the SDK/API, you can create customer records first. customer:globex - 2
Grant only install access
grantpackagepass grant add @acme/payments \ --subject customer:globex \ --action install - 3
Mint a short-lived install token
tokenpackagepass token create install \ --package @acme/payments \ --subject customer:globex \ --ttl 30d - 4
Generate package manager config
npmexport PACKAGEPASS_TOKEN=<install-token> packagepass setup @acme --manager npm --write npm install @acme/payments
Configure npm, pnpm, Yarn, and Bun
.npmrc
@acme:registry=https://registry.preview.packagepass.dev/npm/
//registry.preview.packagepass.dev/npm/:_authToken=${PACKAGEPASS_TOKEN}bunfig.toml
[install.scopes]
"@acme" = { url = "https://registry.preview.packagepass.dev/npm/", token = "$PACKAGEPASS_TOKEN" }Do not commit tokens
Commit the registry mapping if your repo needs it, but keep
PACKAGEPASS_TOKEN in the environment or secret manager.CI
Exchange a CI identity token
github actions
packagepass ci exchange \
--provider github \
--id-token "$ACTIONS_ID_TOKEN_REQUEST_TOKEN" \
--package @acme/paymentsUse case
CI exchange lets your pipeline authenticate as a workflow identity instead of storing a long-lived publishing token.
Troubleshooting
Debug an install failure
- 1
Check local configuration
doctorpackagepass doctor @acme/payments PACKAGEPASS_TOKEN=<install-token> \ packagepass doctor @acme/payments - 2
Verify the subject has install access
policypackagepass policy explain @acme/payments \ --subject customer:globex \ --action install - 3
Inspect audit events
auditpackagepass audit events \ --package @acme/payments \ --type policy.denied \ --limit 50 - 4
Regenerate install config
setuppackagepass setup @acme --manager npm --write