Skip to main content
Version: 0.4.1

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

ArgumentIs
[<path>]The folder to make the repository in, created if missing. Default: the current directory.

Options

OptionDoes
--no-agentsLeave out AGENTS.md, CLAUDE.md and .github/copilot-instructions.md.

Environment

VariableDoes
KANONIQ_TELEMETRYoff, 0 or false stops kq reporting the run; so does DO_NOT_TRACK=1.

Exit codes

CodeMeans
0Done
1Failed: the model has an error, a check found a change, or a file could not be read or written
2Usage 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's id, 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 is 12m and there is no error. It holds "confidentiality-levels": ["public", "internal", "confidential", "restricted"], the levels a domain object's confidentiality is one of, least sensitive first: change them to your organization's own (Domain object). It holds "residencies" with eea, the European Economic Area's 30 countries on one line and no adequate list, so no residency is a transfer regime until you state the countries adequate for it (Settings). It also holds a policies block 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 empty values list for your brands, under the comment "Which brand or brands an application, a website or a customer population belongs to."; then pcf for an element's ID in APQC's Process Classification Framework and bian for 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 of pcf and bian are, 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 of kq that wrote it. Beside it, CLAUDE.md and .github/copilot-instructions.md point 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-agents leaves 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, so My Landscape_2 gives my-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.