{
  "id": "opentofu",
  "name": "OpenTofu",
  "homepage": "https://opentofu.org",
  "description": "OpenTofu is an open-source infrastructure as code tool.",
  "executables": [
    "tofu"
  ],
  "dotfiles": {
    "paths": [
      "~/.tofurc",
      "[configHome]/opentofu/tofurc",
      "%APPDATA%/tofu.rc"
    ],
    "secret": [],
    "side_effect": false
  },
  "commands": {
    "format": 1,
    "label": "OpenTofu",
    "description": "Initialize, plan and apply OpenTofu configurations. Backend settings, state commands, workspaces and other subcommands are outside these forms.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": false,
      "short_bundles": false
    },
    "subcommand": [
      {
        "path": [
          "init"
        ],
        "label": "Initialize working directory",
        "description": "Download providers and modules. Backend configuration options are left out.",
        "source": [
          {
            "id": "docs",
            "kind": "manual",
            "url": "https://opentofu.org/docs/cli/commands/init/",
            "evidence": "* `-upgrade` Upgrade all previously-selected plugins to the newest version\n* `-input=true` Ask for input if necessary. If false, will error if\n* `-no-color` Disable color codes in the command output.\n* `-lock=false` Disable locking of state files during state-related operations.\n"
          }
        ],
        "field": [
          {
            "id": "upgrade",
            "label": "Upgrade providers and modules",
            "type": "boolean",
            "option": [
              "-upgrade"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "no_color",
            "label": "No color",
            "type": "boolean",
            "option": [
              "-no-color"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "no_lock",
            "label": "Disable state locking",
            "type": "boolean",
            "option": [
              "-lock=false"
            ],
            "sources": [
              "docs"
            ]
          }
        ],
        "task": [
          {
            "id": "init",
            "label": "Initialize",
            "fields": [
              "upgrade",
              "no_color"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "upgrade",
              "no_color",
              "no_lock"
            ]
          }
        ]
      },
      {
        "path": [
          "plan"
        ],
        "label": "Create an execution plan",
        "description": "Preview changes. Variable assignments and target/replace addresses are included; planning modes beyond destroy and refresh-only are not.",
        "source": [
          {
            "id": "docs",
            "kind": "manual",
            "url": "https://opentofu.org/docs/cli/commands/plan/",
            "evidence": "Activate destroy mode using the `-destroy` command line option.\nActivate refresh-only mode using the `-refresh-only` command line option.\n- `-refresh=false` - Disables the default behavior of synchronizing the\n- `-target=ADDRESS` - Instructs OpenTofu to focus its planning efforts only\n- `-var-file=FILENAME` - Sets values for potentially many\n* `-detailed-exitcode` - Returns a detailed exit code when the command exits.\n* `-out=FILENAME` - Writes the generated plan to the given filename in an\n* `-no-color` - Disables terminal formatting sequences in the output. Use this\n"
          }
        ],
        "field": [
          {
            "id": "destroy",
            "label": "Plan to destroy everything",
            "type": "boolean",
            "option": [
              "-destroy"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "refresh_only",
            "label": "Refresh-only plan",
            "type": "boolean",
            "option": [
              "-refresh-only"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "no_refresh",
            "label": "Skip refresh",
            "type": "boolean",
            "option": [
              "-refresh=false"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "target",
            "label": "Target address",
            "type": "string",
            "option": [
              "-target"
            ],
            "multiple": true,
            "sources": [
              "docs"
            ]
          },
          {
            "id": "var_file",
            "label": "Variables file",
            "type": "path",
            "option": [
              "-var-file"
            ],
            "path": {
              "kind": "file",
              "role": "input"
            },
            "multiple": true,
            "sources": [
              "docs"
            ]
          },
          {
            "id": "out",
            "label": "Save plan to file",
            "type": "path",
            "option": [
              "-out"
            ],
            "path": {
              "kind": "file",
              "role": "output"
            },
            "sources": [
              "docs"
            ]
          },
          {
            "id": "detailed_exitcode",
            "label": "Detailed exit code",
            "type": "boolean",
            "option": [
              "-detailed-exitcode"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "no_color",
            "label": "No color",
            "type": "boolean",
            "option": [
              "-no-color"
            ],
            "sources": [
              "docs"
            ]
          }
        ],
        "task": [
          {
            "id": "plan",
            "label": "Plan and save",
            "fields": [
              "out",
              "var_file",
              "target",
              "no_color"
            ],
            "required": []
          },
          {
            "id": "plan-destroy",
            "label": "Preview destroy",
            "set": {
              "destroy": [
                true
              ]
            },
            "lock": [
              "destroy"
            ],
            "fields": [
              "destroy",
              "var_file",
              "target",
              "no_color"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "destroy",
              "refresh_only",
              "var_file",
              "target",
              "out"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "no_refresh",
              "detailed_exitcode",
              "no_color"
            ]
          }
        ]
      },
      {
        "path": [
          "apply"
        ],
        "label": "Apply changes",
        "description": "Apply the configuration or a saved plan file. Review a plan first.",
        "source": [
          {
            "id": "docs",
            "kind": "manual",
            "url": "https://opentofu.org/docs/cli/commands/apply/",
            "evidence": "- `-auto-approve` - Skips interactive approval of plan before applying. This\n- `-input=false` - Disables all of OpenTofu's interactive prompts. Note that\n- `-compact-warnings` - Shows any warning messages in a compact form which\nActivate destroy mode using the `-destroy` command line option.\n- `-var-file=FILENAME` - Sets values for potentially many\n"
          }
        ],
        "field": [
          {
            "id": "auto_approve",
            "label": "Skip interactive approval",
            "type": "boolean",
            "option": [
              "-auto-approve"
            ],
            "effect": "overwrite",
            "sources": [
              "docs"
            ]
          },
          {
            "id": "no_input",
            "label": "Disable prompts",
            "type": "boolean",
            "option": [
              "-input=false"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "compact_warnings",
            "label": "Compact warnings",
            "type": "boolean",
            "option": [
              "-compact-warnings"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "var_file",
            "label": "Variables file",
            "type": "path",
            "option": [
              "-var-file"
            ],
            "path": {
              "kind": "file",
              "role": "input"
            },
            "multiple": true,
            "sources": [
              "docs"
            ]
          },
          {
            "id": "planfile",
            "label": "Saved plan file",
            "description": "Leave empty to plan and apply the current configuration.",
            "type": "path",
            "position": 0,
            "path": {
              "kind": "file",
              "role": "input"
            },
            "sources": [
              "docs"
            ]
          }
        ],
        "task": [
          {
            "id": "apply",
            "label": "Apply configuration",
            "fields": [
              "var_file",
              "compact_warnings"
            ],
            "required": []
          },
          {
            "id": "apply-plan",
            "label": "Apply saved plan",
            "fields": [
              "planfile",
              "compact_warnings"
            ],
            "required": [
              "planfile"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "planfile",
              "var_file",
              "auto_approve"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "no_input",
              "compact_warnings"
            ]
          }
        ]
      }
    ]
  }
}
