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 }
[[commands.subcommand]]
path = ["apply-config"]
label = "Apply a machine config"
[[commands.subcommand.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]
-p, --config-patch stringArray the list of config patches to apply to the local config file before sending it to the node
--dry-run check how the config change will be applied in dry-run mode
-e, --endpoints strings override default endpoints in Talos configuration
-f, --file string the filename of the updated configuration
-m, --mode auto, no-reboot, staged, try apply config mode (default auto)
-n, --nodes strings target the specified nodes
--talosconfig string the path to the Talos configuration file, defaults to 'TALOSCONFIG' env variable if set, otherwise '$HOME/
"""
[[commands.subcommand.field]]
id = "nodes"
label = "Nodes"
description = "Target nodes, comma separated or repeated."
type = "string"
option = ["--nodes", "-n"]
multiple = true
sources = ["docs"]
[[commands.subcommand.field]]
id = "endpoints"
label = "Endpoints"
description = "Override default endpoints in the Talos configuration."
type = "string"
option = ["--endpoints", "-e"]
multiple = true
sources = ["docs"]
[[commands.subcommand.field]]
id = "talosconfig"
label = "Talos config file"
type = "path"
option = ["--talosconfig"]
path = { kind = "file", role = "input" }
sources = ["docs"]
[[commands.subcommand.field]]
id = "file"
label = "Config file"
type = "path"
option = ["--file", "-f"]
path = { kind = "file", role = "input" }
sources = ["docs"]
[[commands.subcommand.field]]
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"]
[[commands.subcommand.field]]
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"]
[[commands.subcommand.field]]
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"]
[[commands.subcommand.task]]
id = "dry_run"
label = "Dry-run a config"
set = { dry_run = [true] }
fields = ["file", "nodes", "mode", "dry_run", "config_patch"]
required = ["file", "nodes"]
[[commands.subcommand.task]]
id = "apply"
label = "Apply a config"
fields = ["file", "nodes", "mode", "config_patch"]
required = ["file", "nodes"]
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["file", "nodes", "mode", "dry_run", "config_patch"]
[[commands.subcommand.group]]
id = "advanced"
label = "Advanced"
fields = ["endpoints", "talosconfig"]
[[commands.subcommand]]
path = ["get"]
label = "Get resources"
[[commands.subcommand.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]
-e, --endpoints strings override default endpoints in Talos configuration
--namespace string resource namespace (default is to use default namespace per resource)
-n, --nodes strings target the specified nodes
-o, --output string output mode (json, table, yaml, jsonpath) (default "table")
--talosconfig string the path to the Talos configuration file, defaults to 'TALOSCONFIG' env variable if set, otherwise '$HOME/.talos/co
-w, --watch watch resource changes
"""
[[commands.subcommand.field]]
id = "nodes"
label = "Nodes"
description = "Target nodes, comma separated or repeated."
type = "string"
option = ["--nodes", "-n"]
multiple = true
sources = ["docs"]
[[commands.subcommand.field]]
id = "endpoints"
label = "Endpoints"
description = "Override default endpoints in the Talos configuration."
type = "string"
option = ["--endpoints", "-e"]
multiple = true
sources = ["docs"]
[[commands.subcommand.field]]
id = "talosconfig"
label = "Talos config file"
type = "path"
option = ["--talosconfig"]
path = { kind = "file", role = "input" }
sources = ["docs"]
[[commands.subcommand.field]]
id = "type"
label = "Resource type"
description = "Resource type; run `talosctl get rd` to list all types."
type = "string"
position = 0
sources = ["docs"]
[[commands.subcommand.field]]
id = "resource_id"
label = "Resource ID"
type = "string"
position = 1
sources = ["docs"]
[[commands.subcommand.field]]
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"]
[[commands.subcommand.field]]
id = "watch"
label = "Watch changes"
type = "boolean"
option = ["--watch", "-w"]
sources = ["docs"]
[[commands.subcommand.field]]
id = "namespace"
label = "Namespace"
type = "string"
option = ["--namespace"]
sources = ["docs"]
[[commands.subcommand.task]]
id = "get"
label = "Get a resource type"
fields = ["type", "resource_id", "nodes", "output"]
required = ["type"]
[[commands.subcommand.task]]
id = "watch"
label = "Watch a resource type"
set = { watch = [true] }
fields = ["type", "resource_id", "nodes", "watch"]
required = ["type"]
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["type", "resource_id", "nodes", "output", "watch"]
[[commands.subcommand.group]]
id = "advanced"
label = "Advanced"
fields = ["namespace", "endpoints", "talosconfig"]
[[commands.subcommand]]
path = ["logs"]
label = "Read logs"
[[commands.subcommand.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]
-e, --endpoints strings override default endpoints in Talos configuration
-f, --follow specify if the logs should be streamed
--kind string log source kind: container, vm, or service (default: legacy routing)
--namespace string namespace to use: "system" (default, Talos service containers), "cri" for Kubernetes workloads, "taloscontainers" f
-n, --nodes strings target the specified nodes
--tail int32 lines of log file to display (default is to show from the beginning) (default -1)
--talosconfig string the path to the Talos configuration file, defaults to 'TALOSCONFIG' env variable if set, otherwise '$HOME/.talos/co
"""
[[commands.subcommand.field]]
id = "nodes"
label = "Nodes"
description = "Target nodes, comma separated or repeated."
type = "string"
option = ["--nodes", "-n"]
multiple = true
sources = ["docs"]
[[commands.subcommand.field]]
id = "endpoints"
label = "Endpoints"
description = "Override default endpoints in the Talos configuration."
type = "string"
option = ["--endpoints", "-e"]
multiple = true
sources = ["docs"]
[[commands.subcommand.field]]
id = "talosconfig"
label = "Talos config file"
type = "path"
option = ["--talosconfig"]
path = { kind = "file", role = "input" }
sources = ["docs"]
[[commands.subcommand.field]]
id = "name"
label = "Service or container"
type = "string"
position = 0
sources = ["docs"]
[[commands.subcommand.field]]
id = "follow"
label = "Follow"
type = "boolean"
option = ["--follow", "-f"]
sources = ["docs"]
[[commands.subcommand.field]]
id = "tail"
label = "Tail lines"
type = "integer"
option = ["--tail"]
sources = ["docs"]
[[commands.subcommand.field]]
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"]
[[commands.subcommand.field]]
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"]
[[commands.subcommand.task]]
id = "follow"
label = "Follow a service log"
set = { follow = [true] }
fields = ["name", "nodes", "follow", "tail"]
required = ["name"]
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["name", "nodes", "follow", "tail"]
[[commands.subcommand.group]]
id = "advanced"
label = "Advanced"
fields = ["kind", "namespace", "endpoints", "talosconfig"]
[[commands.subcommand]]
path = ["kubeconfig"]
label = "Fetch the admin kubeconfig"
[[commands.subcommand.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]
-e, --endpoints strings override default endpoints in Talos configuration
-f, --force Force overwrite of kubeconfig if already present, force overwrite on kubeconfig merge
--force-context-name string Force context name for kubeconfig merge
-m, --merge Merge with existing kubeconfig (default true)
-n, --nodes strings target the specified nodes
--talosconfig string the path to the Talos configuration file, defaults to 'TALOSCONFIG' env variable if set, otherwise '$HOME/.talos/c
"""
[[commands.subcommand.field]]
id = "nodes"
label = "Nodes"
description = "Target nodes, comma separated or repeated."
type = "string"
option = ["--nodes", "-n"]
multiple = true
sources = ["docs"]
[[commands.subcommand.field]]
id = "endpoints"
label = "Endpoints"
description = "Override default endpoints in the Talos configuration."
type = "string"
option = ["--endpoints", "-e"]
multiple = true
sources = ["docs"]
[[commands.subcommand.field]]
id = "talosconfig"
label = "Talos config file"
type = "path"
option = ["--talosconfig"]
path = { kind = "file", role = "input" }
sources = ["docs"]
[[commands.subcommand.field]]
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"]
[[commands.subcommand.field]]
id = "merge"
label = "Merge with existing kubeconfig"
type = "boolean"
option = ["--merge", "-m"]
sources = ["docs"]
[[commands.subcommand.field]]
id = "force"
label = "Force overwrite"
type = "boolean"
option = ["--force", "-f"]
effect = "overwrite"
sources = ["docs"]
[[commands.subcommand.task]]
id = "kubeconfig"
label = "Download kubeconfig"
fields = ["local_path", "nodes", "merge", "force"]
required = []
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["local_path", "nodes", "merge", "force"]
[[commands.subcommand.group]]
id = "advanced"
label = "Advanced"
fields = ["endpoints", "talosconfig"]