id = "kubectl-ai" name = "kubectl-ai" homepage = "https://github.com/GoogleCloudPlatform/kubectl-ai" description = "AI powered Kubernetes Assistant" executables = ["kubectl-ai"] [dotfiles] # Source: https://github.com/GoogleCloudPlatform/kubectl-ai#configuration — the # official README documents these persistent files under # ~/.config/kubectl-ai: the main settings file, custom tools file, and (from # v0.0.12) MCP client configuration. Custom paths supplied by flags are not # enumerable here. paths = [ "~/.config/kubectl-ai/config.yaml", "~/.config/kubectl-ai/tools.yaml", "~/.config/kubectl-ai/mcp.yaml", ] secret = [] # Source: https://github.com/GoogleCloudPlatform/kubectl-ai#mcp-client-configuration # — the official MCP example has an optional bearer token nested under each # server. API keys for model providers are documented as environment vars, # not persisted files. [[dotfiles.secret_paths]] file = "~/.config/kubectl-ai/mcp.yaml" format = "yaml" match = { key_path = ["servers.*.auth.token"] } [commands] format = 1 label = "Ask kubectl-ai" description = "Ask the AI assistant to work with a Kubernetes cluster, interactively or as a single quiet query. MCP server mode, sandbox, UI and auth options are left out." quality = "ai-draft" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = false, short_bundles = false } [[commands.source]] id = "src" kind = "help" url = "https://github.com/GoogleCloudPlatform/kubectl-ai/blob/main/cmd/main.go" revision = "main 2026-10" evidence = """ f.IntVar(&opt.MaxIterations, "max-iterations", opt.MaxIterations, "maximum number of iterations agent will try before giving up") f.StringVar(&opt.KubeConfigPath, "kubeconfig", opt.KubeConfigPath, "path to kubeconfig file") f.StringVar(&opt.ProviderID, "llm-provider", opt.ProviderID, "language model provider") f.StringVar(&opt.ModelID, "model", opt.ModelID, "language model e.g. gemini-2.0-flash-thinking-exp-01-21, gemini-2.0-flash") f.BoolVar(&opt.SkipPermissions, "skip-permissions", opt.SkipPermissions, "(dangerous) skip asking for confirmation before executing kubectl commands that modify resources") f.BoolVar(&opt.Quiet, "quiet", opt.Quiet, "run in non-interactive mode, requires a query to be provided as a positional argument") f.BoolVar(&opt.ShowToolOutput, "show-tool-output", opt.ShowToolOutput, "show tool output in the terminal UI") f.BoolVar(&opt.MCPClient, "mcp-client", opt.MCPClient, "enable MCP client mode to connect to external MCP servers") f.StringVar(&opt.ResumeSession, "resume-session", opt.ResumeSession, "ID of session to resume (use 'latest' for the most recent session)") kubectl-ai --quiet "fetch logs for nginx app in hello namespace" Long options: --quiet --llm-provider --model --kubeconfig --max-iterations --show-tool-output --mcp-client --resume-session --skip-permissions """ [[commands.field]] id = "query" label = "Query" description = "Leave empty for the interactive UI." type = "string" position = 0 multiple = true sources = ["src"] [[commands.field]] id = "quiet" label = "Non-interactive (requires a query)" type = "boolean" option = ["--quiet"] sources = ["src"] [[commands.field]] id = "provider" label = "LLM provider" type = "string" option = ["--llm-provider"] suggestions = [{ value = "gemini", label = "Gemini" }, { value = "openai", label = "OpenAI" }, { value = "ollama", label = "Ollama" }, { value = "bedrock", label = "Bedrock" }] sources = ["src"] [[commands.field]] id = "model" label = "Model" type = "string" option = ["--model"] sources = ["src"] [[commands.field]] id = "kubeconfig" label = "Kubeconfig" type = "path" path = { kind = "file", role = "input" } option = ["--kubeconfig"] sources = ["src"] [[commands.field]] id = "max_iterations" label = "Max iterations" type = "integer" option = ["--max-iterations"] sources = ["src"] [[commands.field]] id = "show_tool_output" label = "Show tool output" type = "boolean" option = ["--show-tool-output"] sources = ["src"] [[commands.field]] id = "mcp_client" label = "Use external MCP tools" type = "boolean" option = ["--mcp-client"] sources = ["src"] [[commands.field]] id = "resume_session" label = "Resume session ID" description = "Use latest for the most recent session." type = "string" option = ["--resume-session"] sources = ["src"] [[commands.field]] id = "skip_permissions" label = "Skip confirmations" description = "Dangerous: modifying kubectl commands run without asking." type = "boolean" option = ["--skip-permissions"] effect = "exec" sources = ["src"] [[commands.task]] id = "ask_once" label = "Ask once" fields = ["query", "quiet", "model"] required = ["query", "quiet"] set = { quiet = [true] } [[commands.task]] id = "interactive" label = "Interactive session" fields = ["provider", "model"] required = [] [[commands.group]] id = "basic" label = "Basic" fields = ["query", "quiet", "provider", "model"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["kubeconfig", "max_iterations", "show_tool_output", "mcp_client", "resume_session", "skip_permissions"]