Configuration
Which file in Kraft's config directory controls what, and how Kraft creates, edits, validates and rereads the directory.
Kraft's configuration is a set of YAML files under $KRAFT_HOME/config/ (default ~/.kraft/config/). This page maps each file to its reference page and says how the directory is created and edited.
Files
| File | What it configures | Created | Page |
|---|---|---|---|
repos.yaml | Connected repos: setup command, env, steering, workspaces, and the sandbox field (Sandboxed workers). | Seeded, empty | repos.yaml |
policy.yaml | Caps, budget, concurrency, archiving, defaults and maxima. | Seeded | policy.yaml |
library.yaml and chains/*.yaml | The templates: reusable components and the chains built from them, copied onto each work item at intake. | Seeded: the default and quick-task chains | Library and chains |
harnesses.yaml | Harness profiles and agent profiles. | Seeded | harnesses.yaml |
access.yaml | Bind address, password, remote access. | The first save in Settings | access.yaml |
intake.yaml | Autonomous pickup of issues, and schedules. | Seeded | intake.yaml |
notify.yaml | The notification webhook. | The first save in Settings | notify.yaml |
theme.yaml | UI appearance. | The first save in Settings | theme.yaml |
sandbox.yaml | Which container CLI runs sandboxed tasks, SELinux, and an extra CA. | You | sandbox.yaml |
detectors.yaml | Your own conventions for the setup and test commands kraft repo connect proposes, layered on the shipped table. | You | detectors.yaml |
harnesses/*.yaml | Your own harness definitions, which add a harness or override a shipped one. | You | Harness definition files |
addons.yaml | The collections this instance knows and the Kraft add-ons installed from them. | kraft admin addon, or you | Add-ons and collections |
addons.lock | The commit, digest and version each installed add-on is pinned to. Not edited by hand. | kraft admin addon | Add-ons and collections |
repo-libraries.lock | The commit and digest each connected repository's repo library was accepted at. Not edited by hand. | kraft repo library | Repo libraries |
How Kraft treats the directory
- Seeding. Kraft copies the shipped defaults into
config/on first run and never overwrites it afterwards, so an upgrade cannot clobber an edited policy. Upgrade your configuration takes what a new release ships inlibrary.yamlandchains/. The files marked "You", "kraft admin addon" or "The first save in Settings" are never seeded. - Editing. The Templates screens edit
library.yamlandchains/. Settings edits the rest, exceptsandbox.yaml,detectors.yaml,harnesses/and the add-on files and locks, which no screen edits. Editing any file by hand is equally supported. - Moving it.
KRAFT_HOMEandKRAFT_CONFIG_DIRmove the directory; see Environment variables. - Validation. Kraft validates each file when it loads it, and reports a file that fails with the offending key named. Chain rules such as
extendsandreject_toare in Chain file keys. - An old directory. Before 2.0, the directory was
templates/; see Upgrade from 1.4. A home still in the 0.x template format (aregistry.yaml, hook names orgate_after) is refused until you runkraft admin update; see Migrating a home from 0.x.
Three commands check and reload the files:
kraft admin doctorreports anything that does not parse.kraft admin reloadrereadspolicy.yaml,library.yamlwith its chains,intake.yaml, andaddons.yamlwithaddons.lock, without a restart. A change toaccess.yaml'sbindorportneeds a restart, and a hand edit ofnotify.yamltakes effect at the next save in Settings or a restart.kraft admin templates lintchecks the whole library and every chain at once, and writes nothing.
In this section
- repos.yaml: every field in
repos.yaml, and the pages for how connect proposes commands,detectors.yamland workspaces. - policy.yaml: every field in
policy.yaml: caps, budget, concurrency, archiving, defaults and maxima. - Library and chains: the sections of
library.yaml, and howchains/*.yamlfiles compose them into chains. - harnesses.yaml: every field in
harnesses.yaml, for harness profiles and agent profiles. - access.yaml: every field in
access.yaml: bind address, port, password, session expiry and allowed hosts. - intake.yaml: every field in
intake.yaml: autonomous pickup from beads, and cron schedules. - notify.yaml: every field in
notify.yaml: the notification webhook and the events that post to it. - theme.yaml: every field in
theme.yaml: colors, density, the diff and the board. - Sandboxed workers: the
sandboxkey ofrepos.yaml, and the pages for the container's resource limits, callbacks, network, credentials, Kits,sandbox.yamland git. - Environment variables: the variables that move this directory, every other variable Kraft reads, and the variables a worker gets.
- Add-ons and collections:
collection.json,addon.json,addons.yamlandaddons.lock, the naming rules, and when an add-on loads, updates and is restored. - Repo libraries: a repository's own
.kraft/library, where it is read from, how a person accepts it, andrepo-libraries.lock.