Purr ๐ฑ

A beautiful TUI (Text User Interface) wrapper for kubectl that maintains 100% feature parity while adding quality-of-life improvements through intelligent completion, resource caching, and elegant design.

Features
โจ 100% kubectl Compatible - Every kubectl command works identically
๐ Smart Completions - Interactive suggestions for commands, resources, and namespaces
๐พ Real-time Caching - Watch-based updates with 5-minute fallback refresh
๐ Command History - Persistent history with fuzzy search (Ctrl+R)
๐จ Beautiful UI - Elegant design with Charm's Bubble Tea & Lipgloss
โก Shell Commands - Run any shell command directly (non-kubectl commands execute as shell)
๐ File Picker - Type @ to browse and select files
๐ Safety First - Confirmation dialogs for destructive operations
๐ฎ Demo Mode - Try without a cluster using --demo
Installation
From Releases
Download the latest binary for your platform from the Releases page.
# Linux (amd64)
curl -LO https://github.com/tapcraft-io/purr/releases/latest/download/purr-linux-amd64.tar.gz
tar -xzf purr-linux-amd64.tar.gz
sudo mv purr-linux-amd64 /usr/local/bin/purr
# macOS (Apple Silicon)
curl -LO https://github.com/tapcraft-io/purr/releases/latest/download/purr-darwin-arm64.tar.gz
tar -xzf purr-darwin-arm64.tar.gz
sudo mv purr-darwin-arm64 /usr/local/bin/purr
# Windows - download the .zip from releases and add to PATH
From Source
git clone https://github.com/tapcraft-io/purr.git
cd purr
go build -o purr cmd/purr/main.go
sudo mv purr /usr/local/bin/
Using Go Install
go install github.com/tapcraft-io/purr/cmd/purr@latest
Quick Start
Simply run purr in your terminal:
purr
Purr will use your existing kubectl configuration and context.
Demo Mode
Try Purr without a Kubernetes cluster:
purr --demo
Check Version
purr --version
Demo
Main Interface
Type any kubectl command and enjoy enhanced autocomplete:

Resource Picker
Press Tab after typing a resource type to browse available resources:

Command History (Ctrl+R)
Search through your command history with fuzzy matching:

File Picker
Type @ to open an interactive file picker:

Usage
Basic Commands
Just type kubectl commands as you normally would:
> kubectl get pods
> kubectl get pods -n production
> kubectl describe pod my-pod
> kubectl logs my-pod -f
> kubectl apply -f deployment.yaml
Smart Features
Autocomplete Suggestions
Suggestions appear as you type. Use โ/โ or Ctrl+N/Ctrl+P to cycle through them, then Tab to accept:
> kubectl get [suggestions appear automatically]
Namespace Completion
Type -n or --namespace and suggestions will show available namespaces:
> kubectl get pods -n [namespace suggestions appear]
Resource Completion
After specifying a resource type, suggestions show available resources:
> kubectl get pods [pod name suggestions appear]
File Picker
Type @ to open an interactive file picker for selecting YAML/JSON files:
> kubectl apply -f @[file picker opens]
Navigate through your filesystem and press Enter to select.
Shell Commands
Non-kubectl commands are executed directly as shell commands:
> ls -la
> cat deployment.yaml
> grep -r "nginx" .
Command History
Press Ctrl+R to search through your command history with fuzzy matching.
Built-in Commands
clear or cls - Clear the screen
exit or quit - Exit Purr
Keybindings
Global
Ctrl+C (twice) - Quit
Ctrl+L - Clear screen
Ctrl+R - Open command history
Ctrl+O - View full output (when output is truncated)
Esc - Cancel/Go back
Typing Mode
Tab or โ - Accept suggestion
โ/โ or Ctrl+P/N - Cycle through suggestions
Enter - Execute command
@ - Open file picker
History Mode
โ/โ - Navigate history
Enter - Execute selected command
/ - Filter history
Esc - Cancel
File Picker Mode
โ/โ - Navigate files
Enter - Select file
Esc - Cancel
Configuration
Purr stores its data in ~/.purr/:
~/.purr/history.json - Command history (persists across sessions)
Purr uses your existing kubectl configuration from ~/.kube/config or the KUBECONFIG environment variable.
Supported kubectl Commands
Purr supports all kubectl commands. Here are some with enhanced features:
| Command |
Enhanced Features |
get |
Resource picker, namespace picker, output format picker |
describe |
Resource picker, namespace picker |
logs |
Pod picker, container picker (multi-container pods) |
exec |
Pod picker, container picker |
apply |
File picker |
delete |
Resource picker, confirmation dialog |
edit |
Resource picker |
port-forward |
Resource picker, port suggestions |
scale |
Resource picker, replica count display |
rollout |
Deployment picker |
Architecture
purr/
โโโ cmd/purr/ # Main entry point
โโโ internal/
โ โโโ tui/ # Bubble Tea UI components
โ โโโ k8s/ # Kubernetes client and cache
โ โโโ exec/ # kubectl execution
โ โโโ history/ # Command history
โ โโโ config/ # Configuration management
โโโ pkg/types/ # Shared types
Requirements
- Go 1.24 or higher (for building from source)
- kubectl installed and configured
- Access to a Kubernetes cluster (or use
--demo mode)
Why Purr?
kubectl is powerful but typing resource names, namespaces, and paths repeatedly can be tedious. Purr enhances kubectl with smart completions while maintaining 100% compatibility:
- No learning curve - Use kubectl commands you already know
- Speed boost - Quick resource suggestions instead of typing names
- Shell integration - Run any command, not just kubectl
- History - Never lose that complex command you ran last week
- Beauty - Powered by the charm ecosystem, purr is pure eye candy
Comparison with kubectl
| Feature |
kubectl |
Purr |
| All commands |
โ
|
โ
|
| Direct execution |
โ
|
โ
|
| Autocomplete |
Shell-dependent |
โ
Built-in |
| Resource suggestions |
โ |
โ
Real-time |
| History search |
Shell-dependent |
โ
Built-in fuzzy |
| File picker |
โ |
โ
Interactive |
| Shell commands |
Separate terminal |
โ
Integrated |
| Demo mode |
โ |
โ
--demo |
Development & Testing
Building
# Build for current platform
make build
# Run without installing
make run
# Run in demo mode
go run ./cmd/purr --demo
Running Tests
# Run all tests
make test
# Run tests with verbose output
go test -v ./...
Project Structure
purr/
โโโ cmd/purr/ # Main entry point
โ โโโ main.go
โโโ internal/
โ โโโ tui/ # Bubble Tea UI components
โ โ โโโ model.go # Application state
โ โ โโโ update.go # Event handling & key bindings
โ โ โโโ view.go # Rendering logic
โ โ โโโ styles.go # Lipgloss styling
โ โโโ k8s/ # Kubernetes client & cache
โ โ โโโ client.go # K8s client initialization
โ โ โโโ cache.go # Resource caching with watchers
โ โ โโโ mock_cache.go # Demo mode mock data
โ โโโ kubecomplete/ # Autocomplete engine
โ โ โโโ completer.go # Suggestion logic
โ โ โโโ registry.go # Command definitions
โ โ โโโ types.go # Completion types
โ โโโ exec/ # Command execution
โ โ โโโ kubectl.go # kubectl executor
โ โ โโโ parser.go # Command parser
โ โโโ history/ # Command history
โ โ โโโ history.go # Persistent history with search
โ โโโ config/ # Configuration
โ โโโ config.go # App configuration
โโโ pkg/types/ # Shared types
โโโ types.go
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature)
- Commit your changes (
git commit -m 'Add some amazing feature')
- Push to the branch (
git push origin feature/amazing-feature)
- Open a Pull Request
License
MIT License - see LICENSE file for details
Acknowledgments
- Built with Bubble Tea by Charm
- Inspired by the kubectl experience
- Thanks to the Kubernetes community
Support
Made with โค๏ธ by the Tapcraft team