id = "k9s" name = "K9s" homepage = "https://k9scli.io" description = "K9s is a terminal based UI to interact with your Kubernetes clusters." # The project's own mark, from its homepage. icon = "https://k9scli.io/assets/k9s.png" executables = ["k9s"] [dotfiles] # https://k9scli.io/topics/config/ — k9s "leverages XDG to keep its # configuration files under $XDG_CONFIG_HOME/k9s", which the page spells out as # ~/.config/k9s on Linux, ~/Library/Application Support/k9s on macOS and # %LOCALAPPDATA%\k9s on Windows. internal/config/files.go resolves it through # github.com/adrg/xdg and puts config.yaml, hotkeys.yaml, aliases.yaml, # plugins.yaml, views.yaml, jumps.yaml and skins/ in that one directory. paths = [ "~/.config/k9s/", "~/Library/Application Support/k9s/", "%LOCALAPPDATA%/k9s/", ] # Nothing to carve out at these paths: the same file puts screen dumps and # benchmark results under the XDG *state* dir and per-context state under the # XDG *data* dir, both outside the config directory. They land inside it only # when K9S_CONFIG_DIR redirects k9s somewhere this catalog does not name. # Cluster credentials belong to the kubeconfig, which is kubectl's entry. k9s # stores none of its own. secret = [] # screenDumpDir is an absolute path into this machine's disk, written only when # the user overrides the default location. Named in all three spellings, since # a consumer matches whichever one it resolved here. It is there because the # user typed it, so it is kept for restoring this machine — but it names a # directory that exists here only, so it is never applied to another. [[dotfiles.machine_lines]] file = [ "~/.config/k9s/config.yaml", "~/Library/Application Support/k9s/config.yaml", "%LOCALAPPDATA%/k9s/config.yaml", ] match = { key_path = ["k9s.screenDumpDir"] } scope = "backup" [commands] format = 1 label = "Open K9s" description = "Launch the K9s cluster UI with context, namespace and mode options. Auth and TLS options are left out." quality = "ai-draft" base = "fig:k9s" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/k9s.ts" license = "MIT" [[commands.field]] id = "context" label = "Kube context" type = "string" option = ["--context"] sources = ["fig"] [[commands.field]] id = "namespace" label = "Namespace" type = "string" option = ["-n", "--namespace"] sources = ["fig"] [[commands.field]] id = "all_namespaces" label = "All namespaces" type = "boolean" option = ["-A", "--all-namespaces"] sources = ["fig"] [[commands.field]] id = "command" label = "Start resource" description = "Resource view to load at launch, for example pods or deploy." type = "string" option = ["-c", "--command"] suggestions = [{ value = "pods", label = "Pods" }, { value = "deployments", label = "Deployments" }, { value = "services", label = "Services" }] sources = ["fig"] [[commands.field]] id = "kubeconfig" label = "Kubeconfig file" type = "path" option = ["--kubeconfig"] path = { kind = "file", role = "input" } sources = ["fig"] [[commands.field]] id = "readonly" label = "Read-only mode" type = "boolean" option = ["--readonly"] sources = ["fig"] [[commands.field]] id = "write" label = "Write mode" type = "boolean" option = ["--write"] sources = ["fig"] [[commands.field]] id = "headless" label = "Hide header" type = "boolean" option = ["--headless"] sources = ["fig"] [[commands.field]] id = "refresh" label = "Refresh rate (seconds)" type = "integer" option = ["-r", "--refresh"] sources = ["fig"] [[commands.field]] id = "log_level" label = "Log level" type = "string" option = ["-l", "--logLevel"] suggestions = [{ value = "info", label = "info" }, { value = "warn", label = "warn" }, { value = "debug", label = "debug" }, { value = "trace", label = "trace" }, { value = "error", label = "error" }] sources = ["fig"] [[commands.task]] id = "open" label = "Open in a namespace" fields = ["context", "namespace", "command"] [[commands.task]] id = "safe" label = "Open read-only" set = { readonly = [true] } fields = ["readonly", "context", "namespace", "all_namespaces"] [[commands.group]] id = "basic" label = "Basic" fields = ["context", "namespace", "all_namespaces", "command", "readonly"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["kubeconfig", "write", "headless", "refresh", "log_level"]