
A repository is rarely worth reading in full. Infrastructure definitions, vendored dependencies, generated clients, test data with real customer names: none of it makes the AI better, and some of it you'd rather Gleap never held. You can put any path off limits, and excluded files are never downloaded.
In Gleap, per repository. Quickest, and nobody needs commit access.
In the repository, in a file, so the rules are versioned with the code and change when the code does.
Both apply at once. Where they disagree, Gleap's setting wins: a rule set in the dashboard can't be undone by a commit.
Open Settings → Apps and open the GitHub connection.
Open the repository. You can also reach it through Knowledge → Code repositories or an agent’s Code settings.
Under What Kai reads → Hidden from Kai, enter one path per line in .gitignore syntax.
Move focus out of the field to save, then check the saved state.

The current repository screen shares these exclusions across the agents shown in Used by. Older provider screens may instead show Edit → Excluded paths with a Save button. Review the connected agents before changing a shared repository.
Dashboard entries only ever exclude. A pattern starting with ! is treated as a plain exclusion, so the dashboard can't widen access.
Commit a .gleap/config.yaml to the root of the repository:
version: 1
# Off limits everywhere.
ignore:
- "infra/**"
- "**/*.env"
index:
# Only kept out of what the AI answers from.
ignore:
- "**/__fixtures__/**"
code:
# Only kept out of Kai Code sessions.
ignore:
- "scripts/deploy/**"The split exists because the two uses differ. Test fixtures are noise in an answer but useful to a coding agent, so they belong under index, not at the top. Anything truly sensitive belongs at the top, where it applies to everything.
If a list of paths is all you need, a .gleapignore file at the root works on its own, one pattern per line. Gleap only reads it when there's no .gleap/config.yaml.
Patterns work exactly like a .gitignore, so anything your team already writes there behaves the same here:
ignore:
- "secrets/" # the folder, wherever it appears
- "**/*.env" # every .env file, including at the root
- "packages/vendor/**" # everything under one package
- "!packages/vendor/README.md" # …except this one fileOne YAML quirk to watch: patterns that start with ! or * must be quoted, or the file won't load. Each list can hold up to 500 patterns.
An excluded file is never downloaded: not to build knowledge, not to answer a question, not into a Kai Code session. Gleap knows which paths the repository contains, but the contents of excluded files stay with you.
Exclusions also apply backwards. If something was already indexed from a file you've now excluded, the next index clears out what was derived from it.
index list for everything you exclude only to cut noise.The same file can carry context the code can't give: what the repository is for, who the documentation is for, which parts are dead. Up to 4,000 characters:
index:
instructions: |
This is the customer-facing dashboard.
Document the admin area only. Everything under legacy/ ships to nobody.A few sentences here are worth more than they look. Naming and intent are the two things reading source code won't tell you.