# Configuration

The store's settings: the `tkt config` commands and the table of keys.

## Workspace config

`tkt config list` (values and source: `file` / `default`), `tkt config get <key>` (a default prints with `(default)`), `tkt config set <key> <value>`, `tkt config unset <key>`; all take `--json` ([the keys](#ref-config)).

- `set` reads the value as YAML (`4000` is a number), checks it with its reader's rule and changes only that key's line; a bad value writes nothing.
- An unknown key is `ERR_CONFIG_KEY_UNKNOWN` (did-you-mean); `workspace`, `schemaVersion`, `idScheme` are read-only: `ERR_FIELD_READ_ONLY`.

### Details

After `unset` the default applies again. REST (store API, `GET/PATCH /v1/workspace/config`): e.g. `PATCH /v1/workspace/config` `{"bundleTokenBudget": 4000}`; `null` unsets a key, all or nothing (a 422 writes nothing).

Examples: `tkt config set bundleTokenBudget 4000`, `tkt config get bundleTokenBudget`, `tkt config unset bundleTokenBudget`.

## Config keys

The known keys of `.aitodo/config.yaml` with their defaults (`tkt config list|get|set|unset`).

### Keys

| key | default | read-only because | meaning | home |
|---|---|---|---|---|
| `workspace` | `null` | it names the workspace; `tkt init` sets it | The store's name |  |
| `schemaVersion` | `3` | it records the level of the store's data; `tkt init` writes it, `tkt reorg` raises it | The level of the store's data; `tkt doctor` names an older store (`tkt reorg`) |  |
| `idScheme` | `"PREFIX-NNN"` | every existing ticket id was minted with it | How ticket ids are formed: the group prefix and a number |  |
| `bundleTokenBudget` | `3000` |  | The Context Bundle's token budget for every read of this store | [The bundle budget](/en/docs/concepts/budget.md#context-budget) |
| `mentionPatterns` | `[]` |  | Patterns that turn a body word into a doc ref (`{pattern, doc}` items) | [Mentions in the body](/en/docs/concepts/refs.md#context-mentions) |
| `decisionPrefix` | `"D"` |  | The prefix of decision ids (`D63`) | [Decisions](/en/docs/concepts/decisions.md#context-decisions) |
| `idRangeMax` | `50` |  | The most ids an id range (`D18-D21`, `SG-4..SG-9`) names; a wider one names only its two ends | [Decisions](/en/docs/concepts/decisions.md#context-decisions) |
| `staleHighValueDays` | `14` |  | Days after which an open high-value ticket counts as stale in `tkt report release` | [Value and release reports, release notes](/en/docs/guides/plan/reports.md#plan-reports) |
| `lowValueCloseDays` | `90` |  | Days after which an open low-value ticket is a close candidate in `tkt report release` | [Value and release reports, release notes](/en/docs/guides/plan/reports.md#plan-reports) |
| `untouchedDays` | `90` |  | Days after which an unanchored doc or gotcha counts as untouched in `tkt doctor` and `tkt review --unanchored` | [\`tkt doctor\`](/en/docs/guides/maintenance/doctor.md#maint-doctor) |
| `completenessWeights` | `null` |  | Completeness weights (item: weight) | [Completeness: the checklist](/en/docs/concepts/reviews.md#context-completeness) |
| `automation` | `null` |  | Automatic workflows: auto or suggest | [Completeness: the checklist](/en/docs/concepts/reviews.md#context-completeness) |
| `sharedCounter` | `true` |  | Every worktree of the repo shares one id counter | [Parallel worktrees](/en/docs/guides/team/worktrees.md#team-worktrees) |
| `parallelRiskPaths` | `["**/migrations/**", "**/schema*"]` |  | Path globs `tkt plan parallel` treats as a risk when two tickets touch them | [What can run in parallel](/en/docs/guides/team/worktrees.md#plan-parallel) |
| `worktreeBranch` | `"feat/{id}-{slug}"` |  | The branch name template of `tkt worktree new` | [Parallel worktrees](/en/docs/guides/team/worktrees.md#team-worktrees) |
| `worktreeDir` | `"../{repo}-{id}"` |  | The directory template of `tkt worktree new` | [Parallel worktrees](/en/docs/guides/team/worktrees.md#team-worktrees) |
| `worktreeSetup` | `null` |  | A command `tkt worktree new` runs in the new worktree | [Parallel worktrees](/en/docs/guides/team/worktrees.md#team-worktrees) |
| `planMethod` | `null` |  | The default decomposition method of `tkt plan begin` | [Decomposition methods](/en/docs/guides/plan/methods.md#plan-methods) |
| `focus` | `null` |  | The project focus: the milestone, epic or release `tkt next` stays inside | [The project focus](/en/docs/concepts/focus.md#plan-focus) |
| `releaseVersionPattern` | `"default"` |  | The version form of a release: `default` or `semver` (X.Y.Z, X.Y.Z-rc.N) | [Planning releases](/en/docs/guides/plan/releases.md#plan-release-planning) |
| `embedProvider` | `null` |  | The embedding provider of `tkt search`: `local`, `server`, `endpoint` or `off` (unset: none; the server only when set) | [AI layers: where the model runs](/en/docs/guides/team/ai-layers.md#team-ai-layers) |
| `embedModel` | `null` |  | The embedding model: a sentence-transformers name for `local` (unset: `BAAI/bge-m3`), the endpoint's model for `endpoint` | [AI layers: where the model runs](/en/docs/guides/team/ai-layers.md#team-ai-layers) |
| `embedUrl` | `null` |  | The OpenAI-compatible embedding endpoint of `embedProvider: endpoint` (https; the key in `AITODO_EMBED_KEY`) | [AI layers: where the model runs](/en/docs/guides/team/ai-layers.md#team-ai-layers) |
| `llmUrl` | `null` |  | The OpenAI-compatible LLM endpoint of `llmProvider: endpoint` (https; the key in `AITODO_LLM_KEY`) | [AI layers: where the model runs](/en/docs/guides/team/ai-layers.md#team-ai-layers) |
| `llmModel` | `null` |  | The model `llmProvider: endpoint` asks for | [AI layers: where the model runs](/en/docs/guides/team/ai-layers.md#team-ai-layers) |
| `llmPickModel` | `null` |  | The model of `tkt ask`'s pick step on `llmProvider: endpoint` (unset: `llmModel`) | [Asking the store](/en/docs/guides/loop/ask.md#loop-ask) |
| `llmProvider` | `null` |  | The LLM provider: `local` (the LLM command), `server`, `endpoint` or `off` (unset: the tkt server's when available) | [AI layers: where the model runs](/en/docs/guides/team/ai-layers.md#team-ai-layers) |

## Commands on this page

- [`tkt config list`](/en/docs/reference/commands/maintenance.md#tkt-config-list): Every known key with its value and source (file / default)
- [`tkt config get`](/en/docs/reference/commands/maintenance.md#tkt-config-get): Print a key's value; a key not in the file prints its default with `(default)`
- [`tkt config set`](/en/docs/reference/commands/maintenance.md#tkt-config-set): Write a key; only its line in config.yaml changes
- [`tkt config unset`](/en/docs/reference/commands/maintenance.md#tkt-config-unset): Remove a key from config.yaml, so its default applies again

## Related

- Error code · 422: [`ERR_CONFIG_KEY_UNKNOWN`](/en/docs/reference/errors.md#ERR_CONFIG_KEY_UNKNOWN): Not a known config.yaml key
- Error code · 422: [`ERR_FIELD_READ_ONLY`](/en/docs/reference/errors.md#ERR_FIELD_READ_ONLY): The field or config key is read-only
