Part VI · CLI · Plate 01
cns init
Listing 6.1.1 Synopsis
cns init [--domain <slug>] [--archetype <arch>] [--yes] [--isolated-engram]Description
Bootstrap the current repository with the four CNS substrates. --isolated-engram creates a worktree-local .engram/engram.db (never copies global memory). An existing local DB auto-binds ENGRAM_DB_PATH for every subcommand, overriding inherited ENGRAM_DB_PATH. Without a local DB the inherited path/shared default is unchanged.
Prerequisites
Install the organ binaries first. Run from the target Git repository. The Homebrew package and the Linux release archive include the resources cns uses (the OTE template and the harness files); cns finds them next to itself. THALAMUS_URL is optional and has no default; unset means local-only retrieval. Repositories with soma.toml require an installed Python 3.11+ (tomllib) for concern-path lookup. Unreadable configuration refuses gate evaluation.
Actions
- Check Thalamus at THALAMUS_URL (unset:
not configured). - Detect source languages with
axon setupand offer enrichment installation. --yes explicitly accepts all repository-local server installs; noninteractive init without --yes reports proposals without installing them. Accepted enrichment runs on every index, without a file-count cap. Build.axon/axon.dbwithaxon index. Embed high-fan-in anchors withaxon anchors embedonly when THALAMUS_URL or AXON_EMBED_URL is set; otherwise reportembed: not configured. - Scaffold Git-tracked
docs/soma/{README.md,concerns/}and render the Git-excluded.soma/operational map. - Provision
.engram/ote.tomlwith retrieval endpoints derived from THALAMUS_URL. Models default todefault; override with CNS_EMBED_MODEL / CNS_RERANK_MODEL. Unset: a local-only seat, no remote provider. Template URLs are never copied; an existing OTE is never rewritten. Runengram doctorfor dense-vector backfill. - Chain post-commit, post-checkout and post-merge in Git's effective hooks directory
(including Husky), preserving existing hooks; add local Git exclusions
for
.axon/,.soma/,.engram/and.cns/. Hook opt-in is stored in Git's common directory, not a shared hooks directory. Re-run init when upgrading from hooks installed without that opt-in marker.