kq init
Makes a repository in path, or in the current directory when none is given, creating the folder if it does not exist. The repository is named after the folder, and it builds as it stands: kq validate and, with the Portal package, kq portal:build pass on it straight away.
kq init [options] [<path>]
Arguments
| Argument | Is |
|---|---|
[<path>] | The folder to make the repository in, created if missing. Default: the current directory. |
Options
| Option | Does |
|---|---|
--no-agents | Leave out AGENTS.md, CLAUDE.md and .github/copilot-instructions.md. |
Environment
| Variable | Does |
|---|---|
KANONIQ_TELEMETRY | off, 0 or false stops kq reporting the run; so does DO_NOT_TRACK=1. |
Exit codes
| Code | Means |
|---|---|
0 | Done |
1 | Failed: the model has an error, a check found a change, or a file could not be read or written |
2 | Usage error: an unknown command or option, a missing or extra argument, a path that does not exist, or an output folder kq will not clear |
kq init my-model
It writes:
kanoniq.repository.json, holding the repository'sid, a new UUID that stays the repository's for good, so leave it as it is. It holds the two end-of-support settings,"end-of-support-warning": "12m"and"end-of-support-error": "6m": how many months before a vendor's support or a contract ends an element is a warning, and an error (Writing the life cycle). Left out, the warning is12mand there is no error. It holds"confidentiality-levels": ["public", "internal", "confidential", "restricted"], the levels a domain object'sconfidentialityis one of, least sensitive first: change them to your organization's own (Domain object). It holds"residencies"witheea, the European Economic Area's 30 countries on one line and noadequatelist, so no residency is a transfer regime until you state the countries adequate for it (Settings). It also holds apoliciesblock that starts the repository on both recommended baselines,"preset": { "model": "baseline-model-recommended", "architecture": "baseline-architecture-recommended" }, and"hygiene": "warn"with"hygiene-checks": { "KP001": "info" }, so a baseline policy your model has nothing for yet reports as information, not as a warning, and the other checks on your own policies warn; every other key is at its default. See Governance. Last, it declares three properties:brand, Kanoniq's own, with an emptyvalueslist for your brands, under the comment "Which brand or brands an application, a website or a customer population belongs to."; thenpcffor an element's ID in APQC's Process Classification Framework andbianfor the name BIAN's Service Landscape gives it, each under a comment saying what it is and linking its source; delete or rename them as you like. The file is JSON with comments://and/* … */are allowed, a trailing comma is not.how-to-use-kanoniq.md, a short guide to the repository: what it holds, the commands, the three properties and where the sources ofpcfandbianare, and a link to this documentation. It is yours to edit; where a file of that name is already in the folder, it is left as it is.AGENTS.md, the authoring brief: what an AI assistant needs to write and change the model, assembled for the version ofkqthat wrote it. Beside it,CLAUDE.mdand.github/copilot-instructions.mdpoint Claude Code and GitHub Copilot at it. Each of the three is left as it is where a file of that name is already in the folder, and--no-agentsleaves all three out.model/my-model.kq, declaring one Ecosystem:ecosystem my-model "my-model". Its Code is the folder's name in lowercase, with a hyphen for each run of other characters than letters and digits, soMy Landscape_2givesmy-landscape-2; its name is the folder's name as it is. Rename it, or add more Ecosystems, as you model.model/my-model.g.kq, the generated file holding that Ecosystem's Id.portal/Home.page.yml, the home page of the portal, titled after the repository, with a one-line description and no tiles..gitignore, holding*.model.json. If one exists, the line is added to it unless it is there.
It writes nothing, and says why, where a kanoniq.repository.json is already in the folder, in a folder above it or in a folder below it (folders starting with . and node_modules are skipped), or where model/ or portal/ already exists. A repository never holds another. It refuses too where the folder's name gives no Code: one with no letter or digit, or a reserved one such as domains. Write your .kq files under model/.
© 2026 Extenza Works. All rights reserved.