prerelease Prerelease stable Latest
Kumoss
prerelease Prerelease stable Latest

How the CLI works

What kumoss init, run, config and the other commands do to your machine, which files they write, and why each generated file looks the way it does.

The kumoss CLI is for local development only. It starts the bundled single-machine Compose stack and is not intended for production use. Nothing it generates is hardened for one: the default config.yaml runs with authentication off, the stack exposes plain HTTP on port 80, the Postgres and object-storage credentials are the ones the bundled Compose file hardcodes, and everything lives under one home directory on one host. For a deployment, see Deploy to production and Deploy with Helm.

The kumoss CLI is a file generator with a wizard in front of it. It does not run a server, keep state in a database, or hold a daemon open. Every command reads and writes files under one managed home and, where it makes sense, hands the result to docker compose.

This page explains what each command does, what the managed home contains, how the generated files are produced, and the decisions behind them. For the hands-on path, see CLI quickstart.

The model

Three ideas explain almost everything the CLI does.

The home is the unit of installation. Everything belongs to one directory, ~/.kumoss by default. Two homes are two independent stacks: their own answers, their own .env files, their own volumes. Each home runs under its own Compose project — kumoss for the default directory, kumoss-<hash> anywhere else — which is what keeps their containers and volumes apart. Point at another with KUMOSS_HOME=<dir>.

The answers are stored in a file as the source of truth. kumoss.yaml records what you told the wizard. Every generated file is derived from it, and every command that checks the stack compares the files back against it. Edit a generated file by hand and kumoss run will notice the drift.

Compose does the running. The CLI never talks to the Docker API directly. It shells out to docker compose, always with an explicit -f list, so a stray docker-compose.override.yml in the directory cannot change the stack under you.

The managed home

Path What it holds

kumoss.yaml

Your answers, 0600. Never holds a secret: credentials live in the .env files, and the file records only that a credential exists, not its value.

src/docker-compose.yml

The stack definition, downloaded from the CLI’s own release tag. Not written by the wizard: it is fetched once and left alone, so a hand edit survives.

src/core/.env

The core’s environment: the LLM provider credentials, Git credentials, the object-storage credentials, the Postgres URL, and both sidecar bearer tokens.

src/services/iac/.env

The IaC sidecar’s environment: its bearer token, the engine choice, and the cloud credentials the engine’s providers read.

src/services/notifications/.env

The notifications sidecar’s environment: its bearer token, the Slack webhook and the log level.

src/services/mapping/.env

The mapping sidecar’s environment: its bearer token, the repository prefix (MAPPING_PREFIX_IDENTIFIER, optional) and the log level.

src/langfuse.env

The Langfuse project key pair, 0600. The wizard does not ask for one, so this file appears only on an install whose kumoss.yaml carries a pair from an earlier release; the same values are mirrored into core/.env. Langfuse provisions a project’s keys on its first start only, so a different pair is copied from its UI.

src/object-storage.env

The bundled RustFS container’s own access and secret keys, 0600. The console is on, so this is always written; the same pair is mirrored into src/core/.env, because the core signs download links with them and RustFS has to accept the signature. Its own file so the storage container is handed those two keys and nothing else the core holds.

config/config.yaml

The core’s configuration, built from the repository’s own config.yaml overlaid with your answers. Mounted read-only over the path the core already reads.

config/config.yaml.example

The repository’s config.yaml verbatim, comments included, kept for reference and for diffing.

compose.override.yml

The override that mounts the generated config.yaml and any cloud credential files into the containers, turns the storage console on and binds it to 127.0.0.1:9001. Holds no secret: the console keys reach the container through src/object-storage.env, since this file is world-readable and the .env files are not.

Where the home comes from

The root resolves in this order, first match wins:

  1. KUMOSS_HOME in the environment.

  2. The persisted pointer, written by a previous init that was pointed elsewhere.

  3. ~/.kumoss.

No command takes a --home flag: one home per user is the supported setup. KUMOSS_HOME is how you pick another, and kumoss uninstall clears the pointer.

The commands

kumoss init

The only command that creates a home. It ensures the directory tree exists, fetches docker-compose.yml at the release tag, runs the wizard, writes every generated file, and offers to start the stack.

Every step is idempotent. Run it again on an existing install and it offers reconfigure or keep. Keep writes nothing, and ask if you want to pull/run the stack with docker.

A reconfigure opens every form on what is installed. The answers kumoss.yaml cannot hold — the Git credentials, the model and storage keys, the engine, the webhook, the cloud secrets — are read back from the .env files first, so a question already answered is answered again by pressing enter, and a field you may leave blank cannot blank a credential that is in use.

Moving around the wizard

The wizard’s questions behave as one long form, so a typo spotted three questions later does not mean starting over.

Key What it does

shift+tab

Back one field. On the first field of a form it opens the previous form.

esc, ctrl+b

Back a whole form, from any field.

enter, tab

Forward, as before.

Going back keeps your answers, including the ones in the form you are leaving, and walking forward again reopens the same forms with them filled in. Change an answer that decides what comes next — the LLM providers, the clouds the engine targets — and the questions after it are rebuilt from the new answer.

Going back also clears the screen, so the reopened form does not stack under the copy you already answered. Going forward does not: the forms you have answered stay visible as a record of what you chose.

Two caveats. Because ctrl+b means back here, it no longer moves the cursor one character left inside a text box; left still does. And where a list supports / filtering, esc clears the open filter instead of leaving the form — press it again to go back.

--dry-run asks the same questions and prints every file a real run would write, without touching the disk - no directory, no file, no container. The output contains real generated tokens, so treat it as a secret.

--foreground keeps the stack attached instead of detaching: logs stream until Ctrl-C, which also stops the stack.

--certs trusts this host’s CA roots inside the core and SearXNG containers, for a machine behind a TLS-inspecting proxy (example a company VPN).

kumoss run

Starts a stack that is already configured, and writes nothing. Before handing anything to compose it runs the same preflight doctor shows, and refuses to start if a check fails, naming the kumoss config <section> that fixes it.

If there are no containers yet, it pulls the images first - the only path that pays for a network pull. If there are, it compares the mtime of each generated file against the container that mounts it and recreates the affected services. Compose compares the service definition, not the bytes of a mounted file, so a plain up -d would keep the old values.

kumoss config <section>

Reopens one wizard section, prefilled from the current files, and applies it. It reads the files already under the home — kumoss.yaml, config.yaml and the four .env files — so it needs no network and works on a stack you have since moved offline. The sections and the containers each one recreates:

Section Recreates

llm

core

git

core

cloud

iac

engine

iac

storage

core, iac, object-storage

notifications

core, notifications

secrets

core, iac, notifications, mapping

Before writing, it shows a diff of the generated files with the secrets masked, and asks for confirmation. docker compose restart would keep the old environment, so the affected containers are recreated rather than restarted. A stopped stack is left stopped: the files are written, nothing is started, and kumoss run brings the containers up with them — it replaces any whose generated file is newer than the container itself.

kumoss config secrets is the only path that rotates the bearer tokens, all three of them: the iac, notifications and mapping pairs. It writes the same value to the core and to the sidecar that validates it, since a mismatch makes the sidecar reject every call, and names the tokens it is about to regenerate — the diff masks their values, and the new ones do not exist yet.

kumoss status

One screen for the running stack:

  • a table from docker compose ps: state, health, uptime and restart count. An empty table means this home holds no stack; a home with no compose file is named as an incomplete install rather than shown as empty;

  • live probes: the core’s /api/v1/auth/config, which proves the API answers rather than merely that the container runs, then each running sidecar’s own health endpoint — /healthz for iac, mapping and notifications, and for langfuse-web the path its own compose healthcheck uses;

  • the Kumoss tag the stack was built from, and the optional pieces init left unset;

  • pending recreates: any generated file whose mtime is newer than the container that mounts it, so a change made by hand is visibly not live yet.

kumoss doctor

Checks what the stack needs from the machine, then the generated files:

Check What it means

docker

The binary is on PATH. Its version is shown when it answers.

docker compose

Compose v2 or newer. v1 lacks the flags run and status pass. Newer majors are accepted, not just 2.

docker daemon

The engine answers. A missing binary and a stopped daemon are different failures, so they get different lines.

home

The root is writable, since init writes every generated file there. A root that does not exist yet is reported, not created.

generated files

The same preflight run makes: the answers in kumoss.yaml must be present and identical in config.yaml and the .env files, and the credentials the configured provider and clouds need must be filled in. Skipped when there is no install yet.

doctor only reads. It creates nothing, so a home that does not exist yet leaves no empty directory behind. Writability is read from permission bits rather than tested with a probe write, which means a read-only mount or an ACL that denies the write is only discovered by init.

Every check is printed, so one failure never hides the rest, and the command exits non-zero if any failed.

kumoss logs

docker compose logs against the managed home. With no service it shows every container; -f follows and --since limits how far back to read. Run kumoss logs <service_name> to show only the logs for this container.

kumoss home

Shows the resolved root and why it resolved that way. It takes no flags: kumoss uninstall clears the persisted pointer and falls back to the default.

kumoss uninstall

Stops the stack with docker compose down -v, which deletes the data volumes, then removes the home and the pointer. The binary and the pulled images are left alone. --purge skips the confirmation.

uninstall deletes the workspaces volume. Any Terraform state the stack holds locally goes with it.

How the generated files are produced

The key set comes from the repository

kumoss init does not hardcode the variables. It fetches the four env.sample files at the release tag and uses their uncommented keys as the key set for the generated files. A variable added to the repository therefore reaches the generated files without a new CLI release.

Provider credentials are the exception: core/env.sample lists them only as commented examples, so a key the wizard collected is appended even when the sample does not mention it. Otherwise every VERTEXAI_* or ANTHROPIC_* variable would be dropped.

If the fetch fails, init falls back to a built-in key list and warns. That list mirrors the samples at the time of writing and can lag them, so a warning here is worth acting on.

kumoss config <section> does not fetch anything: the install is already on disk, so it takes the key set from the .env files it finds there. It needs no network, and a key you added by hand survives the edit.

Each file holds only its own keys

A variable belongs to the container that reads it. A cloud credential in the notifications file would hand that container a secret it never uses.

File Carries

core/.env

LLM provider credentials, GIT_USER and GIT_TOKEN, the object-storage credentials, KUMOSS_SQL_DATABASE_URL, the mapping and authz tokens, and both sidecar bearer tokens.

services/iac/.env

KUMOSS_IAC_TOKEN, IAC_BINARY, the cloud variables for the picked clouds, and any backend credentials.

services/notifications/.env

KUMOSS_NOTIFICATIONS_TOKEN, SLACK_WEBHOOK_URL and LOG_LEVEL.

services/mapping/.env

KUMOSS_MAPPING_TOKEN, MAPPING_PREFIX_IDENTIFIER and LOG_LEVEL.

The bearer tokens are the one deliberate overlap: each appears in core/.env and in the sidecar that validates it, and the two values must match exactly.

A credential file is mounted, never copied

A cloud credential that lives in a file — the Google Cloud service-account key, the OCI config, a kubeconfig — stays on the host. compose.override.yml bind-mounts it read-only into the iac container under /etc/kumoss/creds/, and services/iac/.env carries only the path it landed on. The contents are never copied into a generated file.

The path you type is resolved before it is mounted: ~ and $HOME are the shell’s, and a compose volume source gets no shell, so the wizard expands them, makes the path absolute, and records the result in kumoss.yaml. A path with no file behind it would make Docker create an empty directory and mount that, so the wizard refuses one — and refuses a file the container could not read, since iac runs as uid 10001 and a key readable only by its owner needs a chmod o+r on the host.

The exceptions are the credentials that are not files. A Google Cloud key pasted inline is written to services/iac/.env as GOOGLE_CREDENTIALS, compacted onto one line, and nothing is mounted. AWS static access keys are written the same way. The AWS named-profile method, which mounts the host’s ~/.aws, is not offered by the wizard yet: an IAM Identity Center profile resolves its access token from a cache under the container’s own home, a path no AWS_* variable can move, so the profile would be read and then fail to authenticate.

Secrets are generated once

The core-to-sidecar bearer tokens are 32 random bytes, hex-encoded, generated on the first write. A reconfigure never rotates one: the pair only has to match between the core and the sidecar that validates it, which reusing the installed value guarantees, and rotating breaks any other client holding the old one. Regenerating is asked for deliberately, in kumoss config secrets.

The Postgres password and the RustFS keys are not generated: the bundled Compose file hardcodes them, so a random value could never match the containers.

Sample placeholders never reach a fresh install. env.sample ships dev-iac-token and dev-notifications-token as convenience values; the wizard writes generated tokens instead, and writes an empty value rather than the placeholder for a secret you left blank.

An empty value is not a missing one

Compose reads KEY= and an absent KEY differently, and several variables use that distinction: a blank STORAGE_ACCOUNT_KEY means "use the default credential chain", while a present one is sent to the cloud as a static key. The renderer therefore writes every key it decided on, blank included, and never drops a line because its value is empty.

config.yaml is overlaid, not replaced

config.yaml is read, the wizard’s answers are written into the keys it owns, and the result is written back. Every key it does not own keeps the value it already has: OIDC, the bootstrap administrator, the authorization sidecar, llm.model_list and the rest stay hand-edited. services.mapping.enabled is the one key of a sidecar the CLI writes: the wizard no longer asks, so a first install writes false and every later run writes back what the file already says — turn the sidecar on there and it stays on.

On an existing install both init (reconfigure) and config <section> read the config.yaml you actually run, never the shipped default, so a key you edited by hand survives a section edit. A fresh install has no file yet and starts from the repository’s copy, kept verbatim at config.yaml.example for its comments. Because the overlay is seeded from the live file, an edit to the wizard’s own keys is the only thing a section change rewrites — including oidc.issuer_url, whose blank value turns authentication off.

That is also why the generated file is bind-mounted over the path the core already reads, rather than baked into the image: a change needs a container recreate, never a rebuild.

Writes are atomic

Every generated file is written to a temporary file in the same directory and renamed over the target. A crash mid-write therefore cannot truncate the .env that holds the only copy of the stack’s tokens. Files that hold secrets are written 0600.

What the checks compare

kumoss run and kumoss doctor share one preflight. It fails when:

  • a required file is missing - the compose file, the override, config.yaml, core/.env or services/iac/.env, plus the notifications env when that service is enabled;

  • a value recorded in kumoss.yaml is absent from, or different in, config.yaml or the .env files;

  • a credential a configured LLM provider needs is blank in core/.env;

  • a cloud variable differs from what kumoss.yaml records;

  • a bearer token is blank on either side, or differs between the core and its sidecar.

Secrets are compared for presence, never printed. Each problem names the command that fixes it.

Reconfiguring and the container lifecycle

The CLI distinguishes three things that look similar. Of the three, it uses only the middle one (Recreate).

Restart keeps the container and its environment. The CLI never issues one: it is never enough after a generated file changes, because compose does not reload a mounted file or an env_file on restart.

Recreate replaces the container so it picks up the new environment or mount. Both commands that apply a change end in docker compose up -d, and the difference between them is how much gets replaced:

  • kumoss config <section> replaces the services that read the section, and widens to core, iac and notifications when the answers it edited also change a container definition — the override’s mounts, or the engine binary. Anything narrower would be a no-op: compose keeps a container whose definition it considers unchanged.

  • kumoss run replaces the whole stack once any generated file is newer than the container that mounts it. It compares modification times against the containers' creation time, then forces the recreate. It is all-or-nothing, not per-service.

Rebuild is never done by the CLI. There is no docker compose build in it at all. The generated config.yaml is mounted over the path the core already reads, so a configuration change needs a container replace rather than an image build; and the images themselves are pulled prebuilt with docker compose pull --policy missing, which fetches only what is absent.

What the CLI does not do

Being explicit about the boundary is part of the design:

  • It does not produce a production deployment. The CLI is for local development: one host, the bundled Compose stack, the defaults that make it convenient. It writes no TLS, no ingress, no secret manager integration, no backup or retention policy and no scaling configuration, and the generated files are not reviewed for any of them. Turning the stack it starts into a deployment is the work of Deploy to production, not of this tool.

  • It does not edit the parts of config.yaml it does not own. Authentication, roles, llm.model_list routing and the authorization sidecar stay hand-edited.

  • It does not manage Kubernetes. For that, see Deploy with Helm.

  • It does not keep a daemon, a cache or a database of its own. Deleting the home removes everything it created.

  • It does not validate credentials against the providers. A wrong key is found when the stack first calls the provider, not by the wizard.

Troubleshooting

kumoss doctor first: it turns most "it will not start" into a named line.

Then, in order:

  1. Which binary ran? which kumoss && kumoss version - a source build reports dev.

  2. Which home? kumoss home - KUMOSS_HOME outranks a persisted pointer.

  3. Do the files agree? kumoss run names the drift without writing or starting anything.

  4. What would it write? kumoss init --dry-run - no side effects.

  5. What does compose think? docker compose -f src/docker-compose.yml -f compose.override.yml config from the home root is the only reliable answer to "is my mount there?".

For the rest of the day-2 picture, see Deploy to production.