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
relgap pins [roots...] [flags]Arguments
| Argument | Required | Repeatable |
|---|---|---|
roots | no | yes |
Flags
| Flag | Description | Type | Default | Values | Config key | Notes |
|---|---|---|---|---|---|---|
--md-max-chars | cut Markdown output to this many characters at a row or section boundary; 0 means no limit | int | 60000 | |||
--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 | |||
--renovate-report | add the pins in this Renovate JSON report (renovate --platform=local --dry-run=extract --report-type=file) | string | ||||
--submodules | scan checked-out git submodules as repositories | bool | ||||
--unresolved | list only pins that map to no known tool | 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.
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. |
| 130 | Interrupted by Ctrl-C (SIGINT) or a cancelled context. |
All codes are listed on the exit codes page.
Examples
relgap pins
relgap pins ~/src/infra --format json
relgap pins . --unresolved
relgap pins . --renovate-report renovate-report.json