Command Bar reference
September 8, 2026 · View on GitHub
Press : to open the command bar. Input is classified by the first word:
:!<cmd>— shell command (e.g.:! kubectl top nodes):ns,:ctx,:sort, … — built-in command:k,:kubectl,:get, … — kubectl command:pod,:svc, … — resource jump
Tab accepts the highlighted suggestion, Up/Down cycles, Enter runs.
Built-in commands
| Command | Description |
|---|---|
:namespace <ns>… · :ns <ns>… | Switch namespace(s). No args opens the Namespaces list |
:context <ctx> · :ctx <ctx> | Switch kube context |
:sort <column> | Sort the current list by column name |
:set <option> | Toggle log viewer option (see below) |
:export [yaml|json|kyaml] | Copy selected resource(s) to clipboard |
:scheduler | Open scheduler / task queue overlay |
:bookmarks | Open bookmarks overlay |
:reload · :refresh | Force refresh of the current list |
:errors · :warnings | Toggle warnings-only filter on the Events list |
:orphans [<kind>] | Open cluster-wide orphan resource overview |
:session save <name> | Save the current workspace (all tabs) as a named session |
:session delete <name> · :session rm <name> | Delete a named session |
:sessions · C | Open the session manager |
:quit · :q · :q! | Exit |
:nyan | Toggle Nyan mode |
:kubetris | Play Kubetris |
:credits | Show credits |
:dashboard | Show Cluster Dashboard |
:monitoring | Show Monitoring Dashboard |
:sort <column>
Column names match the table headers (case-sensitive): Name, Namespace, Age, Status, CPU, MEM, Ready, Restarts, etc. Tiebreaker uses Name → Namespace → Age, skipping whichever is primary.
:set <option>
| Option | Effect |
|---|---|
wrap / nowrap | Line wrapping |
linenumbers / nolinenumbers | Line numbers |
timestamps / notimestamps | Timestamps |
follow / nofollow | Auto-scroll to tail |
ansi / noansi | Render ANSI SGR colors from log output |
kyaml / nokyaml | KYAML rendering in the YAML viewer |
noansi replaces ESC bytes with U+FFFD (see log_viewer.render_ansi in config-reference.md).
:scheduler
Scheduler / task queue overlay. Inside:
Tab— toggle running / completed history`— also opens the overlayj/k,Ctrl+D/Ctrl+U,g/G— scrollEsc/q— close
Repeated completed tasks collapse with a ×N suffix.
:sessions
Session manager.
| Key | Action |
|---|---|
Enter | Switch to the session |
s | Save the current workspace as a new session |
d | Delete the session |
/ | Filter |
The active session auto-saves on quit. Start on a given session with lfk --session <name> or LFK_SESSION.
Shell commands
:! <cmd> runs sh -c <cmd> with KUBECONFIG and KUBECTL_CONTEXT pre-set.
:! kubectl top nodes
:! helm list -A
kubectl commands
:k <args> and :kubectl <args> run kubectl with --context and -n injected automatically. Top-level kubectl subcommands (:get, :describe, :logs, :exec, :apply, :edit, :patch, :scale, :rollout, :top, :port-forward, …) also work without the k prefix.
:k get pods -A
:kubectl logs -f deploy/web
:k describe pod nginx-abc
Autocomplete offers subcommands, flags, resource types, and namespaces. Typing :k or :kubectl alone surfaces the subcommand list. Value positions (namespace, resource name, output format) accept fuzzy matches — exact > prefix > substring > subsequence — while command names themselves stay on prefix.
Namespace suggestions come from a per-context cache warmed when the context is opened and refreshed on a 60s TTL. In-app mutations (:k create ns, :k delete ns, or a template apply) invalidate the cache immediately, so new namespaces appear in completions without waiting for the TTL. Changes made outside the TUI (CI, cloud console, kubectl in another shell) surface on the next refresh. The existing list stays visible during refreshes so completions never blank out.
Resource jumps
Type a resource name to navigate. Plural, singular, and kubectl abbreviations all work.
| Input | Destination |
|---|---|
:pod / :pods / :po | Pods |
:deploy / :deployments | Deployments |
:svc / :services | Services |
:ns / :namespaces | Namespaces |
:pvc | PersistentVolumeClaims |
:cm / :configmaps | ConfigMaps |
:secret / :secrets | Secrets |
:node / :no | Nodes |
:helm / :releases | Helm releases |
:app / :argoapps | ArgoCD Applications |
Any built-in kind, discovered CRD, or abbreviation from ~/.config/lfk/config.yaml → search_abbreviations works. Add positional args to filter by namespace:
:pod kube-system
:svc default monitoring
See also
- keybindings.md — all hotkeys
- config-reference.md — config file reference