relgap resolve
Resolves a tool name and prints the result with the layer that supplied each field.
<tool> is a name or alias (terraform, tf), a NAME_VERSION variable (TERRAFORM_VERSION), github:owner/repo, aqua:package, tfprovider:namespace/name, tfmodule:namespace/name/provider, chart:repo/name, chart:name, chart:url/name, npm:package, pypi:package or action:owner/repo[/path]. When a registry knows the tool, the result is the same as for its name. An action: name resolves to the action's github.com repository and never to a tool a registry lists for it.
tfprovider:, tfmodule:, chart:, npm: and pypi: names that no registry knows are looked up in the Terraform registry, Artifact Hub, the npm registry or PyPI, which name the source repository. A module's tag prefix comes from the tag of its latest version. chart:name without a repository resolves only when one Artifact Hub repository has a chart of that name. chart:url/name names the chart by its Helm repository URL (https://charts.jetstack.io/cert-manager) and resolves only through the Artifact Hub repository at that URL, the gh-pages index of a GitHub Pages URL, or the tags of an oci:// registry relgap reads images from. The short forms tables show, chart:owner/repo/name for a GitHub Pages URL and chart:registry/path/name for oci://, work too.
Layers, highest precedence first:
config tools.<name> and aliases in the config file
relgap registry curated entries embedded in relgap (registry/*.yaml), or the newer copies
from 'relgap registry update'
mise registry mise registry --json when mise is on PATH, otherwise an embedded snapshot
aqua registry an embedded index of the aqua registry
default built-in defaultsWith --guess, a name that no layer knows is searched on GitHub. The repository whose name matches exactly and has the most stars wins, and the result is marked low-confidence.
Usage
relgap resolve <tool> [flags]Arguments
| Argument | Required | Repeatable |
|---|---|---|
tool | yes | no |
Flags
| Flag | Description | Type | Default | Values | Config key | Notes |
|---|---|---|---|---|---|---|
--guess | search GitHub for a tool no registry knows and use the exact name match with the most stars | bool |
The global flags work with every command.
Output formats
--format accepts tty, plain, 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 resolve terraform
relgap resolve TERRAFORM_VERSION
relgap resolve aqua:hashicorp/terraform --format json
relgap resolve tfprovider:integrations/github
relgap resolve tfmodule:terraform-aws-modules/vpc/aws
relgap resolve chart:argo/argo-cd
relgap resolve some-tool --guess