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 | Harness profiles and Agent profiles |
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 |
update.yaml | Automatic updates, restarting when Kraft is free, and the hours Kraft may do either in. Added in 2.3 | The first save in Settings | update.yaml |
workers.yaml | The machines that may run work item steps, and how each connects. Added in 2.4 | kraft admin worker, or you | workers.yaml |
forges.yaml | Named forge accounts: a host's forge and web address, so connect stops asking. Added in 2.5 | kraft admin forge, or you | forges.yaml |
machine.yaml | On a machine, not the server: how many steps that machine runs at once. Added in 2.4 | You | The machine's own limit |
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 can't clobber an edited policy. Kraft's own chains and library are the built-in add-onkraft-default, not seeded files: a new home'sdefaultandquick-taskextend it. Move onto kraft-default moves an older home's copies onto it. 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. An older home has
templates/in its place; see Coming 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 doesn't parse.kraft admin reloadrereadspolicy.yaml,library.yamlwith its chains,intake.yaml,workers.yaml,forges.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. - 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: colours, 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. - update.yaml: every field in
update.yaml: automatic updates, restarting when Kraft is free, the channel and the allowed hours. - workers.yaml: every field in
workers.yaml: the machines that may run steps, how each connects, and why one is offline. - forges.yaml: every field in
forges.yaml: the named forge accounts, and which one a repo uses.
Related
- Agent harnesses: the fields of
harnesses.yaml, for harness profiles and agent profiles, and the harnesses they configure.