# lfk

lfk (Lightning Fast Kubernetes navigator) is a Bubbletea-based TUI for Kubernetes that swaps the single-list k9s model for a yazi-inspired three-column Miller view. The left column is the parent level, the middle is the current selection, the right is a YAML or details preview — navigation walks down a single hierarchy: Cluster → Resource Type (grouped) → Resource → Owned Resources → Containers. Namespaces are not a navigation level; they live in a top-right indicator and switch via `\`.

Listed on [[toolbox/watchlist]] — six-week-old repo (created 2026-03-15), single author (janosmiko), pre-1.0 (v0.9.30 at time of ingest), 320 stars, but pushing 30 releases in six weeks and active CI with SonarCloud + codecov. The shape is mature; the version number is not.

## What's actually different from k9s

The flagship feature is **owner-based navigation**. Selecting a Deployment shows its Pods (resolved through ReplicaSets, flattened); a CronJob shows its Jobs; a Service shows Pods matching its selector; an ArgoCD Application shows its managed resources (status- or label-derived); a Helm release shows resources via the `app.kubernetes.io/instance` label. You don't list "all pods then filter by owner" — you walk into the owner. `o` jumps the other way, from a resource to its controller.

Resource types are grouped semantically: Workloads, Networking, Config, Storage, ArgoCD, Helm, Access Control, Cluster, Custom Resources, plus Dashboards. CRDs are auto-grouped by API group (`argoproj.io`, `longhorn.io`, `networking.istio.io`); pin frequently used groups with `p` (per-context). Rarely used types (CSI internals, admission webhooks, APF, leases, runtime classes) are hidden by default and surface under "Advanced" with `H`.

## What's built in vs what shells out

Only `kubectl` is a hard dependency. Optional: `helm` for release management, `trivy` for image vulnerability scans. Everything else — KEDA pause/unpause, External Secrets force-refresh, Argo Workflows submit/suspend/stop/resubmit, ArgoCD sync/terminate/refresh, cert-manager, FluxCD, PVC resize — talks to the Kubernetes API directly. No per-tool CLI.

Embedded PTY for exec/shell stays running when you switch tabs (this is rare in TUI tools — most kill the PTY on tab switch). Inline log viewer streams across init-container transitions, staying attached as each finishes and the next starts.

## The Secret problem and lazy loading

In a cluster with many Helm releases or large TLS secrets, listing the Secrets resource type can transfer tens of megabytes because k8s returns full bodies in a list call. `secret_lazy_loading: true` in config switches to metadata-only listing, deferring decoded values to hover (cached after first fetch). Trade-off: the Type column drops from the list because the metadata-only fetch doesn't populate it. This is a real operational concern — the kind of thing you only hit once you've used the tool against a real cluster.

## Theming surface

460+ ghostty color schemes ship in (Tokyonight, Catppuccin, Dracula, Nord, Rose Pine, Gruvbox, …). `T` opens a live picker. Auto OS dark/light switching uses CSI 996/2031, supported in Ghostty, kitty ≥0.27, Contour — `colorscheme: "dark:catppuccin-mocha,light:catppuccin-latte"` and the app flips when the system appearance changes. Transparent background is a checkbox. Compare against k9s's "edit a YAML file and restart."

Icon mode is `auto` by default with explicit fallback to `unicode` / `nerdfont` (Material Design Icons) / `simple` (ASCII labels) / `emoji` / `none`. Override with `LFK_ICONS` env var.

## Command bar surface

`:` opens a command bar with vertical-dropdown autocomplete. Four overlapping syntaxes:

- Resource jumps: `:pod`, `:dep`, `:pvc` — fuzzy-matchable abbreviations, configurable
- Built-ins: `:ns`, `:ctx`, `:set`, `:sort`, `:export`
- kubectl passthrough: `:k get pod` or `:kubectl ...` with flag/namespace completion
- Shell: `:! cmd`

Search and filter share three modes auto-detected from the input: substring, regex (auto-detected), fuzzy (`~` prefix), literal (`\` prefix). Multi-select with `Space`, range-select with `Ctrl+Space`, bulk delete/scale/restart and ArgoCD bulk sync/refresh from the action menu.

## Configuration

`~/.config/lfk/config.yaml`. Override via `-c /path/to/config.yaml`. CLI flags: `--context`, `-n` (repeatable for multi-namespace), `--kubeconfig`, `--no-mouse`, `--no-color` (also respects `NO_COLOR=1`), `--watch-interval` (Go durations, clamped to `[500ms, 10m]`).

Merged kubeconfig loading: reads `~/.kube/config`, every file in `~/.kube/config.d/*` recursively (symlinks followed), and the `KUBECONFIG` env var. Last-context/namespace/resource is persisted across restarts; explicit `--context` / `-n` flags ignore the saved session.

Custom user-defined actions are first-class — define shell commands per resource type in config and they show up in the action menu (`x`).

## Install

```sh
brew install janosmiko/tap/lfk           # macOS / Linux Homebrew
nix profile install github:janosmiko/lfk # Nix flake (requires flakes)
go install github.com/janosmiko/lfk@latest
```

A nightly tap (`janosmiko/tap/lfk-nightly`) and `janosmiko/lfk:nightly[-YYYYMMDD]` Docker tags track main. Docker usage needs `-v ~/.kube:/home/lfk/.kube:ro` and `--net=host` for port-forwards to work.

## Status and re-check signals (next: 2026-07-26)

- Created: 2026-03-15 (~6 weeks old at ingest)
- Stars: 320
- Releases: 30 in six weeks (last v0.9.30, 2026-04-27)
- Open issues: 3
- Single author, Apache-2.0
- README says nothing about being alpha; SonarCloud security rating + codecov + Go Report Card all wired into CI

Re-check signals at 2026-07-26: did v1.0 ship? Did the release cadence stay ≥monthly? Any second meaningful contributor besides janosmiko? Did anyone write a serious comparison vs k9s? Did secret lazy loading and ArgoCD bulk operations attract real-world bug reports (a sign people are using it on big clusters)? Has the test/lint surface stayed green in CI or rotted?

**Repo:** https://github.com/janosmiko/lfk — 320 stars, Apache-2.0.
