Skip to content

relgap pins ​

Scans each root for repositories and lists every pinned tool version, with the file, line and detector that found it. It reads files only and makes no network calls.

A directory that contains .git is a repository; the scan doesn't descend into another repository below it. A root without any .git is one repository itself. git ls-files lists the files, so .gitignore applies; without git, node_modules, vendor, .terraform and .terragrunt-cache are skipped.

Detectors: mise (mise.toml and mise config directories), tool-versions, aqua, idiomatic (.terraform-version, .nvmrc, go.mod and others), terraform (with module blocks), tf-lock, terragrunt, dockerfile, ci (GitHub Actions, GitLab CI, Bitbucket Pipelines), helm, renovate-comment (a # renovate: comment above a version), generic (scan.extra_files, opt-in with scan.detectors.generic) and renovate (--renovate-report).

A value marked ≈ allows more than one version: a constraint (~> 1.15), a prefix (26) or a channel (latest). A pin whose name maps to no known tool has an empty tool; list those with --unresolved and map them with aliases in the config.

Roots default to scan.roots, then the current directory.

Usage ​

sh
relgap pins [roots...] [flags]

Arguments ​

ArgumentRequiredRepeatable
rootsnoyes

Flags ​

FlagDescriptionTypeDefaultValuesConfig keyNotes
--md-max-charscut Markdown output to this many characters at a row or section boundary; 0 means no limitint60000
--outalso write the report to a file as format=path (repeatable); format is one of plain, md or jsonstring, repeatableplain: table without color
md: Markdown
json: JSON envelope for scripts
--renovate-reportadd the pins in this Renovate JSON report (renovate --platform=local --dry-run=extract --report-type=file)string
--submodulesscan checked-out git submodules as repositoriesbool
--unresolvedlist only pins that map to no known toolbool

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.

Exit codes ​

CodeMeaning
0The command finished. With --fail-on, nothing matched.
1The command failed: a read, a write, a child process or a check failed.
2Wrong usage: an unknown command or flag, a bad value or argument, an invalid config file, or a prompt with no terminal.
130Interrupted by Ctrl-C (SIGINT) or a cancelled context.

All codes are listed on the exit codes page.

Examples ​

sh
relgap pins
relgap pins ~/src/infra --format json
relgap pins . --unresolved
relgap pins . --renovate-report renovate-report.json