Skip to content

Getting Started with the CLI

  • mise installed and active in your shell
  • Bun available (mise does not manage Bun automatically)
  • A working kubectl context 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.

The CLI is a single compiled binary built with Bun. Run the build script from the cli directory:

Terminal window
cd .mise/cli
bun run build.ts

The 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:

Terminal window
mise run tui --build

Without --build, mise run tui launches the existing binary directly.

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:

Terminal window
kb --help
kb tui

If the alias is not available, re-enter the directory (cd .) or run the hook manually:

Terminal window
fish -c 'alias kb $(pwd)/.mise/kb; funcsave kb'
Terminal window
kb tui
# or
mise run tui

The TUI opens full-screen. A header shows the current kubectl context and a live clock. Two tabs sit below it: Operations and Cluster.

Press Tab to toggle between the Operations view and the Cluster view.

The Operations view lists runnable commands — Flux lifecycle actions, SOPS secret management, TLS setup, Skaffold workflows, and kubectl helpers.

KeyAction
j / Move selection down
k / Move selection up
EnterRun 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.

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.

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.

  1. Launch the TUI: kb tui
  2. Confirm you are on the Operations view (the Operations tab is highlighted).
  3. Use j to move down to Flux › Reconcile.
  4. Press Enter. The TUI runs flux reconcile kustomization infrastructure -n flux-system and 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:

Terminal window
kb dev
  • Explore the Cluster view (Tab) to browse live pod and resource state
  • Use kb k describe, kb k yaml, and kb logs for quick kubectl access from the shell
  • See the reference docs for the full command tree