relgap digest
Lists the versions after <from> up to and including <to>, fetches their release notes and groups the entries by kind: breaking changes, deprecations, security, features, fixes, other.
<tool> resolves as in 'relgap resolve', --guess included. Without <to> the range ends at the latest stable version on the release line: --line, else the tool's registry version.line (none for most tools).
Notes come from the tool's registry sources: GitHub release bodies and changelog files, each file fetched and parsed once. A bullet that two sources share is shown once. Each entry has a confidence between 0 and 1; entries below --min-confidence (default 0.5) are hidden and counted. --format md writes PR-ready Markdown with one <details> block per version. It puts a zero-width space after each @ and # that would mention a user or reference an issue, and sends github.com issue links through redirect.github.com, so a comment that quotes the notes notifies nobody. --only lists the entries of the named kinds; the counts still cover every kind.
--from-mise digests every tool pinned in the project's mise config files that is behind its latest version, from the pinned version to the latest. --all does the same for every pin 'relgap outdated' compares. Both use the ranges and digests 'relgap outdated' shows, and take the project path as their only argument (default: the current directory).
--base <ref> digests the pins a change upgrades: it scans the files the base commit has under the path and the working tree (or --head <ref>), pairs the pins by file, tool and name, and digests each tool whose exact version changed, from the base version to the head version. A constraint whose lower bound moved while its operator and other clauses stayed (>= 6.62.0 to >= 6.72.0) digests from the old bound to the new one, with a note on stderr. The base files come from 'git archive', so paths marked export-ignore aren't compared. Added, removed and other changed pins are listed on stderr and get no digest. In JSON, each digest lists the changed pins it covers under pins, with file, line, raw name and both values.
--pull-request does the same in GitHub Actions. It reads the pull request from the GITHUB_EVENT_PATH event and uses its base commit, which the clone must have (actions/checkout with fetch-depth: 0). A Renovate pull request, one whose branch starts with renovate/ or whose body has Renovate's renovate-debug comment, is limited to the dependency its branch names, such as terraform in renovate/terraform-1.x. Group branches digest every upgraded pin. When the base commit is missing, the comment's target branch and then the pull request's base branch are tried. --base overrides the event's base commit.
--fail-on breaking exits 3 when a digest has a breaking entry at or above --min-confidence, and --fail-on deprecation when it has a deprecation. A single digest counts once; --from-mise and --all count each pin, as 'relgap outdated' does, and --base and --pull-request each digest, and a value exits 3 once its count reaches --min-count. With --from-mise or --all, a pin that fails exits 1 when no value matched. The other --fail-on values belong to 'relgap outdated' and 'relgap drift'.
--summarize adds an upgrade-risk summary from the model the llm config names: up to 5 risks and the required actions, each citing entry IDs. The model gets the tool, the range and the listed entries with their IDs and source URLs, never a local path or pin location. relgap removes claims that cite no entry ID or one it didn't send, and labels the summary as LLM output in every format. The --fail-on gate and the exit code never read it. A missing llm config, --offline, a provider error and llm.timeout (default 120s) are warnings with no summary.
GitHub token: GH_TOKEN, GITHUB_TOKEN, gh's config file, then 'gh auth token'. Without one, relgap uses the REST API (60 requests per hour) with 2 concurrent requests.
Usage
relgap digest <tool> <from>..[<to>] | --from-mise [path] | --all [path] | --base <ref> [path] | --pull-request [path]Arguments
| Argument | Required | Repeatable |
|---|---|---|
tool | yes | no |
from>..[<to | yes | no |
path | no | no |
path | no | no |
ref | yes | no |
path | no | no |
path | no | no |
Flags
| Flag | Description | Type | Default | Values | Config key | Notes |
|---|---|---|---|---|---|---|
--all | digest every outdated pin in the project, as 'relgap outdated' lists them | bool | not with --base; not with --head; not with --pull-request; not with --from-mise; not with --line; not with --include-prereleases | |||
--base | digest the pins upgraded since this git ref (branch, tag or commit), against the working tree | string | not with --from-mise; not with --all; not with --line | |||
--fail-on | exit 3 when this matches: breaking or deprecation; repeatable (config policy.fail_on) | list, repeatable | breaking: a breaking change in the rangedeprecation: a deprecation in the range | policy.fail_on | ||
--from-mise | digest every outdated tool pinned in the project's mise config, pin to latest | bool | not with --base; not with --head; not with --pull-request; not with --all; not with --line; not with --include-prereleases | |||
--guess | search GitHub for a tool no registry knows and use the exact name match with the most stars | bool | ||||
--head | compare --base or --pull-request with this git ref instead of the working tree | string | not with --from-mise; not with --all; not with --line | |||
--include-prereleases | include prereleases (on when <from> or <to> is a prerelease) | bool | not with --from-mise; not with --all | |||
--line | release line the range stays on: none, major or minor | string | none | none: follow the range wherever it goesmajor: stay on the major version of <from>minor: stay on the minor version of <from> | not with --base; not with --head; not with --pull-request; not with --from-mise; not with --all | |
--md-max-chars | cut Markdown output to this many characters at a row or section boundary; 0 means no limit | int | 60000 | |||
--min-count | findings a --fail-on value needs before it exits 3 | int | 1 | |||
--only | list only entries of this kind: breaking, deprecation, security, feature, fix or other; repeatable | list, repeatable | breaking: breaking changesdeprecation: deprecationssecurity: security fixesfeature: new featuresfix: bug fixesother: everything else | |||
--out | also write the report to a file as format=path (repeatable); format is one of plain, md or json | string, repeatable | plain: table without colormd: Markdownjson: JSON envelope for scripts | |||
--pull-request | digest the pins the pull request in GITHUB_EVENT_PATH upgrades, from its base commit | bool | not with --from-mise; not with --all; not with --line | |||
--summarize | add an LLM summary that cites entry IDs (needs the llm config; never changes the exit code) | bool |
The global flags work with every command.
Output formats
--format accepts tty, plain, md, json. Without it, the format is tty when stdout is a terminal and plain otherwise. Formats are described on the global flags page.
Fail-on values
--fail-on makes the command exit 3 when the report has a match:
| Value | Matches |
|---|---|
breaking | a breaking change in the range |
deprecation | a deprecation in the range |
Exit codes
| Code | Meaning |
|---|---|
| 0 | The command finished. With --fail-on, nothing matched. |
| 1 | The command failed: a read, a write, a child process or a check failed. |
| 2 | Wrong usage: an unknown command or flag, a bad value or argument, an invalid config file, or a prompt with no terminal. |
| 3 | A --fail-on gate matched. The report is still written. |
| 4 | Credentials were missing or rejected for every source the command needed. |
| 130 | Interrupted by Ctrl-C (SIGINT) or a cancelled context. |
All codes are listed on the exit codes page.
Examples
relgap digest terraform 1.15.8..1.17.1
relgap digest helm 3.19.0.. --line major
relgap digest kubectl 1.36.0..1.37.2 --format md > digest.md
relgap digest terraform 1.15.8..1.17.1 --min-confidence 0
relgap digest argo-cd 3.2.0..3.4.1 --only breaking --only deprecation
relgap digest --from-mise --fail-on breaking
relgap digest --all ~/src/infra --format md > upgrade-notes.md
relgap digest --base origin/main --format md
relgap digest --pull-request --format json > digest.json
relgap digest --from-mise --format md --summarize > upgrade-notes.md
relgap digest terraform 1.15.8..1.17.1 --format json | jq '.data.tools[].entries[] | select(.kind == "breaking")'