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 f46f882
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+26-3Lines changed: 26 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,10 @@ ctxt status
26
26
27
27
The first run creates `.ctxt/ctx_config.toml` and starts indexing right away. You can edit the config later; CLI flags override config values. Start `ctxt watch .` when you want a live index that follows file changes.
28
28
29
+
**Want to choose a model before indexing?** Run `ctxt config init` first,
30
+
edit `model` under `[llm]` in `.ctxt/ctx_config.toml`, then run `ctxt init .`.
31
+
See [config setup](#ctxt-config-init) for details.
32
+
29
33
LLM synonyms are optional. To enable them, set `OPENROUTER_API_KEY` in your shell or secret manager before running `ctxt init .`. Without a key, indexing still works with lexical matching.
30
34
31
35
## LLM flexibility
@@ -254,10 +258,27 @@ ctxt doctor --json
254
258
255
259
### `ctxt config init`
256
260
257
-
Create or overwrite `.ctxt/ctx_config.toml`:
261
+
Create `.ctxt/ctx_config.toml` before indexing if you want to choose your model
262
+
or customize ignore rules first:
263
+
264
+
```bash
265
+
ctxt config init
266
+
```
267
+
268
+
Edit `model` under `[llm]` in the generated file, then build the index:
269
+
270
+
```bash
271
+
ctxt init .
272
+
```
273
+
274
+
`--output` selects a different config path. Existing files are preserved;
275
+
`--force` explicitly overwrites them with the starter defaults.
276
+
277
+
After indexing, changing the model does not invalidate cached synonyms. To
Copy file name to clipboardExpand all lines: command_init.go
+4-1Lines changed: 4 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -21,9 +21,12 @@ Creates two files:
21
21
22
22
With an LLM API key, ctxt sends filenames + extracted imports to the LLM to generate domain-accurate synonyms. Without one, falls back to lexical splitting (pascalCase → "pascal case", snake_case → "snake case").
23
23
24
+
To choose your model before indexing, run "ctxt config init", edit [llm].model
25
+
in .ctxt/ctx_config.toml, then run "ctxt init .".
26
+
24
27
Examples:
25
28
ctxt init . Basic setup
26
-
ctxt init . --model openai/gpt-4o Use specific LLM model
29
+
ctxt init . --llm-model openai/gpt-4o Use specific LLM model
27
30
ctxt init . --symbol-extractor treesitter Force tree-sitter (no regex fallback)
0 commit comments