Publish your first package
End-to-end flow from local project to first registry release.
Publish your first package
import { Aside } from ‘@astrojs/starlight/components’;
1. Prepare project metadata
Section titled “1. Prepare project metadata”Ensure the project .bproj has valid metadata, at least one target, and explicit dependency declarations. The registry requires an owned package record before the first artifact upload; a missing record makes the upload fail with HTTP 404 (package not found).
2. Authenticate
Section titled “2. Authenticate”beskid pckg configure --api-key "$BESKID_PCKG_API_KEY"beskid pckg whoamiCreate the package record once through the authenticated metadata API. This is a separate operation from immutable artifact publication:
curl --fail-with-body --silent --show-error \ --request POST \ --header "Authorization: Bearer $BESKID_PCKG_API_KEY" \ --header 'Content-Type: application/json' \ --data '{"name":"my-package","isPublic":true,"submitForReview":false}' \ https://pckg.beskid-lang.org/api/packagesThe v0.4 release publisher performs this create-before-upload step automatically for the canonical corelib and template inventory.
3. Validate package locally
Section titled “3. Validate package locally”beskid pckg pack --package my-package --source . --output my-package.bpkThis selects the exact artifact version and performs local checks without uploading:
- manifest validity
- source/package consistency
- deterministic package assembly
4. Upload
Section titled “4. Upload”beskid pckg upload my-package --artifact my-package.bpkThe CLI reads the version from artifact-root package.json and sends multipart version, checksumSha256, and .bpk bytes to POST /api/packages/my-package/versions. The server validates the artifact and preserves that immutable package/version coordinate.
5. Verify and consume
Section titled “5. Verify and consume”beskid pckg search my-packagebeskid pckg versions my-packagebeskid pckg download my-package --version 1.0.0 --output my-package.bpkTroubleshooting
Section titled “Troubleshooting”See also
Section titled “See also”- pckg command reference — full subcommand and flag reference
- Packages without npm trauma — chapter overview and concepts
- The pckg CLI — tutorial walkthrough of
beskid pckg - Doc and api.json — generated API docs for pckg ingestion
- Package public surface — what registry consumers see