greptile.json at your repository root. It holds all your settings in one place — strictness, comment types, file ignore patterns, custom rules, context files — and Greptile reads it on every PR.
That works for a single repo with one team. But it doesn’t scale:
- Monorepos with multiple teams can’t express “strict about SQL injection in the database package, lenient about logging in scripts.” Everyone shares one file.
- Ownership conflicts happen when multiple teams need different review rules. They’re all editing the same
greptile.json, and merge conflicts in config are not fun. - No visibility into what rules actually apply to a specific file without mentally resolving the entire config.
.greptile/ folder is the recommended way to configure Greptile. It replaces the single-file approach with a folder you can place in any directory — not just the root. Each team owns their own config. Settings cascade from root to leaf, so child directories inherit from parents and override what they need to.
greptile.json is still supported for backwards compatibility. If both .greptile/ and greptile.json exist in the same directory, .greptile/ takes precedence and greptile.json is ignored. For the legacy format reference, see greptile.json Reference.The Folder Structure
A.greptile/ folder contains up to three files:
greptile.json, so migrating is straightforward. On top of that, config.json adds fields that enable cascading: disabledRules to turn off inherited rules, and id, severity, and enabled on individual rules. See the full schema.
rules.md is plain markdown passed to the reviewer as context, scoped to the directory containing the .greptile/ folder. No special syntax — write headings, lists, code blocks, whatever communicates your rules clearly. See rules.md reference.
files.json points the reviewer to existing files in your repo — database schemas, API specs, architecture docs — so it has the context it needs for useful reviews. See files.json reference.
Cascading Configuration
This is the core concept. When Greptile reviews a file, it walks from the repository root to the file’s directory, collecting every.greptile/ folder along the way, and merges them together.
For a file at packages/api/src/handler.ts, Greptile collects:
How Settings Merge
When a child config sets something the parent already set, Greptile needs to decide which value wins. The short version: settings are overridden, but rules and context are combined. Settings the child overrides — if the child specifies a value, it replaces the parent’s:strictness,model,fileChangeLimit,skipReviewcommentTypes,labels,disabledLabels, and other array fields (the child’s list replaces the parent’s entirely)- Output sections like
summarySection(the child’s fields are merged into the parent’s — a child settingcollapsible: falsewon’t erase the parent’sincluded: true)
- Rules from
config.jsonandrules.md— parent rules + child rules all apply - File references from
files.json— parent files + child files are all included - Instructions — parent and child instructions are concatenated together
strictness value or additional rules specific to that directory.
Disabling Inherited Rules
If a parent defines a rule you don’t want in a specific directory, the child can disable it by referencing itsid.
The parent gives the rule an explicit id:
/.greptile/config.json
disabledRules:
/packages/scripts/.greptile/config.json
no-console applies everywhere except under packages/scripts/. Rules without an id cannot be selectively disabled — if you think a rule might need to be turned off somewhere, give it an ID upfront.
Precedence
The full precedence model, from lowest to highest priority:Monorepo Example
A monorepo with shared root config and a stricter database package:packages/db/src/users.ts gets:
- strictness:
1— overridden by the db config (stricter than root) - triggerOnUpdates:
true— inherited from root (db doesn’t override it) - rules: root rules + db rules, minus
no-console(disabled by db) - files:
docs/architecture.md(root) +prisma/schema.prisma(db)
packages/api/src/handler.ts gets:
- strictness:
2— inherited from root (api has no override) - triggerOnUpdates:
true— inherited from root - rules: root rules + api rules
- files:
docs/architecture.md(root only)
When a PR touches files from different directories with different configs, each file is reviewed using its own resolved config. PR-level settings are merged across all applicable configs:
strictness: uses the maximum value (3if any file has3)fileChangeLimit: uses the minimum value (most restrictive wins)commentTypes: union of all specified typesmodel: all configs must agree, otherwise the system default is used- Output sections (
summarySection, etc.): shown if any config enables them - Boolean settings: OR logic (enabled if any config enables it)
skipReview: only skips if all applicable configs specify"AUTOMATIC"
Getting Started
Create the folder
Create
.greptile/ in your repository root (or any directory you want to configure).Add config.json
Start with your review settings. If you have an existing
greptile.json, you can copy it directly — the fields are the same..greptile/config.json
Add rules (optional)
Write your team’s review rules in Or as structured rules in
rules.md:.greptile/rules.md
config.json if you need scoping, severity, or disable-by-ID: