FluxCLI

FluxCLI is a powerful Terminal User Interface (TUI) for managing FluxCD resources across multiple Kubernetes clusters. Inspired by tools like K9s, FluxCLI provides an intuitive, keyboard-driven interface specifically designed for GitOps workflows.
โจ Features
- ๐ Multi-Cluster Support - Seamlessly switch between and manage multiple Kubernetes clusters
- ๐ FluxCD Resource Management - View, monitor, and operate on GitRepository, HelmRepository, Kustomization, HelmRelease, and ResourceSet resources
- โก Real-time Monitoring - Live updates of resource status, events, and reconciliation progress
- โจ๏ธ Intuitive Navigation - K9s-inspired keyboard shortcuts and command patterns
- ๐ Advanced Filtering - Filter resources by namespace, status, cluster, and custom criteria
- ๐ก Event Streaming - Monitor FluxCD events and reconciliation status in real-time
- ๐จ Beautiful Interface - Clean, colorized terminal interface with responsive layouts
๐ Quick Start
Prerequisites
- Kubernetes cluster(s) with FluxCD v2.0+ installed
- kubectl configured with access to your clusters
- Go 1.21+ (for building from source)
Installation
Using Nix (Recommended for Development)
# Clone the repository
git clone https://github.com/malagant/fluxcli.git
cd fluxcli
# Build using our development tools
./dev.sh build
# Run FluxCLI
./fluxcli
Using Make
# Clone and build
git clone https://github.com/malagant/fluxcli.git
cd fluxcli
make build
# Run FluxCLI
./fluxcli
Using Go
# Install directly from source
go install github.com/malagant/fluxcli@latest
# Or build locally
git clone https://github.com/malagant/fluxcli.git
cd fluxcli
go build -o fluxcli .
First Run
- Configure FluxCLI: Create a configuration file at
~/.fluxcli/config.yaml or let FluxCLI create one for you
- Launch: Run
fluxcli to start the terminal interface
- Navigate: Use keyboard shortcuts to browse your FluxCD resources
Kubernetes Configuration
FluxCLI follows standard Kubernetes tooling conventions for kubeconfig resolution. You have several options to specify your Kubernetes configuration:
Using Environment Variables (Recommended)
# Set KUBECONFIG environment variable
export KUBECONFIG=/path/to/your/kubeconfig
fluxcli
# Multiple kubeconfig files (standard Kubernetes convention)
export KUBECONFIG=/path/to/config1:/path/to/config2
fluxcli
Using Command Line Flags
# Specify kubeconfig file explicitly
fluxcli --kubeconfig ~/.kube/config
# Specify context and namespace
fluxcli --context my-cluster --namespace flux-system
Priority Order
FluxCLI resolves kubeconfig in the following priority order:
- Command line flag (
--kubeconfig) - highest priority
- KUBECONFIG environment variable - if no flag specified
- Default location (
$HOME/.kube/config) - fallback
This behavior matches kubectl and other Kubernetes tools, making FluxCLI easy to integrate into existing workflows.
๐ฎ Usage
Basic Navigation
| Key |
Action |
j/k |
Move up/down in lists |
g/G |
Go to top/bottom |
Enter |
View resource details |
Tab |
Switch between views |
Ctrl+K/J |
Switch clusters |
1-4 |
Switch resource types |
: |
Enter command mode |
? |
Toggle help |
q |
Quit |
Command Mode
Press : to enter command mode for advanced operations:
:suspend <resource> - Suspend a FluxCD resource
:resume <resource> - Resume a FluxCD resource
:reconcile <resource> - Trigger reconciliation
:quit - Exit FluxCLI
Configuration
FluxCLI uses a YAML configuration file located at ~/.fluxcli/config.yaml:
# Multi-cluster configuration
clusters:
- name: "production"
kubeconfig: "~/.kube/config"
context: "prod-cluster"
- name: "staging"
kubeconfig: "~/.kube/staging-config"
context: "staging-cluster"
# Default settings
defaults:
namespace: "flux-system"
refresh_interval: "5s"
max_concurrent_clusters: 10
# UI preferences
ui:
theme: "dark"
show_events: true
columns:
- "Name"
- "Namespace"
- "Age"
- "Status"
- "Message"
๐ ๏ธ Development
FluxCLI provides several development tools and scripts:
Development Setup
Option 1: Nix Flake (Recommended)
# Provides all development tools in an isolated environment
nix develop
./dev.sh build
Option 2: Manual Setup
# Install Go 1.24+, kubectl, flux, etc. manually
go build -o fluxcli
See docs/development-environment.md for detailed setup instructions.
Development Workflow
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature)
- Make your changes
- Run tests (
make test)
- Run linter (
make lint)
- Commit your changes (
git commit -m 'Add some amazing feature')
- Push to the branch (
git push origin feature/amazing-feature)
- Open a Pull Request
๐ Documentation
๐ค Contributing
We welcome contributions! Please see our Contributing Guide for details.
๐ Requirements
- Kubernetes: 1.20+
- FluxCD: v2.0+
- Go: 1.21+ (for building)
- Terminal: Modern terminal with color support
๐ Troubleshooting
Common Issues
FluxCLI won't connect to cluster:
- Verify kubectl can connect:
kubectl cluster-info
- Check kubeconfig path and context in configuration
- Ensure FluxCD is installed:
flux check
Resources not displaying:
- Verify FluxCD resources exist:
kubectl get gitrepositories -A
- Check namespace permissions
- Ensure correct FluxCD CRDs are installed
Performance issues:
- Reduce refresh interval in configuration
- Limit concurrent clusters in config
- Filter resources by namespace
For more troubleshooting help, see our User Guide.
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
๐ Star History

FluxCLI - Making GitOps management delightful โญ