You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6ec8d58
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/CONFIGURATION.md
+10-7Lines changed: 10 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,13 +78,15 @@ codebase-memory-cli config get auto_index
78
78
codebase-memory-cli config set auto_index true
79
79
codebase-memory-cli config set auto_index_limit 50000
80
80
codebase-memory-cli config set watcher_enabled false
81
+
codebase-memory-cli config set ignore_worktrees true
81
82
codebase-memory-cli config set doc_candidates false
82
83
codebase-memory-cli config reset doc_candidates
83
84
```
84
85
85
86
`doc_candidates` is `auto` by default: unset, the index mode decides. A single
86
87
`codebase-memory-cli index --doc-candidates true|false` also overrides it for
87
-
that index only.
88
+
that index only. With `ignore_worktrees` on, `codebase-memory-cli index
89
+
--index-worktree` indexes a linked git worktree for that one call.
88
90
89
91
Current keys:
90
92
@@ -94,6 +96,7 @@ Current keys:
94
96
|`auto_index_limit`|`50000`| Maximum file count allowed for automatic indexing of a new project. |
95
97
|`auto_watch`|`true`| Register an active project with the retained background watcher when a warm runtime/hook integration supplies project context. A daemon-started watcher can retain registered projects after the initiating session ends until daemon shutdown, project deletion/root disappearance, or this setting is disabled. The ordinary one-shot CLI does not require this. |
96
98
|`doc_candidates`|`auto`| Score documentation sections against code to store doc<->code candidates (the possible targets of a section, and the sections that may describe a function or file, each with a judged probability). Unset (`auto`), the index mode decides: on for `full` indexes (the default mode), off for `moderate` and `fast`. Set `true` or `false` to choose for every mode; `config reset doc_candidates` returns to `auto`. The scoring grows with sections x functions: under a second up to ~100k functions, ~15 s at ~400k, ~3 minutes on the Linux kernel. Off stores no candidates and leaves the rest of the graph unchanged; on in `fast` mode stores candidates without adding `fast`'s skipped `SIMILAR_TO` / `SEMANTICALLY_RELATED` edges. `codebase-memory-cli index --doc-candidates true|false` sets it for a single index and wins over this setting. Applies from the next index. |
99
+
|`ignore_worktrees`|`false`| Skip linked git worktrees when indexing automatically, and refuse an explicit `codebase-memory-cli index` of one unless `--index-worktree` is passed. See [`ignore_worktrees`](#ignore_worktrees). |
97
100
|`watch_non_git`|`false`| Poll non-Git roots with the indexer discovery rules and an adaptive file-tree scan. Skipped paths, including `.codebase-memory/`, do not trigger indexing. The first poll after daemon startup reindexes once; later changes trigger one reindex. This walks the whole tree each poll and is read when the daemon starts. |
98
101
|`watcher_enabled`|`true`| Master switch for the retained background watcher subsystem. Set `false` to stop its poll thread/project registration. Reindex manually with `codebase-memory-cli index` when disabled. |
99
102
|`index_max_files`|`off`| Optional maximum number of accepted source files in one discovery run. |
@@ -132,24 +135,24 @@ stored index of what is largely the same repository.
132
135
Enable the key to keep those checkouts out of the index:
133
136
134
137
```bash
135
-
codebase-memory-mcp config set ignore_worktrees true
138
+
codebase-memory-cli config set ignore_worktrees true
136
139
```
137
140
138
141
With it enabled:
139
142
140
143
- automatic indexing skips a session whose root is a linked worktree;
141
144
- the `hook-augment` context says the worktree is unindexed on purpose instead
142
-
of telling the agent to run `index_repository`;
143
-
- an explicit `index_repository` call on a linked worktree is refused, and names
144
-
both ways forward — pass `index_worktree=true` for that one call, or turn the
145
-
key back off.
145
+
of telling the agent to run `codebase-memory-cli index`;
146
+
- an explicit `codebase-memory-cli index` of a linked worktree is refused with an
147
+
error that names both ways forward: pass `--index-worktree` for that one call,
148
+
or run `codebase-memory-cli config set ignore_worktrees false`.
146
149
147
150
The main checkout of the same repository is unaffected, as are ordinary clones
148
151
and submodules. Detection is git plumbing only: a linked worktree's `.git` is a
149
152
file pointing at a gitdir that contains a `commondir` entry.
150
153
151
154
A subdirectory counts as the worktree it sits in. Detection walks up from the
152
-
given path to the nearest `.git` entry, so `index_repository` on any
155
+
given path to the nearest `.git` entry, so `codebase-memory-cli index` on any
153
156
subdirectory of a linked worktree is refused the same way, and a session root or
154
157
hook working directory inside one is treated as that worktree. The walk stops at
155
158
the first `.git` it finds; a main checkout or a submodule ends it as "not a
0 commit comments