{
  "description": "Common Talos Linux node operations: apply a machine config, read resources, read logs, fetch the admin kubeconfig. Insecure/maintenance mode, cluster proxy and many other flags are left out.",
  "name": "talosctl",
  "subcommands": [
    {
      "name": "apply-config",
      "description": "Apply a machine config",
      "options": [
        {
          "names": [
            "--nodes",
            "-n"
          ],
          "description": "Target nodes, comma separated or repeated.",
          "args": {
            "name": "nodes",
            "description": "Target nodes, comma separated or repeated.",
            "isOptional": false,
            "isVariadic": true
          },
          "isRepeatable": true
        },
        {
          "names": [
            "--endpoints",
            "-e"
          ],
          "description": "Override default endpoints in the Talos configuration.",
          "args": {
            "name": "endpoints",
            "description": "Override default endpoints in the Talos configuration.",
            "isOptional": false,
            "isVariadic": true
          },
          "isRepeatable": true
        },
        {
          "names": [
            "--talosconfig"
          ],
          "description": "Talos config file",
          "args": {
            "name": "talosconfig",
            "isOptional": false,
            "template": "filepaths"
          }
        },
        {
          "names": [
            "--file",
            "-f"
          ],
          "description": "Config file",
          "args": {
            "name": "file",
            "isOptional": false,
            "template": "filepaths"
          }
        },
        {
          "names": [
            "--mode",
            "-m"
          ],
          "description": "Apply mode",
          "args": {
            "name": "mode",
            "isOptional": false,
            "suggestions": [
              {
                "name": "auto",
                "description": "Auto"
              },
              {
                "name": "no-reboot",
                "description": "No reboot"
              },
              {
                "name": "staged",
                "description": "Staged"
              },
              {
                "name": "try",
                "description": "Try (roll back after timeout)"
              }
            ]
          }
        },
        {
          "names": [
            "--dry-run"
          ],
          "description": "Check how the config change will be applied without applying it."
        },
        {
          "names": [
            "--config-patch",
            "-p"
          ],
          "description": "Patch to apply to the local config before sending it.",
          "args": {
            "name": "config_patch",
            "description": "Patch to apply to the local config before sending it.",
            "isOptional": false,
            "isVariadic": true
          },
          "isRepeatable": true
        }
      ]
    },
    {
      "name": "get",
      "description": "Get resources",
      "options": [
        {
          "names": [
            "--nodes",
            "-n"
          ],
          "description": "Target nodes, comma separated or repeated.",
          "args": {
            "name": "nodes",
            "description": "Target nodes, comma separated or repeated.",
            "isOptional": false,
            "isVariadic": true
          },
          "isRepeatable": true
        },
        {
          "names": [
            "--endpoints",
            "-e"
          ],
          "description": "Override default endpoints in the Talos configuration.",
          "args": {
            "name": "endpoints",
            "description": "Override default endpoints in the Talos configuration.",
            "isOptional": false,
            "isVariadic": true
          },
          "isRepeatable": true
        },
        {
          "names": [
            "--talosconfig"
          ],
          "description": "Talos config file",
          "args": {
            "name": "talosconfig",
            "isOptional": false,
            "template": "filepaths"
          }
        },
        {
          "names": [
            "--output",
            "-o"
          ],
          "description": "Output",
          "args": {
            "name": "output",
            "isOptional": false,
            "suggestions": [
              {
                "name": "table",
                "description": "Table"
              },
              {
                "name": "json",
                "description": "JSON"
              },
              {
                "name": "yaml",
                "description": "YAML"
              },
              {
                "name": "jsonpath",
                "description": "JSONPath"
              }
            ]
          }
        },
        {
          "names": [
            "--watch",
            "-w"
          ],
          "description": "Watch changes"
        },
        {
          "names": [
            "--namespace"
          ],
          "description": "Namespace",
          "args": {
            "name": "namespace",
            "isOptional": false
          }
        }
      ],
      "args": [
        {
          "name": "type",
          "description": "Resource type; run `talosctl get rd` to list all types.",
          "isOptional": true
        },
        {
          "name": "resource_id",
          "isOptional": true
        }
      ]
    },
    {
      "name": "logs",
      "description": "Read logs",
      "options": [
        {
          "names": [
            "--nodes",
            "-n"
          ],
          "description": "Target nodes, comma separated or repeated.",
          "args": {
            "name": "nodes",
            "description": "Target nodes, comma separated or repeated.",
            "isOptional": false,
            "isVariadic": true
          },
          "isRepeatable": true
        },
        {
          "names": [
            "--endpoints",
            "-e"
          ],
          "description": "Override default endpoints in the Talos configuration.",
          "args": {
            "name": "endpoints",
            "description": "Override default endpoints in the Talos configuration.",
            "isOptional": false,
            "isVariadic": true
          },
          "isRepeatable": true
        },
        {
          "names": [
            "--talosconfig"
          ],
          "description": "Talos config file",
          "args": {
            "name": "talosconfig",
            "isOptional": false,
            "template": "filepaths"
          }
        },
        {
          "names": [
            "--follow",
            "-f"
          ],
          "description": "Follow"
        },
        {
          "names": [
            "--tail"
          ],
          "description": "Tail lines",
          "args": {
            "name": "tail",
            "isOptional": false
          }
        },
        {
          "names": [
            "--kind"
          ],
          "description": "Log source kind",
          "args": {
            "name": "kind",
            "isOptional": false,
            "suggestions": [
              {
                "name": "container",
                "description": "Container"
              },
              {
                "name": "vm",
                "description": "VM"
              },
              {
                "name": "service",
                "description": "Service"
              }
            ]
          }
        },
        {
          "names": [
            "--namespace"
          ],
          "description": "system (default), cri for Kubernetes workloads, taloscontainers.",
          "args": {
            "name": "namespace",
            "description": "system (default), cri for Kubernetes workloads, taloscontainers.",
            "isOptional": false,
            "suggestions": [
              {
                "name": "system",
                "description": "system"
              },
              {
                "name": "cri",
                "description": "cri (Kubernetes)"
              }
            ]
          }
        }
      ],
      "args": [
        {
          "name": "name",
          "isOptional": true
        }
      ]
    },
    {
      "name": "kubeconfig",
      "description": "Fetch the admin kubeconfig",
      "options": [
        {
          "names": [
            "--nodes",
            "-n"
          ],
          "description": "Target nodes, comma separated or repeated.",
          "args": {
            "name": "nodes",
            "description": "Target nodes, comma separated or repeated.",
            "isOptional": false,
            "isVariadic": true
          },
          "isRepeatable": true
        },
        {
          "names": [
            "--endpoints",
            "-e"
          ],
          "description": "Override default endpoints in the Talos configuration.",
          "args": {
            "name": "endpoints",
            "description": "Override default endpoints in the Talos configuration.",
            "isOptional": false,
            "isVariadic": true
          },
          "isRepeatable": true
        },
        {
          "names": [
            "--talosconfig"
          ],
          "description": "Talos config file",
          "args": {
            "name": "talosconfig",
            "isOptional": false,
            "template": "filepaths"
          }
        },
        {
          "names": [
            "--merge",
            "-m"
          ],
          "description": "Merge with existing kubeconfig"
        },
        {
          "names": [
            "--force",
            "-f"
          ],
          "description": "Force overwrite",
          "isDangerous": true
        }
      ],
      "args": [
        {
          "name": "local_path",
          "description": "Defaults to the current directory, or ~/.kube/config when merging.",
          "isOptional": true,
          "template": "filepaths"
        }
      ]
    }
  ]
}
