18.1 The pckg CLI
Pack and upload flows through beskid pckg—not a second package manager hiding in the bushes.
The pckg CLI
import { Aside } from ‘@astrojs/starlight/components’;
beskid pckg is the toolchain entry for registry operations: credential configuration, artifact packing, upload, and related workflows implemented in the beskid_pckg crate and the pckg registry service.
Commands you will actually use
Section titled “Commands you will actually use”beskid pckg configure --api-key "$BESKID_PCKG_API_KEY"beskid pckg whoamibeskid pckg pack --package acme.math --source . --output acme.math.bpkbeskid pckg upload acme.math --artifact acme.math.bpkWhat happens during upload
Section titled “What happens during upload”beskid pckg pack— collects source, generates API docs for library packages, selects an exact semantic version, and assembles the.bpkartifactbeskid pckg upload— reads that version from artifact-rootpackage.jsonand streamsversion, checksum, and artifact bytes toPOST /api/packages/<name>/versions- Server-side validation — manifest integrity, checksum match, review/moderation policy enforcement
- Catalog update — version appears in search and listing endpoints; project fetch/lock flows can resolve it
The registry does not assign a different version during upload. Package/version coordinates are immutable: publish a new artifact version instead of replacing existing bytes.
Authentication
Section titled “Authentication”beskid pckg loads credentials from, in order:
--bearer-token/--api-keyCLI flags (highest priority)BESKID_PCKG_TOKEN/BESKID_PCKG_API_KEYenvironment variables.beskid/pckg/repositories.json(written bybeskid pckg configure)
Publisher operations (upload, yank, unyank) require a valid publish-scoped credential.
See also
Section titled “See also”- pckg command reference — full subcommand and flag reference
- Publish a package — verified procedure with expected results and recovery
- Packages without npm trauma — chapter overview
- Doc and api.json — automatic doc generation during pack
- Registry client
- pckg client contract