Skip to content

kubectl, indexed.

Run kx get <resource> once and every row gets a number. From then on you reference resources by that number instead of typing names — kx logs 2, kx delete 2 5, kx exec 1

> kx get pods -n diagnostics
Pods · diagnostics · 14 items
   X    NAME                                     READY    STATUS              RESTARTS           AGE
   1    api-badimage-b97d844fd-s75rr             0/1      ImagePullBackOff       0               28d
   2    billing-flaky-b7878b475-dm9sk            1/1      Running               15 (13h ago)     28d
   3    cache-oom-cc849dbdb-2qdkw                0/1      CrashLoopBackOff    2524 (100s ago)    28d
   4    frontend-notready-7fc649587b-r4fh4       0/1      Running                4 (13h ago)     28d

> kx logs 2 --tail=3
Pod/billing-flaky-b7878b475-dm9sk · diagnostics
stable after 16 boots

> kx labels 2
Pod/billing-flaky-b7878b475-dm9sk · diagnostics · 2 items
  LABEL                VALUE        
  app                  billing-flaky
  pod-template-hash    b7878b475    
> kx get pods -n diagnostics
Pods · diagnostics · 14 items
   X    NAME                                     READY    STATUS              RESTARTS           AGE
   1    api-badimage-b97d844fd-s75rr             0/1      ImagePullBackOff       0               28d
   2    billing-flaky-b7878b475-dm9sk            1/1      Running               15 (13h ago)     28d
   3    cache-oom-cc849dbdb-2qdkw                0/1      CrashLoopBackOff    2524 (100s ago)    28d
   4    frontend-notready-7fc649587b-r4fh4       0/1      Running                4 (13h ago)     28d

> kx logs 2 --tail=3
Pod/billing-flaky-b7878b475-dm9sk · diagnostics
stable after 16 boots

> kx labels 2
Pod/billing-flaky-b7878b475-dm9sk · diagnostics · 2 items
  LABEL                VALUE        
  app                  billing-flaky
  pod-template-hash    b7878b475    
> kx get pods -n diagnostics
Pods · diagnostics · 14 items
   X    NAME                                     READY    STATUS              RESTARTS           AGE
   1    api-badimage-b97d844fd-s75rr             0/1      ImagePullBackOff       0               28d
   2    billing-flaky-b7878b475-dm9sk            1/1      Running               15 (13h ago)     28d
   3    cache-oom-cc849dbdb-2qdkw                0/1      CrashLoopBackOff    2524 (100s ago)    28d
   4    frontend-notready-7fc649587b-r4fh4       0/1      Running                4 (13h ago)     28d

> kx logs 2 --tail=3
Pod/billing-flaky-b7878b475-dm9sk · diagnostics
stable after 16 boots

> kx labels 2
Pod/billing-flaky-b7878b475-dm9sk · diagnostics · 2 items
  LABEL                VALUE        
  app                  billing-flaky
  pod-template-hash    b7878b475    
> kx get pods -n diagnostics
Pods · diagnostics · 14 items
   X    NAME                                     READY    STATUS              RESTARTS            AGE
   1    api-badimage-b97d844fd-s75rr             0/1      ImagePullBackOff       0                28d
   2    billing-flaky-b7878b475-dm9sk            1/1      Running               15 (13h ago)      28d
   3    cache-oom-cc849dbdb-2qdkw                0/1      CrashLoopBackOff    2524 (101s ago)     28d
   4    frontend-notready-7fc649587b-r4fh4       0/1      Running                4 (13h ago)      28d

> kx logs 2 --tail=3
Pod/billing-flaky-b7878b475-dm9sk · diagnostics
stable after 16 boots

> kx labels 2
Pod/billing-flaky-b7878b475-dm9sk · diagnostics · 2 items
  LABEL                VALUE        
  app                  billing-flaky
  pod-template-hash    b7878b475    
> kx get pods -n diagnostics
Pods · diagnostics · 14 items
   X    NAME                                     READY    STATUS              RESTARTS            AGE
   1    api-badimage-b97d844fd-s75rr             0/1      ImagePullBackOff       0                28d
   2    billing-flaky-b7878b475-dm9sk            1/1      Running               15 (13h ago)      28d
   3    cache-oom-cc849dbdb-2qdkw                0/1      CrashLoopBackOff    2524 (101s ago)     28d
   4    frontend-notready-7fc649587b-r4fh4       0/1      Running                4 (13h ago)      28d

> kx logs 2 --tail=3
Pod/billing-flaky-b7878b475-dm9sk · diagnostics
stable after 16 boots

> kx labels 2
Pod/billing-flaky-b7878b475-dm9sk · diagnostics · 2 items
  LABEL                VALUE        
  app                  billing-flaky
  pod-template-hash    b7878b475    
> kx get pods -n diagnostics
Pods · diagnostics · 14 items
   X    NAME                                     READY    STATUS              RESTARTS            AGE
   1    api-badimage-b97d844fd-s75rr             0/1      ImagePullBackOff       0                28d
   2    billing-flaky-b7878b475-dm9sk            1/1      Running               15 (13h ago)      28d
   3    cache-oom-cc849dbdb-2qdkw                0/1      CrashLoopBackOff    2524 (102s ago)     28d
   4    frontend-notready-7fc649587b-r4fh4       0/1      Running                4 (13h ago)      28d

> kx logs 2 --tail=3
Pod/billing-flaky-b7878b475-dm9sk · diagnostics
stable after 16 boots

> kx labels 2
Pod/billing-flaky-b7878b475-dm9sk · diagnostics · 2 items
  LABEL                VALUE        
  app                  billing-flaky
  pod-template-hash    b7878b475    
> kx get pods -n diagnostics
Pods · diagnostics · 14 items
   X    NAME                                     READY    STATUS              RESTARTS            AGE
   1    api-badimage-b97d844fd-s75rr             0/1      ImagePullBackOff       0                28d
   2    billing-flaky-b7878b475-dm9sk            1/1      Running               15 (13h ago)      28d
   3    cache-oom-cc849dbdb-2qdkw                0/1      CrashLoopBackOff    2524 (102s ago)     28d
   4    frontend-notready-7fc649587b-r4fh4       0/1      Running                4 (13h ago)      28d

> kx logs 2 --tail=3
Pod/billing-flaky-b7878b475-dm9sk · diagnostics
stable after 16 boots

> kx labels 2
Pod/billing-flaky-b7878b475-dm9sk · diagnostics · 2 items
  LABEL                VALUE        
  app                  billing-flaky
  pod-template-hash    b7878b475    
> kx get pods -n diagnostics
Pods · diagnostics · 14 items
   X    NAME                                     READY    STATUS              RESTARTS            AGE
   1    api-badimage-b97d844fd-s75rr             0/1      ImagePullBackOff       0                28d
   2    billing-flaky-b7878b475-dm9sk            1/1      Running               15 (13h ago)      28d
   3    cache-oom-cc849dbdb-2qdkw                0/1      CrashLoopBackOff    2524 (102s ago)     28d
   4    frontend-notready-7fc649587b-r4fh4       0/1      Running                4 (13h ago)      28d

> kx logs 2 --tail=3
Pod/billing-flaky-b7878b475-dm9sk · diagnostics
stable after 16 boots

> kx labels 2
Pod/billing-flaky-b7878b475-dm9sk · diagnostics · 2 items
  LABEL                VALUE        
  app                  billing-flaky
  pod-template-hash    b7878b475    
> kx get pods -n diagnostics
Pods · diagnostics · 14 items
   X    NAME                                     READY    STATUS              RESTARTS            AGE
   1    api-badimage-b97d844fd-s75rr             0/1      ImagePullBackOff       0                28d
   2    billing-flaky-b7878b475-dm9sk            1/1      Running               15 (13h ago)      28d
   3    cache-oom-cc849dbdb-2qdkw                0/1      CrashLoopBackOff    2524 (103s ago)     28d
   4    frontend-notready-7fc649587b-r4fh4       0/1      Running                4 (13h ago)      28d

> kx logs 2 --tail=3
Pod/billing-flaky-b7878b475-dm9sk · diagnostics
stable after 16 boots

> kx labels 2
Pod/billing-flaky-b7878b475-dm9sk · diagnostics · 2 items
  LABEL                VALUE        
  app                  billing-flaky
  pod-template-hash    b7878b475    
> kx get pods -n diagnostics
Pods · diagnostics · 14 items
   X    NAME                                     READY    STATUS              RESTARTS            AGE
   1    api-badimage-b97d844fd-s75rr             0/1      ImagePullBackOff       0                28d
   2    billing-flaky-b7878b475-dm9sk            1/1      Running               15 (13h ago)      28d
   3    cache-oom-cc849dbdb-2qdkw                0/1      CrashLoopBackOff    2524 (103s ago)     28d
   4    frontend-notready-7fc649587b-r4fh4       0/1      Running                4 (13h ago)      28d

> kx logs 2 --tail=3
Pod/billing-flaky-b7878b475-dm9sk · diagnostics
stable after 16 boots

> kx labels 2
Pod/billing-flaky-b7878b475-dm9sk · diagnostics · 2 items
  LABEL                VALUE        
  app                  billing-flaky
  pod-template-hash    b7878b475    

Install

Requires kubectl on your PATH. Every path below delivers the same prebuilt binary — no Python runtime, no dependencies.

uv
uv tool install kx-cli
pipx
pipx install kx-cli
krew
kubectl krew install idx
alias kx="kubectl idx"
Try it without installing
uvx --from kx-cli kx get pods

One listing, every command

Indexes come from the last listing and stay put. Several at once, a range, or a range left open — kx delete 1 2..4 5..

Pods · diagnostics · 14 items
   X    NAME                                     READY    STATUS              RESTARTS           AGE
   1    api-badimage-b97d844fd-s75rr             0/1      ImagePullBackOff       0               28d
   2    billing-flaky-b7878b475-dm9sk            1/1      Running               15 (13h ago)     28d
   3    cache-oom-cc849dbdb-2qdkw                0/1      CrashLoopBackOff    2524 (98s ago)     28d
   4    frontend-notready-7fc649587b-r4fh4       0/1      Running                4 (13h ago)     28d
   5    frontend-notready-7fc649587b-zvtb5       0/1      Running                4 (13h ago)     28d
   6    memory-pressure                          1/1      Running                2 (13h ago)     22d
   7    migration-backofflimit-qwhdn             0/1      Error                  0               22d
Pods · diagnostics · 14 items
   X    NAME                                     READY    STATUS              RESTARTS           AGE
   1    api-badimage-b97d844fd-s75rr             0/1      ImagePullBackOff       0               28d
   2    billing-flaky-b7878b475-dm9sk            1/1      Running               15 (13h ago)     28d
   3    cache-oom-cc849dbdb-2qdkw                0/1      CrashLoopBackOff    2524 (99s ago)     28d
   4    frontend-notready-7fc649587b-r4fh4       0/1      Running                4 (13h ago)     28d
   5    frontend-notready-7fc649587b-zvtb5       0/1      Running                4 (13h ago)     28d
   6    memory-pressure                          1/1      Running                2 (13h ago)     22d
   7    migration-backofflimit-qwhdn             0/1      Error                  0               22d
Pods · diagnostics · 14 items
   X    NAME                                     READY    STATUS              RESTARTS           AGE
   1    api-badimage-b97d844fd-s75rr             0/1      ImagePullBackOff       0               28d
   2    billing-flaky-b7878b475-dm9sk            1/1      Running               15 (13h ago)     28d
   3    cache-oom-cc849dbdb-2qdkw                0/1      CrashLoopBackOff    2524 (99s ago)     28d
   4    frontend-notready-7fc649587b-r4fh4       0/1      Running                4 (13h ago)     28d
   5    frontend-notready-7fc649587b-zvtb5       0/1      Running                4 (13h ago)     28d
   6    memory-pressure                          1/1      Running                2 (13h ago)     22d
   7    migration-backofflimit-qwhdn             0/1      Error                  0               22d
Pods · diagnostics · 14 items
   X    NAME                                     READY    STATUS              RESTARTS           AGE
   1    api-badimage-b97d844fd-s75rr             0/1      ImagePullBackOff       0               28d
   2    billing-flaky-b7878b475-dm9sk            1/1      Running               15 (13h ago)     28d
   3    cache-oom-cc849dbdb-2qdkw                0/1      CrashLoopBackOff    2524 (99s ago)     28d
   4    frontend-notready-7fc649587b-r4fh4       0/1      Running                4 (13h ago)     28d
   5    frontend-notready-7fc649587b-zvtb5       0/1      Running                4 (13h ago)     28d
   6    memory-pressure                          1/1      Running                2 (13h ago)     22d
   7    migration-backofflimit-qwhdn             0/1      Error                  0               22d
Pods · diagnostics · 14 items
   X    NAME                                     READY    STATUS              RESTARTS           AGE
   1    api-badimage-b97d844fd-s75rr             0/1      ImagePullBackOff       0               28d
   2    billing-flaky-b7878b475-dm9sk            1/1      Running               15 (13h ago)     28d
   3    cache-oom-cc849dbdb-2qdkw                0/1      CrashLoopBackOff    2524 (99s ago)     28d
   4    frontend-notready-7fc649587b-r4fh4       0/1      Running                4 (13h ago)     28d
   5    frontend-notready-7fc649587b-zvtb5       0/1      Running                4 (13h ago)     28d
   6    memory-pressure                          1/1      Running                2 (13h ago)     22d
   7    migration-backofflimit-qwhdn             0/1      Error                  0               22d
Pods · diagnostics · 14 items
   X    NAME                                     READY    STATUS              RESTARTS           AGE
   1    api-badimage-b97d844fd-s75rr             0/1      ImagePullBackOff       0               28d
   2    billing-flaky-b7878b475-dm9sk            1/1      Running               15 (13h ago)     28d
   3    cache-oom-cc849dbdb-2qdkw                0/1      CrashLoopBackOff    2524 (99s ago)     28d
   4    frontend-notready-7fc649587b-r4fh4       0/1      Running                4 (13h ago)     28d
   5    frontend-notready-7fc649587b-zvtb5       0/1      Running                4 (13h ago)     28d
   6    memory-pressure                          1/1      Running                2 (13h ago)     22d
   7    migration-backofflimit-qwhdn             0/1      Error                  0               22d
Pods · diagnostics · 14 items
   X    NAME                                     READY    STATUS              RESTARTS           AGE
   1    api-badimage-b97d844fd-s75rr             0/1      ImagePullBackOff       0               28d
   2    billing-flaky-b7878b475-dm9sk            1/1      Running               15 (13h ago)     28d
   3    cache-oom-cc849dbdb-2qdkw                0/1      CrashLoopBackOff    2524 (99s ago)     28d
   4    frontend-notready-7fc649587b-r4fh4       0/1      Running                4 (13h ago)     28d
   5    frontend-notready-7fc649587b-zvtb5       0/1      Running                4 (13h ago)     28d
   6    memory-pressure                          1/1      Running                2 (13h ago)     22d
   7    migration-backofflimit-qwhdn             0/1      Error                  0               22d
Pods · diagnostics · 14 items
   X    NAME                                     READY    STATUS              RESTARTS           AGE
   1    api-badimage-b97d844fd-s75rr             0/1      ImagePullBackOff       0               28d
   2    billing-flaky-b7878b475-dm9sk            1/1      Running               15 (13h ago)     28d
   3    cache-oom-cc849dbdb-2qdkw                0/1      CrashLoopBackOff    2524 (99s ago)     28d
   4    frontend-notready-7fc649587b-r4fh4       0/1      Running                4 (13h ago)     28d
   5    frontend-notready-7fc649587b-zvtb5       0/1      Running                4 (13h ago)     28d
   6    memory-pressure                          1/1      Running                2 (13h ago)     22d
   7    migration-backofflimit-qwhdn             0/1      Error                  0               22d
Pods · diagnostics · 14 items
   X    NAME                                     READY    STATUS              RESTARTS           AGE
   1    api-badimage-b97d844fd-s75rr             0/1      ImagePullBackOff       0               28d
   2    billing-flaky-b7878b475-dm9sk            1/1      Running               15 (13h ago)     28d
   3    cache-oom-cc849dbdb-2qdkw                0/1      CrashLoopBackOff    2524 (99s ago)     28d
   4    frontend-notready-7fc649587b-r4fh4       0/1      Running                4 (13h ago)     28d
   5    frontend-notready-7fc649587b-zvtb5       0/1      Running                4 (13h ago)     28d
   6    memory-pressure                          1/1      Running                2 (13h ago)     22d
   7    migration-backofflimit-qwhdn             0/1      Error                  0               22d
Pods · diagnostics · 14 items
   X    NAME                                     READY    STATUS              RESTARTS           AGE
   1    api-badimage-b97d844fd-s75rr             0/1      ImagePullBackOff       0               28d
   2    billing-flaky-b7878b475-dm9sk            1/1      Running               15 (13h ago)     28d
   3    cache-oom-cc849dbdb-2qdkw                0/1      CrashLoopBackOff    2524 (99s ago)     28d
   4    frontend-notready-7fc649587b-r4fh4       0/1      Running                4 (13h ago)     28d
   5    frontend-notready-7fc649587b-zvtb5       0/1      Running                4 (13h ago)     28d
   6    memory-pressure                          1/1      Running                2 (13h ago)     22d
   7    migration-backofflimit-qwhdn             0/1      Error                  0               22d

More than a shorter kubectl

Each of these has a guide in the documentation.

Triage a namespace

kx diag sweeps every workload and ranks what is unhealthy — CrashLoopBackOff, image pull failures, OOMKill risk read from live usage, stalled rollouts, Services with no endpoints. The rows are indexed, so you drill straight in.

Scan images for CVEs

kx scan resolves a workload's unique images and scans each one, printing a severity summary. Docker Scout by default, Trivy or Grype with --engine

Read a Secret in plaintext

kx secret 1 --decode prints keys and values decoded, with binary payloads shown as a placeholder rather than garbling the table. -k prints one value raw, straight into a shell.

Ownership, as a tree

kx tree walks ownership references from controllers down to containers — the structure kubectl's table output cannot show. Indexed like every other listing.

Reports in the browser

--html on diag, scan, tree and top renders the same analysis as a filterable page and opens it. Bound to localhost, nothing written to disk, no extra API calls.

Completion that knows your listing

kx describe <TAB> offers 1 api-7d8f (Pod), not a bare number. Answered from saved state, so it never waits on the cluster.

In your colors

kx theme restyles the terminal, the HTML reports — and this page. Same palettes, one registry. Pick one:

Browser reports

--html renders the same analysis as a page and opens it. Sweep rows expand into a resource's full report; image rows expand into the CVEs behind their counts. Bound to localhost, nothing written to disk.

kx diag --html dashboard in the github-dark theme kx diag --html dashboard in the dracula theme kx diag --html dashboard in the nord theme kx diag --html dashboard in the gruvbox theme kx diag --html dashboard in the solarized-dark theme kx diag --html dashboard in the catppuccin-mocha theme kx diag --html dashboard in the tokyo-night theme kx diag --html dashboard in the rose-pine theme kx diag --html dashboard in the mono theme kx diag --html dashboard in the light theme

kx scan --html

Per-image severity counts, with the CVE table grouped by image below.

kx scan --html dashboard in the github-dark theme kx scan --html dashboard in the dracula theme kx scan --html dashboard in the nord theme kx scan --html dashboard in the gruvbox theme kx scan --html dashboard in the solarized-dark theme kx scan --html dashboard in the catppuccin-mocha theme kx scan --html dashboard in the tokyo-night theme kx scan --html dashboard in the rose-pine theme kx scan --html dashboard in the mono theme kx scan --html dashboard in the light theme

kx tree --html

The ownership graph as a collapsible tree, indexed like every other listing.

kx tree --html dashboard in the github-dark theme kx tree --html dashboard in the dracula theme kx tree --html dashboard in the nord theme kx tree --html dashboard in the gruvbox theme kx tree --html dashboard in the solarized-dark theme kx tree --html dashboard in the catppuccin-mocha theme kx tree --html dashboard in the tokyo-night theme kx tree --html dashboard in the rose-pine theme kx tree --html dashboard in the mono theme kx tree --html dashboard in the light theme