Skip to main content

Module init

Module init 

Source
Expand description

lean-ctx gateway init (enterprise#47) — plug-and-play gateway setup.

One command produces a complete, immediately runnable instance directory:

<dir>/config.toml         engine config (bind, tokens required, org, baseline)
<dir>/gateway-keys.toml   per-person keys (only if --person given)
<dir>/.env                generated secrets (tokens, Postgres password, DATABASE_URL)
<dir>/docker-compose.yml  gateway + Postgres 17, healthchecks, restart policies
<dir>/README.md           the 3-step quickstart for this instance

Security posture: secrets live only in .env (0600, gitignored by the generated .gitignore); config.toml and the compose file are clean and committable. Existing files are never overwritten — rerunning on a non-empty directory fails loudly instead of rotating live credentials.

Structs§

InitOptions
Options for gateway init (parsed by the CLI layer).
InitOutcome
Result summary: what was created, which plaintext keys to hand out.

Functions§

run
Runs the init: creates the directory and all files. See module docs.