Imported from vince-winkintel/gitlab-cli-skills (
glab-opentofu/SKILL.md). Install upstream withnpx skills add vince-winkintel/gitlab-cli-skills --skill glab-opentofu. Copyright stays with the author.
glab opentofu
Capture key
685c1cbd7: checksum-verified macOS arm64 binary, source commit685c1cbd74c882e0c93d7011657adde811582ed7; archive SHA-256e77f5756c3c8d9ffeaef0bf234533f395680ab9f128a75cec4c1bd7a1049788c. Only fences marked685c1cbd7use this capture. Normalization removes trailing spaces/tabs only; indentation, blank lines, wrapping, truncation, and product spelling (includingGitlab) are preserved. Other fences retain their individual prior provenance.
Snap binary lookup
If a confined snap cannot find tofu, opentofu init suggests --binary <path> for an executable accessible inside the snap. Verify that path and approve initialization before running it; the option does not bypass snap confinement or authorize state/backend writes.
Overview
Manage OpenTofu and Terraform state stored in the GitLab-managed
state backend.
Initialize a working directory against a GitLab-managed state, and
list, lock, unlock, download, or delete states.
USAGE
glab opentofu <command> [command] [--flags]
COMMANDS
init <state> [--flags] Initialize OpenTofu or Terraform.
state <command> [command] [--flags] Work with the OpenTofu or Terraform states.
FLAGS
-h --help Show help for this command.
-R --repo Select another repository. You can use either OWNER/REPO or GROUP/NAMESPACE/REPO. The full URL or Git URL is also accepted.
Quick start
glab opentofu --help
Structured output
glab opentofu state list supports --output json / -F json for structured output, which is useful for agent automation.
# List OpenTofu state with JSON output
glab opentofu state list --output json
glab opentofu state list -F json
Subcommands
See references/commands.md for full --help output.
