- A single source of truth for review behavior across many repositories.
- Code-review-as-code: history, PR review, rollback, CI validation.
- Consistent Kody Rules (review rules and memories) across the whole organization.
- CLI-driven or CI-driven configuration changes.
How It Works
- Choose one repository to hold your centralized config. It has to be one of the repositories selected in Kodus.
- Enable Centralized Config in the UI (Code review → General at Global scope → Configure centralized config) and point it at that repository.
- Pick an initial sync mode:
pr— Kodus opens the initialization PR with your current effective settings and rules.manual— Kodus generates the files; your team downloads and opens the PR.
- After the first merge, every future merge on the centralized repository automatically propagates changes to Kodus.
Repository Layout
The centralized repository uses folder paths to map files to scopes. The layout covers both review settings (kodus-config.yml) and Kody Rules (.kody-rules/).
The repository name is arbitrary — pick whatever fits your organization.
kodus-config is used below as a convention.- A
kodus-config.ymlat the root of the centralized repo applies globally. - A top-level folder named after a Kodus repository (for example
backend-api/) scopes its files to that repository. On GitLab the name is the full path, so the folder is nested:group/project/. - A directory scope is one folder inside the repository folder, named after the paths it covers. Write each
/as%2Fand join several paths with&:src%2Fauth, orapps%2Fweb&apps%2Fdocsfor a scope with two folders. A deeper nested path, such asbackend-api/src/auth/, is skipped. - Rules under
.kody-rules/review/become review rules; rules under.kody-rules/memories/become memories.
kodus-config.yml that an earlier sync applied clears that scope’s settings.
Config Files
Eachkodus-config.yml uses the same schema as the per-repo kodus-config.yml documented in General settings. Fields are applied at the level of the folder where the file lives and follow the usual inheritance rules (see Config Inheritance & Overrides). Unlike a repository’s own file, these files can also carry customMessages (see Custom Messages).
Custom agents, and the skills and docs linked to them, are not part of Centralized Config. They are configured in the app, and customAgents and knowledge keys in these files are ignored.
Minimal example:
Kody Rules Files
Each rule is a single.yml or .yaml file under .kody-rules/review/ (standard rules) or .kody-rules/memories/ (memories). The filename is arbitrary, but Kodus ties a rule to its file path: renaming or moving a file deletes the old rule and creates a new one on the next sync. title and rule are required; a file that is missing them or fails validation is skipped, the sync reports the failure, and it does not delete removed rules until the file is fixed.
Example review rule (.kody-rules/review/require-tests-for-endpoints.yml):
enabled: false.
See Kody Rules Overview for the full field reference and Rule Inheritance for how inheritance.inheritable, exclude, and include behave.
UI Workflow
In the sidebar, pick Global in the scope picker at the top of the Code review group, then open Code review → General:- Click Configure centralized config in the page header (opens the Centralized Config dialog).
- Turn on Enable centralized config.
- Select the source repository (Selected repository).
- Pick the Initial Sync Method:
- Automatic (Create PR now)
- Manual (Sync later)
- Click Initialize and confirm the status.
- Sync Now applies the current contents of the centralized repository.
- Download saves the configuration bundle (see below).
- Save Changes saves what you changed in the dialog, for example turning Enable centralized config off.
Web UI Behavior When Enabled
The centralized repository is the source of truth. The web UI reflects this:- Code review settings at Global, repository and directory scope stay editable in the web UI. Each page shows a banner — “Centralized config is enabled. Changes on this page are saved immediately and proposed through pull requests in the
<repo>repository. Synchronization reapplies the configuration from that repository.” — with View active pull request when one is open. Save settings applies the change in Kodus right away and opens a pull request with the same change on the centralized repository. If that pull request is closed without merging, the next sync restores the repository’s version over the saved setting. Further changes made while that pull request is open are added to it. You can also edit the files in the centralized repository directly. - Kody Rules work differently. Creating or editing a rule does not change it directly: Kodus opens a pull request on the centralized repository with the proposed change, and the change becomes active once the pull request is merged.
UI rules and repo rules coexist
Enabling Centralized Config does not wipe rules that were created in the web UI before, and the repository does not have to contain them. Both sources feed the same pool of active rules:- Rules imported from the centralized repository are persisted with status
SYNCED. - Rules created in the web UI before you enabled it live alongside them and stay active.
- At review time, Kodus loads every active rule from the database regardless of origin. A rule that exists only in the UI is applied exactly like a rule that exists only in the repo.
- Rules in status
PENDING_ADD(created through the UI/CLI, or exported byinit, with a PR not yet merged) are excluded from reviews until the PR is merged and the status transitions toSYNCED. The Kody Rules list showsPENDING_ADD,PENDING_EDITandPENDING_DELETEas Pending add, Pending edit and Pending delete. initwith theprmethod puts every existing rule that has no file yet in the initialization PR and marks itPENDING_ADD, so those rules do not run in reviews until that PR is merged.
init so Kodus bundles every existing rule into the initialization PR. Do not copy a rule’s file into the repository by hand while the UI rule still exists: sync matches rules by file path, so the file becomes a second rule with the same title.
Sync States
Each rule that comes from Centralized Config tracks its lifecycle through a status:PENDING_ADD and PENDING_EDIT become SYNCED once the corresponding PR is merged; a PENDING_DELETE rule is deleted. If Kodus’s open pull request is closed without merging, a proposed new rule is rejected and a proposed edit or deletion is dropped.
Sync Modes
- PR (default)
- Manual
Kodus opens the initialization pull request automatically with your
current effective settings and rules.
Download Configuration Bundle
Click Download in the Centralized Config dialog to get a ZIP containing the generatedkodus-config.yml files and .kody-rules/ tree that reflect your current settings and rules.
Use this when:
- Auditing generated configuration.
- Sharing setup artifacts with another team.
- Keeping a local backup before a rollout.
- Bootstrapping the centralized repository in
manualmode.
Disable Centralized Config
Disabling Centralized Config clears the selected source repository and returns all repositories to the standard non-centralized behavior (settings edited in the web UI, optional per-repokodus-config.yml).
Rules and settings that were synced in remain in Kodus — they are not deleted on disable.
CLI
Use these commands to manage Centralized Config from terminal workflows and CI scripts.Requirements
- A team key with Allow repository configuration via CLI turned on (Organization → CLI keys → Configure).
- At least one selected repository in Kodus.
KODUS_TEAM_KEY in the environment where you run the CLI.
Check Status
Initialize Centralized Config
--sync-optiondefaults topr.- Use
.for the repository of the current directory. - If the repository is omitted in an interactive terminal, the CLI prompts for selection.
- In non-interactive environments, the repository must be provided.
Run Sync
Disable Centralized Config
Download Config ZIP
--outis required.- Output is a ZIP bundle containing the generated config files and
.kody-rules/tree.
JSON Output
All centralized commands support structured output with--json.