krepl is an interactive REPL for managing Kubernetes clusters and is inspired by Click. One of its goals is best-effort Click compatibility, so Click users can also use krepl in an intuitive way. It maintains context, namespace, and selected object state between commands, so you do not need to pass --context and --namespace flags or object names on every invocation. It also supports a few capabilities Click does not currently support, including editing Kubernetes objects and running without a dependency on the kubectl binary.
- Go 1.25+
- A valid kubeconfig (
~/.kube/configor$KUBECONFIG)
Install directly with go install:
go install github.com/heyihong/krepl/cmd/krepl@latestOr, from a local clone:
git clone https://github.com/heyihong/krepl.git
cd krepl
go install ./cmd/kreplIf you installed the binary with go install, run:
kreplIf you cloned the repository and want to run without installing, use the startup script:
bin/krepl.shFor command discovery, type help in the repl. For detailed command help, use help <command> or <command> --help.