Skip to content
kix /docs
Install the CLI

Reference CLI

Global flags

Flags and environment variables every `kix` command accepts: output format, verbosity, colour, kubeconfig context, flake selection, and the eval cache.

These flags are accepted by every kix command and may appear before or after the subcommand. A command that has no use for a flag ignores it, and its --help does not list it. kix --help lists them all.

This page is hand-maintained. Check GlobalArgs and SCOPED_GLOBALS in cli/kix-cli/src/cli.rs, cli/kix-cli/src/main.rs and cli/kix-cli/src/output.rs when in doubt.

FlagDefaultMeaning
-o, --output <FORMAT>Varies by commandtext, json, yaml, or markdown. See Output formats for which commands honour which values.
-v, --verboseOffLog more to stderr. Repeat for more: -v logs Kix at info level, -vv at debug, -vvv everything at debug. Without it, warnings are logged, except those the Kubernetes client writes for an error response it then returns to Kix.
-q, --quietOffSuppress progress and informational output, and log errors only. Results still print.
--no-colorOffDisable coloured result output. Deploy and gc progress lines currently still use terminal clear-line control sequences.
--context <CONTEXT>Current kubeconfig contextKubeconfig context for every command that talks to a cluster. logs and pf pass it to kubectl.
--flake <FLAKE>.Flake to evaluate clusters from. A value without : is a local path, resolved against the working directory; anything else, such as github:org/repo, is passed to Nix as a flake reference. Commands that use the eval cache currently fail on a remote reference.
--no-cacheOffSkip the Kix eval cache and evaluate from Nix every time. See Eval cache behavior.
--override-input <INPUT> <URL>NoneOverride a flake input’s URL for every nix command Kix runs, like nix --override-input. Repeatable, two values each time.
-h, --helpPrint help. -h prints a summary, --help the long form.
-V, --versionPrint the version.

-v, -q and --no-color apply to every command. The other flags apply only where the table shows them; elsewhere they are accepted and have no effect.

Command-o--context--flake--no-cache--override-input
build, check, graph, inspect, images, listyesyesyesyes
statusyesyesflat view onlyflat view onlyflat view only
diffyesyesyesyes
planyesyesyesyes
deploy, gc, migrate domain, logs, pfyesyesyes
exportyesyes
rollback, driftyesyes
health, snapshot saveyes
compliance sbomyesyesyes
compliance attestyesyesyesyes
compliance audityesyesyes
pinyesyes
completions

--no-cache applies only to commands that read the eval cache. kix pin uses --flake only as a place to look for pins.json. -o on rollback applies only with --list, and on deploy only with --dry-run.

VariableEffect
NO_COLORAny value disables colour, as --no-color does. Colour is also off when TERM=dumb or stdout is not a terminal. Deploy and gc have the progress-line exception noted above.
KIX_LOGA tracing filter, such as kix=debug or debug, that replaces the level chosen by -v and -q.
KIX_NO_INTERACTIVEAny value makes Kix treat the terminal as non-interactive, so commands that ask for confirmation refuse to prompt and need --yes. Stdin that is not a terminal has the same effect.

The variables that tune how Kix talks to the Kubernetes API are listed in API server retries and request limits. Registry credentials for kix pin are listed on kix pin.

❱ kix --flake ../infra list clusters
❱ kix deploy demo --context kind-demo -v
❱ kix build demo --override-input kixpkgs git+file:///home/me/src/kixpkgs