Skip to content

One presentation layer for the terminal, the lo init screens and a new verb. No command changed its piped output, with the exceptions listed under Changed.

The rule

lo decides per stream. Off a terminal (a pipe, a file, CI) the output is the plain text of the bash implementation, byte for byte. Scripts keep matching on it.

On a terminal lo renders one house style. Titles and sections are bold. The ✓ ! ✗ · markers and the [error]/[warn] prefixes have colour. Tables measure their columns. A command with an obvious next step ends on a dim next: lo <cmd> # why line. NO_COLOR (set to a non-empty value) and the new global --no-color flag keep the terminal shape without colour. See Output.

Changed

  • lo doctor no longer prints ANSI escapes into a pipe. It is the one command whose piped bytes change. The bash implementation gates its colour the same way, so both print the same plain bytes. On a terminal the command is the title, and the report starts with its first section. lo up, lo down, lo provision, lo recover, the apply progress and the bootstrap engine still print their escapes into a pipe, as the bash implementation does. Their gate is a follow-up (WP12).

  • A project with a bash tree ejected before v0.5.0 keeps the escapes in the doctor's provider section until lo assets update bash.

  • lo status renders bold headers on a terminal. Piped, it is unchanged.

  • lo toolchain doctor has a title and no leading blank line. When a pinned tool is missing it ends on next: lo toolchain install. lo toolchain install ends on next: lo toolchain doctor.

  • lo addons measures its columns on a terminal, so a long addon name stays in line. Piped, the printf layout is unchanged. lo assets list and lo assets diff measure in both modes.

  • The not-found messages of lo status, and of every command that resolves a spec, name clusters/<domain>/. The old text named .lok8s/<domain>/. Both implementations changed together.

  • Bare lo init on a terminal. Without a project here, or in a project without a git repository, one welcome line and one bootstrap screen with every value prefilled (the name, the first cluster <name>.dev, the driver, the environment file, the toolchain, git init); Create, Change details or Cancel. Create runs and continues in project mode. In a project: the state card in the layout of the lo up header, then one choice from what the state allows (a cluster, a service, the test suite, the toolchain when a pinned tool is missing, the active domain when none is valid or with several clusters, the bash tree or the implementation switch, Exit); each action is one screen, then the card again with a one-line result. A failed step is a row under the card, not an exit. Nothing is written except on a screen's Create. Esc cancels; Ctrl-C leaves with rc 130. Off a terminal, under CI or with --yes, bare lo init prints the help as before. See lo init.

  • The state card. Two columns, the project name first, the facts joined with ·: the implementation, the branch and the count of uncommitted paths, the clusters grouped by driver with the active one first, the toolchain with the count of pinned tools, the environment file, the bash tree, services.yaml, tests/. A row that starts with ! needs an action; the command is in the list's equivalent row and in --plan. No doctor sections inside the card (lo doctor keeps them).

  • lo init service and lo init test open their screen on a terminal without --yes; a value given on the command line is a fixed row. Off a terminal they run as before.

  • lo init --plan prints the mode's screen as text: the welcome and the bootstrap screen, or the card with the action list and the next step.

Added

  • A bare lo use on a terminal opens a select over the domains and preselects the active one. Enter sets it. Esc or Ctrl-C leaves it as it is. Without a cluster it prints no clusters yet and points at lo init.
  • lo use <unknown> on a terminal adds the closest domain and the available ones under the error.
  • lo bogus prints cobra's "Did you mean this?" block and the Run "lo -h" hint. Words from other tools (start, stop, delete, switch, apply) suggest their lo command.
  • Every flag error, on every command, prints in the one argsh shape.
  • --no-color.
  • lo init cluster [domain] [--driver lo|kubeone|capi|kkp|kubehz-hosted] [--no-active] [--force] writes clusters/<domain>/cluster.lok8s.yaml and makes the domain the active one. The verb behind project mode's "Add a cluster". Go-only.
  • --yes, --plan and --dry-run on lo init cluster, lo init service and lo init test.

Removed

  • The lo init wizard's menu, form chain, Yes/No confirms and summary screen from v0.3.x. Their flag twins stay: lo init project --env --cluster --driver --implementation, lo init service <name> --path, lo init test, lo toolchain install --groups, lo assets eject bash, lo use <domain>.

Discoverability

  • lo completion bash|zsh|fish|powershell completes the values that live in the project. Domains complete on lo use, lo audit, lo recover, every --domain and --cluster-override, and the drivers' positional. Addon names complete on lo addons, asset paths on lo assets eject|diff|update, service names on lo init service. A Tab never writes into the project. Install lines: CLI reference.
  • Every command's --help ends with an Examples: block of one to three lines with real-looking values.
  • The generated CLI commands page lists every command with its flags and examples. go test ./internal/clidoc/ fails while the committed page is stale.
  • A bare lo on a terminal prints an orientation block: the project, the active domain and its driver, the kubeconfig when one exists, the six everyday commands and the next step. Off a terminal it prints the full help as before.
  • The Short of the Go-only commands (assets, mcp, toolchain) starts with a verb and has at most 60 characters.

Safety and scripts

  • On a terminal, lo down, lo clean, lo destroy (local driver), lo registry clean and lo image clean list what they remove (the cluster name, the kubeconfig, the registry containers and volumes, the docker volumes) and ask once. --yes answers the prompt; --force keeps its meaning (a precondition override) and does not. Off a terminal nothing changes: no prompt, no new requirement.
  • -o, --output text|json|yaml on use, status, addons, assets list, registry status, version and doctor, with stable lowerCamel field names (CLI reference).
  • On a terminal an error with a next step prints as error: … and next: …. Off a terminal the exact [error] line prints as before. --debug names every failed external command with its exit code. The exit codes are documented (CLI reference).
  • lo lint --format text|editor|github. github is the default under GITHUB_ACTIONS=true off a terminal.
  • -q, --quiet silences the informational stderr lines. -v stays the [debug] channel (Levels).

Upgrade

Reinstall the binary: bash lo-install.sh, or unpack lo-<os>-<arch>.tar.gz (lo-full-<os>-<arch>.tar.gz for the in-process build) from the release. A project that pins lo through lo toolchain install bumps github.com/kernpilot/lok8s in .bin/b.yaml to v0.5.0 and runs b install. A project that routes commands to the bash tree runs lo assets update bash to pick up the colour gate in verbose.sh and libs/doctor.

Released under the MIT License.