Getting started
Publish a private package, grant access, and install it from PackagePass.
This guide uses the CLI because it gives the quickest path from a local package to an npm-compatible private install. The same workflow is available through the TypeScript SDK and REST API.
Before you start
Dashboard access
Sign in to PackagePass and select the organization that owns the package scope.
A scoped package
PackagePass accepts scoped package names such as
@acme/payments.A package manager
Install configuration can be generated for npm, pnpm, Yarn, and Bun.
Base URLs
Control API
https://api.preview.packagepass.dev/v1 handles packages, grants, tokens, policy, and audit events.Registry
https://registry.preview.packagepass.dev/npm/ is the npm-compatible registry URL used by package managers.Quickstart
Run the first publish flow
- 1
Install the CLI
installnpm install -g @packagepass/cli packagepass --help - 2
Authenticate the CLI
interactive loginpackagepass login packagepass login \ --tenant acme \ --api-url https://api.preview.packagepass.dev/v1 \ --registry-url https://registry.preview.packagepass.dev/npm/ packagepass whoami - 3
Create package metadata
packagepackagepass package create @acme/payments \ --description "Customer payments SDK" packagepass package get @acme/payments - 4
Publish a release
publishcd packages/payments npm run build packagepass publish . --tag latest packagepass version list @acme/payments packagepass dist-tag list @acme/payments - 5
Grant install access
grantpackagepass grant add @acme/payments \ --subject customer:globex \ --action install packagepass policy explain @acme/payments \ --subject customer:globex \ --action install - 6
Create an install token
tokenpackagepass token create install \ --package @acme/payments \ --subject customer:globex \ --ttl 30d - 7
Configure the package manager
setupexport PACKAGEPASS_TOKEN=<install-token> packagepass setup @acme --manager npm --write npm install @acme/payments - 8
Check the environment
doctorpackagepass doctor @acme/payments
Generate install config
Use the preview below to switch package managers. The CLI writes this content with packagepass setup @scope --manager <manager> --write.
.npmrc
@acme:registry=https://registry.preview.packagepass.dev/npm/
//registry.preview.packagepass.dev/npm/:_authToken=${PACKAGEPASS_TOKEN}
npm install @acme/paymentsAutomation login
Use an API key for noninteractive environments such as CI jobs, scripts, and headless release workers.
api-key login
packagepass login \
--api-key $PACKAGEPASS_API_KEY \
--tenant acme \
--api-url https://api.preview.packagepass.dev/v1 \
--registry-url https://registry.preview.packagepass.dev/npm/