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 doctorno 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 statusrenders bold headers on a terminal. Piped, it is unchanged.lo toolchain doctorhas a title and no leading blank line. When a pinned tool is missing it ends onnext: lo toolchain install.lo toolchain installends onnext: lo toolchain doctor.lo addonsmeasures its columns on a terminal, so a long addon name stays in line. Piped, the printf layout is unchanged.lo assets listandlo assets diffmeasure in both modes.The not-found messages of
lo status, and of every command that resolves a spec, nameclusters/<domain>/. The old text named.lok8s/<domain>/. Both implementations changed together.Bare
lo initon 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 detailsorCancel.Createruns and continues in project mode. In a project: the state card in the layout of thelo upheader, 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'sCreate. Esc cancels; Ctrl-C leaves with rc 130. Off a terminal, underCIor with--yes, barelo initprints the help as before. Seelo 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'sequivalentrow and in--plan. No doctor sections inside the card (lo doctorkeeps them).lo init serviceandlo init testopen 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 --planprints 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 useon 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 printsno clusters yetand points atlo init. lo use <unknown>on a terminal adds the closest domain and the available ones under the error.lo bogusprints cobra's "Did you mean this?" block and theRun "lo -h"hint. Words from other tools (start,stop,delete,switch,apply) suggest theirlocommand.- 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]writesclusters/<domain>/cluster.lok8s.yamland makes the domain the active one. The verb behind project mode's "Add a cluster". Go-only.--yes,--planand--dry-runonlo init cluster,lo init serviceandlo init test.
Removed
- The
lo initwizard'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|powershellcompletes the values that live in the project. Domains complete onlo use,lo audit,lo recover, every--domainand--cluster-override, and the drivers' positional. Addon names complete onlo addons, asset paths onlo assets eject|diff|update, service names onlo init service. A Tab never writes into the project. Install lines: CLI reference.- Every command's
--helpends with anExamples: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
loon 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 cleanandlo image cleanlist what they remove (the cluster name, the kubeconfig, the registry containers and volumes, the docker volumes) and ask once.--yesanswers the prompt;--forcekeeps its meaning (a precondition override) and does not. Off a terminal nothing changes: no prompt, no new requirement. -o,--output text|json|yamlonuse,status,addons,assets list,registry status,versionanddoctor, with stable lowerCamel field names (CLI reference).- On a terminal an error with a next step prints as
error: …andnext: …. Off a terminal the exact[error]line prints as before.--debugnames every failed external command with its exit code. The exit codes are documented (CLI reference). lo lint --format text|editor|github.githubis the default underGITHUB_ACTIONS=trueoff a terminal.-q,--quietsilences the informational stderr lines.-vstays 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.