{
  "id": "talosctl",
  "name": "talosctl",
  "homepage": "https://www.talos.dev/",
  "description": "The command-line client for managing Talos Linux clusters.",
  "executables": [
    "talosctl"
  ],
  "dotfiles": {
    "paths": [],
    "secret": [
      "~/.talos/config"
    ],
    "side_effect": false
  },
  "commands": {
    "format": 1,
    "label": "talosctl",
    "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.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "subcommand": [
      {
        "path": [
          "apply-config"
        ],
        "label": "Apply a machine config",
        "source": [
          {
            "id": "docs",
            "kind": "manual",
            "url": "https://github.com/siderolabs/talos/blob/main/website/content/v1.15/reference/cli.md",
            "revision": "v1.15",
            "evidence": "talosctl apply-config [flags]\n  -p, --config-patch stringArray            the list of config patches to apply to the local config file before sending it to the node\n      --dry-run                             check how the config change will be applied in dry-run mode\n  -e, --endpoints strings                   override default endpoints in Talos configuration\n  -f, --file string                         the filename of the updated configuration\n  -m, --mode auto, no-reboot, staged, try   apply config mode (default auto)\n  -n, --nodes strings                       target the specified nodes\n      --talosconfig string                  the path to the Talos configuration file, defaults to 'TALOSCONFIG' env variable if set, otherwise '$HOME/\n"
          }
        ],
        "field": [
          {
            "id": "nodes",
            "label": "Nodes",
            "description": "Target nodes, comma separated or repeated.",
            "type": "string",
            "option": [
              "--nodes",
              "-n"
            ],
            "multiple": true,
            "sources": [
              "docs"
            ]
          },
          {
            "id": "endpoints",
            "label": "Endpoints",
            "description": "Override default endpoints in the Talos configuration.",
            "type": "string",
            "option": [
              "--endpoints",
              "-e"
            ],
            "multiple": true,
            "sources": [
              "docs"
            ]
          },
          {
            "id": "talosconfig",
            "label": "Talos config file",
            "type": "path",
            "option": [
              "--talosconfig"
            ],
            "path": {
              "kind": "file",
              "role": "input"
            },
            "sources": [
              "docs"
            ]
          },
          {
            "id": "file",
            "label": "Config file",
            "type": "path",
            "option": [
              "--file",
              "-f"
            ],
            "path": {
              "kind": "file",
              "role": "input"
            },
            "sources": [
              "docs"
            ]
          },
          {
            "id": "mode",
            "label": "Apply mode",
            "type": "enum",
            "option": [
              "--mode",
              "-m"
            ],
            "choices": [
              {
                "value": "auto",
                "label": "Auto"
              },
              {
                "value": "no-reboot",
                "label": "No reboot"
              },
              {
                "value": "staged",
                "label": "Staged"
              },
              {
                "value": "try",
                "label": "Try (roll back after timeout)"
              }
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "dry_run",
            "label": "Dry run",
            "description": "Check how the config change will be applied without applying it.",
            "type": "boolean",
            "option": [
              "--dry-run"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "config_patch",
            "label": "Config patch",
            "description": "Patch to apply to the local config before sending it.",
            "type": "string",
            "option": [
              "--config-patch",
              "-p"
            ],
            "multiple": true,
            "sources": [
              "docs"
            ]
          }
        ],
        "task": [
          {
            "id": "dry_run",
            "label": "Dry-run a config",
            "set": {
              "dry_run": [
                true
              ]
            },
            "fields": [
              "file",
              "nodes",
              "mode",
              "dry_run",
              "config_patch"
            ],
            "required": [
              "file",
              "nodes"
            ]
          },
          {
            "id": "apply",
            "label": "Apply a config",
            "fields": [
              "file",
              "nodes",
              "mode",
              "config_patch"
            ],
            "required": [
              "file",
              "nodes"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "file",
              "nodes",
              "mode",
              "dry_run",
              "config_patch"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "endpoints",
              "talosconfig"
            ]
          }
        ]
      },
      {
        "path": [
          "get"
        ],
        "label": "Get resources",
        "source": [
          {
            "id": "docs",
            "kind": "manual",
            "url": "https://github.com/siderolabs/talos/blob/main/website/content/v1.15/reference/cli.md",
            "revision": "v1.15",
            "evidence": "talosctl get <type> [<id>] [flags]\n  -e, --endpoints strings          override default endpoints in Talos configuration\n      --namespace string           resource namespace (default is to use default namespace per resource)\n  -n, --nodes strings              target the specified nodes\n  -o, --output string              output mode (json, table, yaml, jsonpath) (default \"table\")\n      --talosconfig string         the path to the Talos configuration file, defaults to 'TALOSCONFIG' env variable if set, otherwise '$HOME/.talos/co\n  -w, --watch                      watch resource changes\n"
          }
        ],
        "field": [
          {
            "id": "nodes",
            "label": "Nodes",
            "description": "Target nodes, comma separated or repeated.",
            "type": "string",
            "option": [
              "--nodes",
              "-n"
            ],
            "multiple": true,
            "sources": [
              "docs"
            ]
          },
          {
            "id": "endpoints",
            "label": "Endpoints",
            "description": "Override default endpoints in the Talos configuration.",
            "type": "string",
            "option": [
              "--endpoints",
              "-e"
            ],
            "multiple": true,
            "sources": [
              "docs"
            ]
          },
          {
            "id": "talosconfig",
            "label": "Talos config file",
            "type": "path",
            "option": [
              "--talosconfig"
            ],
            "path": {
              "kind": "file",
              "role": "input"
            },
            "sources": [
              "docs"
            ]
          },
          {
            "id": "type",
            "label": "Resource type",
            "description": "Resource type; run `talosctl get rd` to list all types.",
            "type": "string",
            "position": 0,
            "sources": [
              "docs"
            ]
          },
          {
            "id": "resource_id",
            "label": "Resource ID",
            "type": "string",
            "position": 1,
            "sources": [
              "docs"
            ]
          },
          {
            "id": "output",
            "label": "Output",
            "type": "enum",
            "option": [
              "--output",
              "-o"
            ],
            "choices": [
              {
                "value": "table",
                "label": "Table"
              },
              {
                "value": "json",
                "label": "JSON"
              },
              {
                "value": "yaml",
                "label": "YAML"
              },
              {
                "value": "jsonpath",
                "label": "JSONPath"
              }
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "watch",
            "label": "Watch changes",
            "type": "boolean",
            "option": [
              "--watch",
              "-w"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "namespace",
            "label": "Namespace",
            "type": "string",
            "option": [
              "--namespace"
            ],
            "sources": [
              "docs"
            ]
          }
        ],
        "task": [
          {
            "id": "get",
            "label": "Get a resource type",
            "fields": [
              "type",
              "resource_id",
              "nodes",
              "output"
            ],
            "required": [
              "type"
            ]
          },
          {
            "id": "watch",
            "label": "Watch a resource type",
            "set": {
              "watch": [
                true
              ]
            },
            "fields": [
              "type",
              "resource_id",
              "nodes",
              "watch"
            ],
            "required": [
              "type"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "type",
              "resource_id",
              "nodes",
              "output",
              "watch"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "namespace",
              "endpoints",
              "talosconfig"
            ]
          }
        ]
      },
      {
        "path": [
          "logs"
        ],
        "label": "Read logs",
        "source": [
          {
            "id": "docs",
            "kind": "manual",
            "url": "https://github.com/siderolabs/talos/blob/main/website/content/v1.15/reference/cli.md",
            "revision": "v1.15",
            "evidence": "talosctl logs <name> [flags]\n  -e, --endpoints strings          override default endpoints in Talos configuration\n  -f, --follow                     specify if the logs should be streamed\n      --kind string                log source kind: container, vm, or service (default: legacy routing)\n      --namespace string           namespace to use: \"system\" (default, Talos service containers), \"cri\" for Kubernetes workloads, \"taloscontainers\" f\n  -n, --nodes strings              target the specified nodes\n      --tail int32                 lines of log file to display (default is to show from the beginning) (default -1)\n      --talosconfig string         the path to the Talos configuration file, defaults to 'TALOSCONFIG' env variable if set, otherwise '$HOME/.talos/co\n"
          }
        ],
        "field": [
          {
            "id": "nodes",
            "label": "Nodes",
            "description": "Target nodes, comma separated or repeated.",
            "type": "string",
            "option": [
              "--nodes",
              "-n"
            ],
            "multiple": true,
            "sources": [
              "docs"
            ]
          },
          {
            "id": "endpoints",
            "label": "Endpoints",
            "description": "Override default endpoints in the Talos configuration.",
            "type": "string",
            "option": [
              "--endpoints",
              "-e"
            ],
            "multiple": true,
            "sources": [
              "docs"
            ]
          },
          {
            "id": "talosconfig",
            "label": "Talos config file",
            "type": "path",
            "option": [
              "--talosconfig"
            ],
            "path": {
              "kind": "file",
              "role": "input"
            },
            "sources": [
              "docs"
            ]
          },
          {
            "id": "name",
            "label": "Service or container",
            "type": "string",
            "position": 0,
            "sources": [
              "docs"
            ]
          },
          {
            "id": "follow",
            "label": "Follow",
            "type": "boolean",
            "option": [
              "--follow",
              "-f"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "tail",
            "label": "Tail lines",
            "type": "integer",
            "option": [
              "--tail"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "kind",
            "label": "Log source kind",
            "type": "enum",
            "option": [
              "--kind"
            ],
            "choices": [
              {
                "value": "container",
                "label": "Container"
              },
              {
                "value": "vm",
                "label": "VM"
              },
              {
                "value": "service",
                "label": "Service"
              }
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "namespace",
            "label": "Namespace",
            "description": "system (default), cri for Kubernetes workloads, taloscontainers.",
            "type": "string",
            "option": [
              "--namespace"
            ],
            "suggestions": [
              {
                "value": "system",
                "label": "system"
              },
              {
                "value": "cri",
                "label": "cri (Kubernetes)"
              }
            ],
            "sources": [
              "docs"
            ]
          }
        ],
        "task": [
          {
            "id": "follow",
            "label": "Follow a service log",
            "set": {
              "follow": [
                true
              ]
            },
            "fields": [
              "name",
              "nodes",
              "follow",
              "tail"
            ],
            "required": [
              "name"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "name",
              "nodes",
              "follow",
              "tail"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "kind",
              "namespace",
              "endpoints",
              "talosconfig"
            ]
          }
        ]
      },
      {
        "path": [
          "kubeconfig"
        ],
        "label": "Fetch the admin kubeconfig",
        "source": [
          {
            "id": "docs",
            "kind": "manual",
            "url": "https://github.com/siderolabs/talos/blob/main/website/content/v1.15/reference/cli.md",
            "revision": "v1.15",
            "evidence": "talosctl kubeconfig [local-path] [flags]\n  -e, --endpoints strings           override default endpoints in Talos configuration\n  -f, --force                       Force overwrite of kubeconfig if already present, force overwrite on kubeconfig merge\n      --force-context-name string   Force context name for kubeconfig merge\n  -m, --merge                       Merge with existing kubeconfig (default true)\n  -n, --nodes strings               target the specified nodes\n      --talosconfig string          the path to the Talos configuration file, defaults to 'TALOSCONFIG' env variable if set, otherwise '$HOME/.talos/c\n"
          }
        ],
        "field": [
          {
            "id": "nodes",
            "label": "Nodes",
            "description": "Target nodes, comma separated or repeated.",
            "type": "string",
            "option": [
              "--nodes",
              "-n"
            ],
            "multiple": true,
            "sources": [
              "docs"
            ]
          },
          {
            "id": "endpoints",
            "label": "Endpoints",
            "description": "Override default endpoints in the Talos configuration.",
            "type": "string",
            "option": [
              "--endpoints",
              "-e"
            ],
            "multiple": true,
            "sources": [
              "docs"
            ]
          },
          {
            "id": "talosconfig",
            "label": "Talos config file",
            "type": "path",
            "option": [
              "--talosconfig"
            ],
            "path": {
              "kind": "file",
              "role": "input"
            },
            "sources": [
              "docs"
            ]
          },
          {
            "id": "local_path",
            "label": "Local path",
            "description": "Defaults to the current directory, or ~/.kube/config when merging.",
            "type": "path",
            "position": 0,
            "path": {
              "kind": "any",
              "role": "output"
            },
            "sources": [
              "docs"
            ]
          },
          {
            "id": "merge",
            "label": "Merge with existing kubeconfig",
            "type": "boolean",
            "option": [
              "--merge",
              "-m"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "force",
            "label": "Force overwrite",
            "type": "boolean",
            "option": [
              "--force",
              "-f"
            ],
            "effect": "overwrite",
            "sources": [
              "docs"
            ]
          }
        ],
        "task": [
          {
            "id": "kubeconfig",
            "label": "Download kubeconfig",
            "fields": [
              "local_path",
              "nodes",
              "merge",
              "force"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "local_path",
              "nodes",
              "merge",
              "force"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "endpoints",
              "talosconfig"
            ]
          }
        ]
      }
    ]
  }
}
