Getting Started with the CLI
Prerequisites
Section titled “Prerequisites”- mise installed and active in your shell
- Bun available (
misedoes not manage Bun automatically) - A working
kubectlcontext pointing at a cluster
Enter the project root. mise runs its enter hooks automatically, which installs dependencies and saves the kb alias to your fish functions.
Build the binary
Section titled “Build the binary”The CLI is a single compiled binary built with Bun. Run the build script from the cli directory:
cd .mise/clibun run build.tsThe script compiles index.ts with the Solid JSX transform, minifies the output, and writes the binary to .mise/kb at the project root. Build time is a few seconds.
To build and launch in one step, use the mise task:
mise run tui --buildWithout --build, mise run tui launches the existing binary directly.
The kb alias
Section titled “The kb alias”The mise enter hook saves a fish alias pointing kb at .mise/kb. Once mise has run the hook, you can invoke the CLI from anywhere inside the project:
kb --helpkb tuiIf the alias is not available, re-enter the directory (cd .) or run the hook manually:
fish -c 'alias kb $(pwd)/.mise/kb; funcsave kb'Launch the TUI
Section titled “Launch the TUI”kb tui# ormise run tuiThe TUI opens full-screen. A header shows the current kubectl context and a live clock. Two tabs sit below it: Operations and Cluster.
Navigate the TUI
Section titled “Navigate the TUI”Switch views
Section titled “Switch views”Press Tab to toggle between the Operations view and the Cluster view.
Operations view
Section titled “Operations view”The Operations view lists runnable commands — Flux lifecycle actions, SOPS secret management, TLS setup, Skaffold workflows, and kubectl helpers.
| Key | Action |
|---|---|
j / ↓ | Move selection down |
k / ↑ | Move selection up |
Enter | Run the selected command |
The right panel shows a description and the underlying shell command for the highlighted entry. Output from the last run appears below the list.
Some commands — such as Secrets › Decrypt and Secrets › Edit — open a file picker before running. Navigate the picker the same way and press Enter to confirm.
Command palette
Section titled “Command palette”Press : or Ctrl+P to open the command palette. Type to filter commands by name, then press Enter to run one directly without returning to the list.
Help overlay
Section titled “Help overlay”Press ? to open the help overlay. It lists all keyboard shortcuts. Press Escape or ? again to close it.
Press q or Escape to exit the TUI. Ctrl+C also works.
Run your first command
Section titled “Run your first command”- Launch the TUI:
kb tui - Confirm you are on the Operations view (the Operations tab is highlighted).
- Use
jto move down to Flux › Reconcile. - Press
Enter. The TUI runsflux reconcile kustomization infrastructure -n flux-systemand displays the output below the list.
For commands that stream a lot of output or require a terminal (such as Skaffold › Dev), the TUI notes that they are interactive. Run those directly from the shell:
kb devNext steps
Section titled “Next steps”- Explore the Cluster view (Tab) to browse live pod and resource state
- Use
kb k describe,kb k yaml, andkb logsfor quick kubectl access from the shell - See the reference docs for the full command tree