Kat
TUI and rule-based rendering engine for Kubernetes manifests
Install / Use
/learn @MacroPower/KatREADME
kat automatically invokes manifest generators like helm or kustomize, and provides a persistent, navigable view of rendered resources, with support for live reloading, integrated validation, and more.
It is made of two main components, which can be used together or independently:
- A rule-based engine for automatically rendering and validating manifests
- A terminal UI for browsing and debugging rendered Kubernetes manifests
Together, these deliver a seamless development experience that maintains context and focus while iterating on Helm charts, Kustomize overlays, and other manifest generators.
<p align="center"> <img src="./docs/assets/demo.gif"> </p> <p align="center"> ❤️ Made with <a href="https://github.com/charmbracelet/bubbletea">bubble tea</a>, <a href="https://github.com/alecthomas/chroma/">chroma</a>, and <a href="#-dependencies">other amazing libraries</a>. </p>✨ Features
🔍️ Manifest browsing
- Navigate hundreds of resources with fuzzy search and filtering
- View individual resources in your terminal with syntax highlighting
⚡️ Live reload
- Monitor source files with
--watchfor automatic re-rendering - Maintain your current context between reloads so you don't lose your place
- Highlight changes with diff visualization between renders
🐛 Error handling
- Surface rendering and validation errors as overlays
- Works with reload; fix source files and watch errors disappear instantly
🧪 Tool integration
- Define profiles for any manifest generator (Helm, Kustomize, CUE, KCL, Jsonnet, etc.)
- Run tools like
kubeconformorkyvernoautomatically on rendered manifests - Chain multiple tools together with pre and post-render hooks
🎯 Project detection
- Select your defined profiles automatically using CEL expressions
- Match projects based on file contents, structure, or naming patterns
- Support for project-specific runtime configs via
.katrc.yamlfiles
🔌 Plugin system
- Add custom keybind-triggered commands for your specific workflows
- Execute dry-runs, deployments, or any custom tooling without leaving kat
🤖 MCP server (Experimental)
- Limit access to irrelevant context, improving performance and reducing cost
- Force your AI to always follow the same rendering and validation pipeline
- Enable iterative testing without handing over cluster or command-line access
🎨 Fully customizable
- Choose from any available Chroma themes, or define your own
- Remap any keybinding to match your preferences
📦 Installation
<details> <summary><strong>Homebrew</strong></summary>You can install kat using my tap.
With brew:
brew install macropower/tap/kat --cask
With your Brewfile:
tap "macropower/tap"
cask "kat"
</details>
<details>
<summary><strong>Go</strong></summary>
go install github.com/macropower/kat/cmd/kat@latest
</details>
<details>
<summary><strong>Docker</strong></summary>
Docker images are published to ghcr.io/macropower.
All images are configured with WORKDIR=/data, so you can mount your current directory there to run kat against your local files.
Run the latest alpine image:
docker run -it -v .:/data -e TERM=$TERM ghcr.io/macropower/kat:latest-alpine
The default config is located at /config/kat/config.yaml, and you can override it by mounting your own configuration file at that path.
There is also a scratch image that contains only the kat binary, which is useful when you want to build your own image (which I generally recommend doing):
FROM alpine:latest
COPY --from=ghcr.io/macropower/kat:latest /kat /usr/local/bin/kat
# Add whatever customization you need here.
ENTRYPOINT ["/usr/local/bin/kat"]
</details>
<details>
<summary><strong>Nix (NUR)</strong></summary>
You can install kat using my NUR.
With nix-env:
nix-env -iA kat -f https://github.com/macropower/nur-packages/archive/main.tar.gz
With nix-shell:
nix-shell -A kat https://github.com/macropower/nur-packages/archive/main.tar.gz
With your flake.nix:
{
inputs = {
macropower.url = "github:macropower/nur-packages";
};
# Reference the package as `inputs.macropower.packages.<system>.kat`
}
With devbox:
devbox add github:macropower/nur-packages#kat
</details>
<details>
<summary><strong>GitHub CLI</strong></summary>
gh release download -R macropower/kat -p "kat_$(uname -s)_$(uname -m).tar.gz" -O - | tar -xz
And then move kat to a directory in your PATH.
curl -s https://api.github.com/repos/macropower/kat/releases/latest | \
jq -r ".assets[] |
select(.name | test(\"kat_$(uname -s)_$(uname -m).tar.gz\")) |
.browser_download_url" | \
xargs curl -L | tar -xz
And then move kat to a directory in your PATH.
Or, download a binary from releases.
Note: The default
katconfiguration contains references tohelm,kustomize, andyq. If you want to usekatwith these tools, you will need to install them separately.
🔏 Verification
You can verify the authenticity and integrity of kat releases.
See verification for more details.
🚀 Usage
Show help:
kat --help
Render a project in the current directory:
kat
Render a project and enable watch (live reloading):
kat -w
Render a project in a specific directory:
kat ./example/helm
Render a project in a specific directory using the ks profile:
kat ./example/kustomize ks
Render a project with custom profile arguments:
kat ./example/helm -- -g -f prod-values.yaml
kat ./example/kustomize ks -- --enable-helm
Render a project with command passthrough:
kat ./example/helm task -- helm:render
Read from stdin (disables rendering engine):
cat ./example/kustomize/resources.yaml | kat -
Send output to a file (disables TUI):
kat ./example/helm > manifest.yaml
You can optionally start kat with an MCP server by using the --serve-mcp flag:
kat --serve-mcp :50165
See MCP Server for more details.
⚙️ Configuration
When you first run kat, it will attempt to add default configuration files to $XDG_CONFIG_HOME/kat/ (or ~/.config/kat/). This configuration allows you to customize the behavior of kat, such as the UI style, keybindings, rules for project detection, and profiles for rendering different types of projects.
Note that JSON schemas are also included in the configuration directory, which can be used by your editor's YAML language server.
Some of the default behavior around loading configuration can be overridden with command line flags or environment variables. See
kat --helpfor details.
Over time, the default configuration may change, and the schema is currently still evolving. If you want to reset your configuration to the latest defaults, you can use kat --write-config, which will move your existing configuration to a backup file and generate a new default configuration.
You can find the default configuration file as well as JSON schemas in api.
🛠️ Rules and Profiles
You can customize how kat detects and renders different types of projects using rules and profiles in the configuration file. This system uses CEL (Common Expression Language) expressions to provide flexible file matching and processing.
🎯 Rules
Rules determine which profile should be used. Each rule contains:
match(required): A CEL expression that returnstrueif the rule should be appliedprofile(required): The name of the profile to use when this rule matches
Rules use boolean CEL expressions with access to:
files(list<string>): All file paths in the directorydir(string): The directory path being processed
rules:
- # Select the Helm profile if any Helm chart files exist
match: >-
files.exists(f, pathBase(f) in ["Chart.yaml", "Chart.yml"])
profile: helm
- # Select the Kustomize profile if any Kustomization files exist
match: >-
files.exists(f, pathBase(f) in ["kustomization.yaml", "kustomization.yml"])
profile: ks
- # Fallback: select the YAML profile if any YAML files exist
match: >-
files.exists(f, pathExt(f) in [".yaml", ".yml"])
profile: yaml
🎭 Profiles
Profiles define how to render projects. They can be automatically selected by rules, or manually specified when kat is invoked. Each profile contains:
command(required): The command to executeargs: Arguments to pass to the commandextraArgs: Arguments that can
Related Skills
node-connect
335.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
82.5kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
335.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
82.5kCommit, push, and open a PR
