Scoop
Generate Scoop manifests for Windows package management
Anodizer generates Scoop JSON manifests and pushes them to your bucket repository.
Classification
| Group | Required (default) | Rollback | Token scope |
|---|---|---|---|
| Manager | false | re-clone bucket, git revert HEAD --no-edit, push | GITHUB_TOKEN contents:write |
See Release resilience for the full classification table and the Submitter gate semantics.
The required: field
Default: false — a Scoop bucket push failure is logged but does not fail the release.
Set required: true to make the release exit non-zero if this publisher fails:
crates:
- name: myapp
publish:
scoop:
repository:
owner: myorg
name: scoop-bucket
required: true
See Publish overview — the required: field for the full semantics.
Minimal config
crates:
- name: myapp
publish:
scoop:
repository:
owner: myorg
name: scoop-bucketScoop config fields
| Field | Type | Default | Description |
|---|---|---|---|
repository.owner | string | — | GitHub owner of the bucket repo |
repository.name | string | — | Bucket repository name |
repository.pull_request.token | string | repository.token, then SCOOP_BUCKET_TOKEN, then the GitHub token chain (see Authentication) | Token used to open the PR when repository.pull_request.enabled is set (templates allowed). Set it when the bucket token cannot open pull requests. |
description | string | Cargo [package].description | Manifest description. Derived from Cargo.toml; set to override. |
directory | string | bucket | Subdirectory in the bucket repo for manifest placement. Scoop resolves manifests only from bucket/ when that directory exists (repo root otherwise), so bucket/ is correct for both layouts. Set to "" to target the repo root. A stale same-named root-level manifest is removed when publishing into a subdirectory. |
license | string | Cargo [package].license | License identifier. Derived from Cargo.toml; set to override. |
checkver | string | github | Version-detection strategy emitted into the manifest. Defaults to github (derived from the GitHub repo); override with a homepage regex (e.g. v([\d.]+)) when GitHub release detection is not appropriate. |
Full config reference
crates:
- name: myapp
publish:
scoop:
repository:
owner: myorg # required
name: scoop-bucket # required
token: "" # default: SCOOP_BUCKET_TOKEN, then the GitHub token chain
branch: "" # default: repo default branch (versioned <manifest>-<version> when pull_request.enabled)
pull_request:
enabled: false # optional; true opens a PR in place of a direct push
token: "" # token used to open the PR (default: repository.token, then SCOOP_BUCKET_TOKEN, then the GitHub token chain)
description: "A fast CLI tool" # optional; derived from Cargo.toml description
license: MIT # optional; derived from Cargo.toml license
directory: bucket # optional; default "bucket" ("" targets the repo root)
checkver: github # optional; "github" (default) or a homepage regex
skip_upload: false # true | false | "auto" (skip prereleases)Authentication
The push to the bucket repository uses the first token that is set:
repository.tokenSCOOP_BUCKET_TOKEN- the run's GitHub token (
--token, or theANODIZER_GITHUB_TOKEN/GITHUB_TOKEN/GH_TOKENvalue read at startup, or, when all three are unset, the GitHub token file:env_files.github_token, else~/.config/anodizer/github_token, else~/.config/goreleaser/github_token; with the list form ofenv_filesno token file is read and aGITHUB_TOKENline in one of the listed files takes its place); a GitLab or Gitea token is never sent to GitHub ANODIZER_GITHUB_TOKEN,GITHUB_TOKEN,GH_TOKEN
The pull request is opened with the first token that is set:
repository.pull_request.tokenrepository.tokenSCOOP_BUCKET_TOKEN- the run's GitHub token (
--token, or theANODIZER_GITHUB_TOKEN/GITHUB_TOKEN/GH_TOKENvalue read at startup, or, when all three are unset, the GitHub token file:env_files.github_token, else~/.config/anodizer/github_token, else~/.config/goreleaser/github_token; with the list form ofenv_filesno token file is read and aGITHUB_TOKENline in one of the listed files takes its place); a GitLab or Gitea token is never sent to GitHub ANODIZER_GITHUB_TOKEN,GITHUB_TOKEN,GH_TOKEN
With none of these set, the gh CLI's own login opens the pull request; with neither a token nor gh, the publish fails.
crates:
- name: myapp
publish:
scoop:
repository:
owner: myorg
name: scoop-bucket
token: "{{ .Env.SCOOP_BUCKET_TOKEN }}"
pull_request:
enabled: true
token: "{{ .Env.SCOOP_PR_TOKEN }}"
repository.pull_request.token and repository.token are rendered before anything is cloned or pushed. On both the push and the pull request chain, a render that is empty or only whitespace, such as an unset {{ .Env.X }}, falls through to the next token, and a token is sent with its surrounding whitespace removed. A template that fails to render skips this crate's scoop entry with nothing pushed, and the next crate still publishes. The skip reason names the field and the render error (pull_request.token does not render: …), with the template's own text replaced by <template> so a token literal in it is never printed.
Common gotchas
- Only Windows archive artifacts are included in the manifest. Non-Windows targets are ignored.
- The
checkverandautoupdatefields in the generated manifest reference the GitHub releases API, so the bucket can detect new versions automatically viascoop update. - If the bucket repo requires a pull request (e.g., community buckets), use a fork + PR workflow — the direct-push model only works for self-hosted buckets.
Auto-update: checkver, autoupdate, per-arch extract_dir
ScoopInstaller/Main (and most community buckets) require a checkver +
autoupdate pair so the bucket can detect and fetch new releases. Anodizer
derives both automatically — you do not hand-write them:
checkverdefaults togithub, pointing the bucket at the GitHub releases API for version detection. Override it with a homepage regex only when GitHub detection doesn't fit.autoupdateis emitted as a per-architecture block whoseurlis your archivename_templatewith the concrete version replaced by scoop's$versionplaceholder, plus ahashrule wired to the release's checksums. Acheckveris only emitted alongside a usableautoupdateblock — acheckverwithoutautoupdateis a dead half-manifest, so anodizer never emits one alone.extract_diris set per-architecture only when the archive wraps its contents in a top-level directory; both the livearchitectureblock and theautoupdateblock carry the matchingextract_dir(with$versionsubstituted in the autoupdate copy) soscoop installandscoop updatefind the binary at the same path.
"checkver": "github",
"autoupdate": {
"architecture": {
"64bit": {
"url": "https://github.com/myorg/myapp/releases/download/v$version/myapp-$version-windows-amd64.zip"
}
}
}Generated manifest
The manifest includes:
- Download URL for the Windows archive
- SHA-256 checksum
- Binary extraction path (and a per-arch
extract_dirwhen the archive nests its contents) checkverandautoupdatetemplates for automatic updates