Overview of the kli Tool
bjarneo releasedInstallation and Build Steps
Three installation paths exist. The installer script pulls the latest binary:curl -fsSL https://raw.githubusercontent.com/bjarneo/kli/main/install.sh | sh
Go users run:
go install github.com/bjarneo/kli@latest
Source builds use make install, which places the binary in a directory on $PATH. The resulting binary is self-contained and does not require additional runtime libraries beyond a standard terminal.
Configuration and Resource Sidebar
kli reads ~/.config/kli/config.yaml for sidebar layout and stores session data in state.json. Run kli config init to seed defaults, then edit the list section to include custom resources. CRDs must be specified with their group-qualified name to avoid collisions, for example scaledobjects.keda.sh. Resources absent from the cluster are filtered out at startup, so empty sections disappear automatically. Session state remembers the last namespace and context.Daily Commands and Workflow
Launch with the current context or override the namespace directly:kli -n kube-system kli --resource deploy kli --theme tokyonight
The interface shows cluster health metrics on first screen. Press ? to open the help overlay and Ctrl+K for the command palette. Navigation stays keyboard-only; arrow keys move the cursor, enter opens detail views, and e triggers in-place edits. Logs follow with automatic scrolling, and shell sessions open in a split pane without leaving the TUI. The design keeps all operations local to the terminal, avoiding browser or desktop dependencies.
Resource Handling Trade-offs
Built-in resources appear by default. Adding many CRDs increases sidebar length, which can slow initial rendering on large clusters. The tool drops any resource the current RBAC context cannot list, reducing noise but requiring explicit permissions for full visibility. No persistent watch connections beyond the active session are maintained, so reconnects happen on every restart.Performance Notes
Startup time stays under one second on typical laptop hardware when the API server responds quickly. Memory use remains low because only visible pages are fetched. Heavy log streams can increase CPU if the terminal emulator redraws frequently. The Go implementation compiles to a single static binary, which simplifies distribution across different operating systems.What are the main keyboard shortcuts in kli? The help screen triggered by ? lists navigation, edit, log, and exec bindings. Ctrl+K opens the command palette for less common actions.
Does kli support multiple Kubernetes contexts? It respects the current kubeconfig context and remembers the last used namespace across restarts via state.json.
Can custom resources be added without restarting the binary? No. Changes to config.yaml require a full restart so the sidebar parser reloads the definitions.
---
๐ Related articles
- Agentic Coding: Una Trappola per lo Sviluppo Software?
- File agents.md: utili per gli agenti di coding?
- Lean-ctx: Ottimizzatore Ibrido Riduce Consumo Token LLM del 89-99%
Need a consultation?
I help companies and startups build software, automate workflows, and integrate AI. Let's talk.
Get in touch