Skip to main content

Module init

Module init 

Source
Expand description

basil init: first-run scaffolding (basil-p50).

Generates a minimal, valid, least-privilege starter set into a target directory so a new operator can stand up a local broker without hand-authoring JSON/TOML from scratch:

  • catalog.json, one working example key for the chosen backend;
  • policy.json grants only the running uid a narrow signer role over that one key, default-deny everywhere else;
  • basil-agent.toml points at the catalog/policy/bundle/socket it writes;
  • printed next steps: the exact basil bundle create ... command for the chosen unlock method, then check / run / a basil sign round-trip.

init writes configuration/scaffolding only, never secret material. It does NOT create the sealed bundle (that needs interactive unlock material); it PRINTS the bundle-bootstrap command instead. The catalog/policy JSON are produced by serializing the real schema/wire types (Catalog, RawPolicy), so the output is valid by construction and cannot drift from what load parses.

No-clobber: an existing target file is refused unless --force.

Structs§

InitArgs
init subcommand arguments.

Functions§

run
Run basil init: build the scaffolding, refuse to clobber unless --force, write the files, and print the next-steps summary.