relgap

module
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2026 License: Apache-2.0

README

relgap

relgap merges the release notes between two versions of a tool into one digest, reports which tool versions your repositories pin, and adds end-of-life and vulnerability data. It can also run as an MCP server.

relgap is pre-release, and its commands and output can still change before 1.0.

  • digest <tool> <from>..<to> merges the release notes of every version in the range, breaking changes and security fixes first, each entry with a link to its source.
  • pins lists the tool versions your repositories pin, with file and line: mise, .tool-versions, aqua, version files such as .nvmrc, Terraform, Terragrunt, Dockerfiles, CI workflows, Helm and Renovate reports.
  • outdated compares every pin with the latest release and adds end-of-life dates from endoflife.date and known vulnerabilities from OSV. digest --from-mise and digest --all digest the outdated pins.
  • digest --base <ref> digests the pins a change upgrades, from the old version to the new one. digest --pull-request does it for the pull request of a GitHub Actions run, and on a Renovate pull request only for the dependency its branch names.
  • drift shows which repositories pin different versions of the same tool, offline by default.
  • mcp serves digest, breaking_changes, outdated, drift and resolve to agents such as Claude Code (docs/dogfood.md).

The plan is in docs/plan and the CLI reference in docs/cli.

CI

outdated, digest and drift exit 3 when a --fail-on value matches (breaking, deprecation, eol, vuln, drift or outdated). A repeatable --out <format>=<path> writes JSON, SARIF, Markdown and GitHub annotations from one run with the same exit code. Markdown is cut at a table row or section once it reaches --md-max-chars (60,000 characters, under GitHub's 65,536-character comment limit). relgap notify --from <json> --notify github-pr-comment keeps one comment per report on a pull request. docs/ci/outdated.yml puts these together, and docs/ci/digest.yml comments the release notes of the tools a pull request upgrades.

Install

Releases are on GitHub: download the archive for your platform, or let mise do it.

mise use github:sassdavid/relgap
go install github.com/sassdavid/relgap/cmd/relgap@latest   # unsigned

Homebrew and Scoop come later (milestone M19). Each archive carries shell completion scripts and man pages; docs/install.md sets them up for each shell.

Release checksums are signed with cosign (keyless) and carry GitHub build-provenance attestations:

cosign verify-blob --bundle checksums.txt.sigstore.json \
  --certificate-identity-regexp '^https://github.com/sassdavid/relgap/\.github/workflows/release\.yml@' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com checksums.txt
gh attestation verify --owner sassdavid relgap_<version>_<os>_<arch>.tar.gz

Configuration

relgap config show --sources prints every effective setting and where it came from. Layers, lowest to highest: defaults, ~/.config/relgap/config.yaml, .relgap.yaml (nearest, up to the git root), RELGAP_* env vars, flags. Unknown keys are errors. Schema: schemas/config-v1.json. relgap config init writes a .relgap.yaml with every key commented out at its default.

Tool resolution

relgap resolve <tool> shows the repository, version rules and changelog sources relgap uses for a tool, and which layer supplied each field: the config file, relgap's curated entries in registry/, mise's registry (mise registry --json, or an embedded snapshot when mise isn't installed) and an embedded index of the aqua registry. relgap registry lint checks entries against schemas/registry-v1.json.

Development

mise install                         # pinned toolchain (mise.toml)
mise run check                       # linters (Go, prose, workflows) + go test -race + govulncheck
mise run test:golden -- -update      # regenerate golden files, then review the diff
mise run docs                        # regenerate docs/cli
mise run fuzz                        # every fuzz target, 60s each
mise run registry:snapshot           # refresh the embedded mise and aqua registry snapshots
mise run snapshot                    # local goreleaser build into dist/
mise run sibling:diff                # compare the files shared with tfcensus

License

Apache-2.0. The embedded registry snapshots in internal/registry/snapshot are derived from jdx/mise and aquaproj/aqua-registry, both MIT; their licenses are next to the snapshots. Each release archive has a third_party_licenses/ directory with the notices of everything compiled into the binary and an index that links each module's source.

Directories

Path Synopsis
cmd
relgap command
Relgap prints release-note digests and toolchain drift for pinned tools.
Relgap prints release-note digests and toolchain drift for pinned tools.
internal
app
Package app holds Deps, the dependencies every command receives.
Package app holds Deps, the dependencies every command receives.
buildinfo
Package buildinfo reports the version, commit and build date of the binary.
Package buildinfo reports the version, commit and build date of the binary.
classify
Package classify splits release notes into entries and gives each a kind (breaking, feature, fix and so on) with a confidence.
Package classify splits release notes into entries and gives each a kind (breaking, feature, fix and so on) with a confidence.
cli
Package cli builds the cobra command tree and maps errors to exit codes.
Package cli builds the cobra command tree and maps errors to exit codes.
complete
Package complete builds shell completion functions from local data: enum flags whose help text and completions come from one list, file and directory filters, and dynamic lists with a timeout.
Package complete builds shell completion functions from local data: enum flags whose help text and completions come from one list, file and directory filters, and dynamic lists with a timeout.
config
Package config loads layered configuration and records where each value came from.
Package config loads layered configuration and records where each value came from.
enrich
Package enrich adds end-of-life dates from endoflife.date and known vulnerabilities from OSV to a tool's versions, and reads the Go build info of installed binaries.
Package enrich adds end-of-life dates from endoflife.date and known vulnerabilities from OSV to a tool's versions, and reads the Go build info of installed binaries.
execx
Package execx runs external tools such as terragrunt, terraform, tofu and mise.
Package execx runs external tools such as terragrunt, terraform, tofu and mise.
ghcomment
Package ghcomment keeps one relgap comment per report kind on a GitHub pull request, edited in place and left alone when its content hasn't changed.
Package ghcomment keeps one relgap comment per report kind on a GitHub pull request, edited in place and left alone when its content hasn't changed.
github
Package github lists a repository's releases and tags and fetches release bodies.
Package github lists a repository's releases and tags and fetches release bodies.
htmlmd
Package htmlmd turns a part of an HTML page into Markdown, selected and cleaned with simple CSS selectors.
Package htmlmd turns a part of an HTML page into Markdown, selected and cleaned with simple CSS selectors.
httpx
Package httpx builds the HTTP client every network call goes through: a disk cache with ETag revalidation, retries with backoff, a per-host concurrency and rate limit, and a guard that stops at an exhausted GitHub rate limit.
Package httpx builds the HTTP client every network call goes through: a disk cache with ETag revalidation, retries with backoff, a per-host concurrency and rate limit, and a guard that stops at an exhausted GitHub rate limit.
mcpkit
Package mcpkit runs a stdio MCP server whose tools are read-only and answer with the JSON envelope of --format json, split into pages with an opaque cursor when an answer passes the size cap.
Package mcpkit runs a stdio MCP server whose tools are read-only and answer with the JSON envelope of --format json, split into pages with an opaque cursor when an answer passes the size cap.
mcpserver
Package mcpserver defines the digest, breaking_changes, outdated, drift and resolve tools and the upgrade_review prompt of `relgap mcp`.
Package mcpserver defines the digest, breaking_changes, outdated, drift and resolve tools and the upgrade_review prompt of `relgap mcp`.
mdindex
Package mdindex parses a changelog once and indexes its sections by version heading.
Package mdindex parses a changelog once and indexes its sections by version heading.
misex
Package misex runs mise and decodes its JSON output.
Package misex runs mise and decodes its JSON output.
prose
Package prose checks text against the mechanical parts of .claude/rules/writing.md.
Package prose checks text against the mechanical parts of .claude/rules/writing.md.
registry
Package registry resolves a tool name to a ToolSpec by merging the user config, relgap's curated entries, mise's registry and an index of the aqua registry.
Package registry resolves a tool name to a ToolSpec by merging the user config, relgap's curated entries, mise's registry and an index of the aqua registry.
registry/remote
Package remote looks tools up in the Terraform registry, Artifact Hub, npm, PyPI and the GitHub search API, for the resolver in package registry.
Package remote looks tools up in the Terraform registry, Artifact Hub, npm, PyPI and the GitHub search API, for the resolver in package registry.
render
Package render selects output formats and writes the JSON envelope.
Package render selects output formats and writes the JSON envelope.
report
Package report builds the reports relgap prints.
Package report builds the reports relgap prints.
sarif
Package sarif writes SARIF 2.1.0 logs, the format GitHub code scanning reads.
Package sarif writes SARIF 2.1.0 logs, the format GitHub code scanning reads.
scan
Package scan finds the tool versions a project pins (mise, asdf, aqua, Terraform, Dockerfiles, CI files and more) and maps each raw name to a registry tool.
Package scan finds the tool versions a project pins (mise, asdf, aqua, Terraform, Dockerfiles, CI files and more) and maps each raw name to a registry tool.
source
Package source fetches release notes for a tool's versions.
Package source fetches release notes for a tool's versions.
summarize
Package summarize asks a configured model for a cited upgrade-risk summary of a digest and keeps only the claims that cite entry IDs it was sent.
Package summarize asks a configured model for a cited upgrade-risk summary of a digest and keeps only the claims that cite entry IDs it was sent.
testutil
Package testutil has helpers shared by tests.
Package testutil has helpers shared by tests.
testutil/fakebin
Package fakebin turns the test binary into fake executables such as terragrunt or mise.
Package fakebin turns the test binary into fake executables such as terragrunt or mise.
testutil/ghtest
Package ghtest has GitHub settings for cassette tests: the scrubber and the token to record with.
Package ghtest has GitHub settings for cassette tests: the scrubber and the token to record with.
testutil/mcptest
Package mcptest connects an in-process MCP client to an mcpkit.Server and compares tool results with --format json golden files.
Package mcptest connects an in-process MCP client to an mcpkit.Server and compares tool results with --format json golden files.
testutil/sarifcheck
Package sarifcheck validates SARIF logs against the SARIF 2.1.0 JSON schema that GitHub's upload-sarif action checks uploads with.
Package sarifcheck validates SARIF logs against the SARIF 2.1.0 JSON schema that GitHub's upload-sarif action checks uploads with.
testutil/vcr
Package vcr records HTTP interactions into go-vcr cassettes and replays them in tests.
Package vcr records HTTP interactions into go-vcr cassettes and replays them in tests.
version
Package version parses tags under a version scheme, builds the sorted set of a tool's versions, and selects the versions in a range.
Package version parses tags under a version scheme, builds the sorted set of a tool's versions, and selects the versions in a range.
yamlschema
Package yamlschema validates YAML documents against a JSON Schema and reports each problem with its file:line:column.
Package yamlschema validates YAML documents against a JSON Schema and reports each problem with its file:line:column.
Package registry embeds the curated tool entries, one registry/<name>.yaml per tool.
Package registry embeds the curated tool entries, one registry/<name>.yaml per tool.
Package schemas embeds the JSON Schemas for config files and JSON output.
Package schemas embeds the JSON Schemas for config files and JSON output.
scripts
gendocs command
Gendocs regenerates docs/cli from the cobra command tree and exits 1 when the checked-in copy was stale.
Gendocs regenerates docs/cli from the cobra command tree and exits 1 when the checked-in copy was stale.
gensite command
Gensite writes the relgap-specific data files of the docs site from code and test goldens, and exits 1 when a checked-in copy was stale.
Gensite writes the relgap-specific data files of the docs site from code and test goldens, and exits 1 when a checked-in copy was stale.
proselint command
Proselint checks the repository text against .claude/rules/writing.md.
Proselint checks the repository text against .claude/rules/writing.md.
regsnapshot command
Regsnapshot writes the embedded mise and aqua registry snapshots from local checkouts of jdx/mise and aquaproj/aqua-registry.
Regsnapshot writes the embedded mise and aqua registry snapshots from local checkouts of jdx/mise and aquaproj/aqua-registry.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL