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

CommandDescription
: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
:schedulerOpen scheduler / task queue overlay
:bookmarksOpen bookmarks overlay
:reload  ·  :refreshForce refresh of the current list
:errors  ·  :warningsToggle 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  ·  COpen the session manager
:quit  ·  :q  ·  :q!Exit
:nyanToggle Nyan mode
:kubetrisPlay Kubetris
:creditsShow credits
:dashboardShow Cluster Dashboard
:monitoringShow 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>

OptionEffect
wrap / nowrapLine wrapping
linenumbers / nolinenumbersLine numbers
timestamps / notimestampsTimestamps
follow / nofollowAuto-scroll to tail
ansi / noansiRender ANSI SGR colors from log output
kyaml / nokyamlKYAML 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 overlay
  • j/k, Ctrl+D/Ctrl+U, g/G — scroll
  • Esc / q — close

Repeated completed tasks collapse with a ×N suffix.

:sessions

Session manager.

KeyAction
EnterSwitch to the session
sSave the current workspace as a new session
dDelete 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.

InputDestination
:pod / :pods / :poPods
:deploy / :deploymentsDeployments
:svc / :servicesServices
:ns / :namespacesNamespaces
:pvcPersistentVolumeClaims
:cm / :configmapsConfigMaps
:secret / :secretsSecrets
:node / :noNodes
:helm / :releasesHelm releases
:app / :argoappsArgoCD Applications

Any built-in kind, discovered CRD, or abbreviation from ~/.config/lfk/config.yamlsearch_abbreviations works. Add positional args to filter by namespace:

:pod kube-system
:svc default monitoring

See also