- Python 82.9%
- Shell 17.1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| docs | ||
| scripts | ||
| src/kaji | ||
| tests | ||
| .gitignore | ||
| .python-version | ||
| mkdocs.yml | ||
| pyproject.toml | ||
| README.md | ||
| uv.lock | ||
Kaji
Kaji (Japanese for "helm") is a companion CLI for exploring and troubleshooting Kubernetes clusters. It turns common multi-step investigations—finding related resources, tracing traffic and ownership, inspecting configuration, or checking blast radius—into focused commands backed by the Kubernetes API.
Kaji favors concise human-readable output for interactive work, offers JSON for
scripts, and uses fzf when a resource or namespace is omitted. Commands it
doesn't implement can be confirmed and passed through to kubectl, so it can
serve as one entry point for both Kaji workflows and familiar Kubernetes
commands.
Install
Kaji requires Python 3.14 or newer, plus kubectl and fzf on your PATH.
pip install kaji
Or install it from source:
git clone <repo> && cd kaji
uv sync
Quick start
# Find pods that mount a PVC
kaji infer pod from pvc/my-claim -n myns
# Browse concise resource details
kaji list pods -A
# Trace everything connected to a deployment
kaji trace deployment/web -n myns
# Explain an unhealthy pod
kaji why pod/web-abc123 -n myns
# Preview and confirm bulk deletion
kaji rm --all pvc -n myns
Omit a resource or namespace to select it interactively with fzf; Kaji prints
each selection to stderr. Add -j/--json for structured output.
Table commands accept repeatable --filter COLUMN=GLOB and
--exclude COLUMN=GLOB; prefix values with re: for regex. Use
--columns NAME,STATUS, --sort NAME, and --reverse to shape output. list
also passes -l/--label-selector and --field-selector to Kubernetes. PVC
listings fetch and show kubelet usage only with --usage.
Commands and abbreviations
Any unambiguous leading prefix selects a native command. kaji --help shows
the shortest current prefixes; longer prefixes and full names work too. ls
is an additional alias for list.
| Command | Shortest | Purpose |
|---|---|---|
access |
a |
Summarize ServiceAccount RBAC grants |
events |
e |
Show recent events with warnings first |
find |
f |
Find resources by name |
images |
ima |
Inventory workload images |
impact |
imp |
Show a resource's dependency blast radius |
infer |
in |
Find related resources |
labels |
la |
Discover label keys and values |
list |
li, ls |
List concise resource details |
rm |
rm |
Delete every resource of a type with --all |
routes |
ro |
Trace Ingress-to-pod traffic paths |
trace |
t |
Map related resources as a tree |
unused |
u |
Find resources unused by standard pod specs |
why |
w |
Explain unhealthy resource status and events |
Commands Kaji doesn't implement are shown for confirmation and then forwarded
to kubectl:
kaji get pods -A
kaji -y rollout status deployment/web -n prod
See the full documentation for command syntax, output formats, and the local Kind playground.