Publish a package
Create the package record before you upload its first artifact. Use a new semantic version when artifact content changes.
Prerequisites
Section titled “Prerequisites”Load BESKID_PCKG_API_KEY from a secret manager. The key must have publisher permission and publish scope. Prepare a library project whose manifest name and requested package identity are correct.
Actions
Section titled “Actions”-
Verify the credential without printing its value:
Terminal window beskid pckg whoami -
Create the package record through
POST /api/packages. The CLI has no package-record creation subcommand:Terminal window builtin printf 'header = "Authorization: Bearer %s"\n' "$BESKID_PCKG_API_KEY" |curl --fail-with-body --config - https://pckg.beskid-lang.org/api/packages \--header "Content-Type: application/json" \--data '{"name":"Acme.Math","isPublic":true,"submitForReview":false}'Curl reads
--config -from standard input. The bearer value is not part of the curl process argument list. Do not add--verbosebecause verbose output can disclose request headers. -
Pack version
1.0.0:Terminal window mkdir -p distbeskid pckg pack --package Acme.Math --version 1.0.0 --source . --output ./dist/Acme.Math-1.0.0.bpk -
Inspect the embedded identity and file checksums before upload:
Terminal window unzip -p ./dist/Acme.Math-1.0.0.bpk package.jsonunzip -p ./dist/Acme.Math-1.0.0.bpk checksums.sha256unzip -l ./dist/Acme.Math-1.0.0.bpk -
Confirm that the archive contains
.beskid/docs/api.json. For a library package,beskid pckg packgenerates API documentation unless you explicitly use--skip-docs. -
Upload the inspected artifact:
Terminal window beskid pckg upload Acme.Math --artifact ./dist/Acme.Math-1.0.0.bpk -
Verify the published record:
Terminal window beskid pckg details Acme.Mathbeskid pckg versions Acme.Math
Expected result
Section titled “Expected result”The pack command reports the resolved version and includes generated .beskid/docs/api.json and .beskid/docs/index.md content. Upload reports Published Acme.Math@1.0.0 with its checksum. The registry treats Acme.Math@1.0.0 as an immutable coordinate.
Recovery
Section titled “Recovery”If creation reports package already exists, inspect the existing owner and package name. Do not create a second spelling. If upload reports package version is immutable, compare the local artifact with the published checksum. Publish corrected content under a new version. If docs generation fails, fix the selected .bproj or source entrypoint before you pack again.
Next task
Section titled “Next task”Consume the published package in a separate project.