{{ theme.skipToContentLabel || 'Skip to content' }}

Configuration ​

Configuration is TOML. Every key has a default; most repositories need only what kontext init writes.

Layers ​

Later layers win. Tables are merged key by key; arrays are replaced.

#FileScopeAdapters
1built-in defaults——
2~/.config/kontext/config.tomlyou, every repositorytrusted
3~/.config/kontext/repos/<slug>.tomlyou, one repository (slug from kontext status)trusted
4<repo>/.kontext.toml or <repo>/<store.dir>/kontext.toml (default .ai/kontext.toml)the team (committed)only after kontext trust
5<git-common-dir>/kontext/config.tomlthis clonetrusted

The user directory is $KONTEXT_CONFIG_DIR, else $XDG_CONFIG_HOME/kontext, else ~/.config/kontext. kontext status lists the layers that were loaded.

[project] ​

KeyDefault
nameset by kontext init from the root manifest; otherwise the remote's repository nameshown in the brief; {{project.name}} in templates
description

[store] ​

KeyDefault
dir.aithe store directory
stylefrontmatterfrontmatter or fields for new entries
index_filetruemaintain <dir>/README.md
max_body_lines80warn above this many non-empty body lines (0 = off)

[store.kinds.<kind>] ​

KeyDefault
dirdecisions, conventions, learnings, incidents, architecturerelative to store.dir
pathrelative to the repository root; wins over dir (e.g. docs/adr)
stylestore.style
numberingdate for decisions, none otherwisedate, sequential, none
trailerDecision, Convention, Learning, Incidentcommit trailer key; none for architecture

Custom kinds work too — add a table with a dir.

[sources] ​

Documents indexed besides the store.

KeyDefault
include["/*.md", "**/README.md", "**/AGENTS.md", "**/CLAUDE.md", "docs/**/*.md", "doc/**/*.md", "adr/**/*.md"]
exclude["**/node_modules/**", "**/CHANGELOG.md", "**/vendor/**", "**/fixtures/**", "**/testdata/**", "**/.github/ISSUE_TEMPLATE/**"]
max_bytes300000

Globs follow git conventions: a pattern without / matches at any depth, a leading / anchors it, ** crosses directories, {a,b} alternatives.

[index] ​

KeyDefault
commitstrueindex commit history
max_commits5000how far back

[brief] ​

KeyDefault
budget_tokens1400
max_decisions12
max_modules14

[capture] ​

KeyDefault
default_visibilityteamteam or private
redacttrueredact secrets in captures

[hooks] ​

KeyDefault
validatetruevalidate staged entries in pre-commit
trailerstrueadd trailers in prepare-commit-msg
remind_inboxtruemention inbox candidates touching staged paths

[secrets] ​

KeyDefault
scanstorestore (knowledge files), staged (every staged text file) or off
allow[]regexes of lines to ignore

[init] ​

KeyDefault
max_module_docs40module documents to write
min_module_files3code files for an inferred module
exclude[]extra globs to skip
history_max_commits3000commits to mine
max_decision_tasks20dec: tasks
task_max_files12key files per module task
task_inline_chars24000attached source per autopilot task
jobs2autopilot parallelism (also --jobs)
llmdefault autopilot adapter

[vars] ​

Global template variables, available to every adapter as {{vars.<name>}} (adapter vars override them).

[adapters.<name>] ​

See Configuring adapters.

Example: a repository with existing ADRs ​

toml
[project]
name = "shop"

[store]
dir = ".ai"

[store.kinds.decision]
path = "docs/adr"
style = "fields"
numbering = "sequential"
trailer = "Decision"

[sources]
include = ["/*.md", "**/README.md", "docs/**/*.md", "handbook/**/*.md"]

[init]
exclude = ["legacy/**"]

Released under the MIT or Apache-2.0 license.