关于 glab-opentofu
glab-opentofu 介绍使用 glab 操作 OpenTofu 或 Terraform 集成及状态的命令,适用于命令行用户和 Agent 自动化,并支持以 JSON 列出状态。
主要功能
- 01初始化 OpenTofu 或 Terraform
- 02操作基础设施状态
- 03以 JSON 列出状态
适用场景
- 01初始化 OpenTofu 或 Terraform 环境
- 02为 Agent 自动化获取状态列表
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ vince-winkintel/ gitlab-cli-skills --skill glab-opentofu安装后在 Claude Code 中输入/glab-opentofu确认已加载。
附带文件references/commands.md
详细介绍
glab opentofu
概览
Work with the OpenTofu or Terraform integration.
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. Can use either `OWNER/REPO` or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
快速入门
glab opentofu --help
结构化输出
glab opentofu state list 支持使用 --output json / -F json 输出结构化数据,便于 Agent 自动化。
# List OpenTofu state with JSON output
glab opentofu state list --output json
glab opentofu state list -F json
子命令
完整的 --help 输出请参阅 references/commands.md。
评论
支持 Markdown