Codebase index
Ingot keeps a local index of your project so agents can find code from a plain-words description, not only from an exact string. How search uses it (@codebase, hybrid ranking, search without embeddings) is in Codebase search. Ask "where is the cart total calculated?" and the agent gets ranked snippets from the files that fit best, without grepping file by file.
How it works
- Ingot splits your files into overlapping chunks of 40 lines and turns each chunk into an embedding.
- By default the embeddings are computed on your machine from the words in each chunk, with no model and no network. Nothing is uploaded.
- For matches by meaning (related words, not only shared ones), switch to an embedding model in Ollama (see Settings below).
- The index updates as files change, and unchanged chunks are never computed twice, even across branches.
The status bar shows the state: Indexing 120/480, Index ready, or Index error. Click it to rebuild.
The codebase_search tool
Agents call codebase_search with a question, optionally limited to a folder:
{ "query": "where is the cart total calculated", "path": "src", "limit": 8 }
2 results for "where is the cart total calculated" (local index, 480 files). Read more with ingot/read_file.
1. src/cart/total.ts:3-16 (score 0.72)
2. src/pricing.ts:12-25 (score 0.41)
It returns up to 8 snippets by default (at most 20). It runs without asking. If the index is still building, it searches what is ready.
Rebuild
Run Ingot: Rebuild Codebase Index (⌘⌥⇧I, Ctrl+Alt+Shift+I) or click the status bar item.
Settings
| Setting | Default | Effect |
|---|---|---|
ingot.index.enabled | true | build and use the index |
ingot.index.embeddingProvider | local | local, ollama for a local embedding model, or gateway (Codebase search) |
ingot.index.ollamaModel | nomic-embed-text | the Ollama model when the provider is ollama |
With ollama, Ingot calls the Ollama server from ingot.models.ollamaUrl (Models & limits). Set these keys in settings.json (Settings).
What is indexed
The index follows your project's own ignore files, whatever its layout: every .gitignore and .ingot/ignore (and existing editor ignore files) applies to its own folder and below. Dependency and cache folders, secrets, binaries and minified files are never indexed, and folders like lib or build are skipped only when a manifest next to them says they are build output. Up to 50,000 files are indexed per project (ingot.index.maxFiles). The full list is in Codebase search.
Where it lives
The index is stored in .ingot/index/ in your project. It ignores itself in git, so nothing to add to .gitignore. Turning the index off keeps the files; delete the folder to remove them.