KLI is a modern and interactive command-line interface for Kubernetes, designed to simplify cluster navigation and management through a rich user interface based on fzf.
_ ___ _____
| |/ / | |_ _|
| ' /| | | |
| . \| |___ _| |_
|_|\_\_____||_____|
- ๐ฏ Smart Navigation - Interactive interface with real-time preview
- ๐ Context Switching - Quick switching between Kubernetes clusters
- ๐ฆ Resource Explorer - Visualization and management of all K8s resources
- ๐ Live Preview - Display logs, YAML and status in real-time
- โก Performance - Optimal use of
fzffor a smooth experience - ๐จ Modern UI - Colorful interface with symbols and visual status
- ๐ ๏ธ Kubectl Actions - Execute kubectl commands (get, describe, logs, edit, delete, etc.)
kubectl- Kubernetes CLIfzf- Fuzzy finder (>= 0.27.0 recommended)
jq- For advanced JSON parsing- Metrics Server (for
topcommands)
brew tap DRINGOT/tap
brew install DRINGOT/tap/kli# Clone the repository
git clone https://github.com/DRINGOT/kli.git
cd kli
# Run the installation
./install.shThe installation script will:
- Check system dependencies
- Copy binaries to
/usr/local/bin - Configure appropriate permissions
# Copy files
sudo cp kli kli-ctx kli-engine kli-ns kli-run /usr/local/bin/
sudo cp kli-ui VERSION /usr/local/bin/
# Make scripts executable
sudo chmod +x /usr/local/bin/kli*kliLaunches the main interface with the home menu allowing you to:
- Start the resource explorer
- Switch Kubernetes context
- Switch namespace
- Launch the initialization wizard
# Switch Kubernetes context
kli ctx
# Switch namespace
kli ns
# Launch the demo wizard
kli run
# Start explorer directly
kli --explorer
# Set initial namespace
kli -n monitoring
kli --namespace productionOPTIONS:
-n, --namespace <ns> Set initial namespace
--explorer Jump directly to resource explorer
-h, --help Show this help message
-v, --version Show version
COMMANDS:
ctx Switch cluster context
ns Quick namespace switch
run Start the demo/wizard mode
- ENTER : Select / Validate
- ESC : Return to previous menu
- Ctrl+C : Exit cleanly
- โ/โ : Navigate through lists
- Type to search : Dynamic filtering
HOME
โโโ START EXPLORER
โ โโโ NAMESPACE
โ โโโ ACTION (get, describe, logs, edit, etc.)
โ โโโ RESOURCE (pods, services, deployments, etc.)
โ โโโ ITEM (specific selection)
โโโ SWITCH CONTEXT (kli-ctx)
โโโ SWITCH NAMESPACE (kli-ns)
โโโ RUN WIZARD (kli-run)
The project consists of several modules:
kli- Main entry point and orchestratorkli-ctx- Context switching module with node previewkli-ns- Namespace switching module with pod overviewkli-engine- Kubectl action execution engine with colorizationkli-run- Interactive wizard for onboardingkli-ui- Shared UI library (colors, symbols, rendering functions)
kli/
โโโ kli # Main binary
โโโ kli-ctx # Context switcher
โโโ kli-ns # Namespace switcher
โโโ kli-engine # Data fetcher
โโโ kli-run # Interactive wizard
โโโ kli-ui # UI library
โโโ install.sh # Installation script
โโโ VERSION # Version file
โโโ LICENSE # GPL v3 License
โโโ README.md # Documentation
Statuses are automatically colorized:
- ๐ข Green : Running, Active, Ready, Succeeded
- ๐ก Yellow : Pending, ContainerCreating, Progressing
- ๐ด Red : Failed, Error, CrashLoopBackOff, OOMKilled
- Contexts : Display nodes, endpoints and metrics
- Namespaces : List pods and their statuses
- Resources : Detailed YAML and recent logs
KLI uses the standard kubectl configuration (~/.kube/config) and requires no additional configuration.
# Check cluster connection
kubectl cluster-info
# Check current context
kubectl config current-context
# Use kli ctx to switch context
kli ctx# macOS
brew install fzf
# Ubuntu/Debian
sudo apt install fzf
# Arch Linux
sudo pacman -S fzf# 1. Check/switch context
kli ctx
# 2. Select a namespace
kli ns
# 3. Explore resources
kli --explorer
# Or all in one command
kli -n production- get - List resources
- describe - Complete details of a resource
- logs - View logs (pods)
- edit - Edit YAML configuration
- top - CPU/RAM metrics
- delete - Delete a resource
- explain - Resource documentation
- rollout - Manage deployments
- scale - Scale a resource
Contributions are welcome! Feel free to:
- Open issues to report bugs
- Submit pull requests for new features
- Improve documentation
This project is distributed under the GNU General Public License v3.0. See the LICENSE file for more details.
Donovan Ringot
- GitHub: @DRINGOT
- kubectl - Official Kubernetes CLI
- fzf - The fuzzy finder that makes this all possible
- The Kubernetes community
KLI - Making Kubernetes management interactive and enjoyable! ๐