Publish snapshots from CI
kubb studio snapshot generates a package on a CI runner, uploads it to Studio in one request, and exits. Run it on pull or merge requests and on the default branch so reviewers can compare their output.
Supported providers
| Provider | Agent identity | Guide |
|---|---|---|
| GitHub Actions | Detected | Publish snapshots with GitHub Actions |
| GitLab CI | Detected | Publish snapshots with GitLab CI |
| Bitbucket Pipelines, CircleCI | Detected. Pass --base-id to compare with a branch | Run kubb studio snapshot with KUBB_TOKEN set |
| Other | Pass --id and --base-id | See below |
Every provider needs an organization CI API key stored as KUBB_TOKEN. Snapshot installation uses a separate registry API key. Create both in Studio under Settings > Developer > Tokens.
Other CI providers
For a provider without automatic agent identification, use a stable --id on the base branch and pass it as --base-id on pull request runs:
kubb studio snapshot --id jenkins:api:main # on main
kubb studio snapshot --id jenkins:api:pr-12 --base-id jenkins:api:main # on a pull requestUse kubb studio snapshot --json | jq -r '.url' to pass the tarball URL to another step. See CI agent identity and Snapshot output for the result fields.
Install the snapshot
Configure the registry API key, then run the install command from the snapshot result:
//kubb.studio/:_authToken=${KUBB_REGISTRY_TOKEN}npm i https://kubb.studio/packages/<agent>/<package>.tgz