Skip to content

Index a codebase

The indexer makes a source tree searchable. Dimple stores a memory for each supported file and extracts definitions such as functions and classes into separate memories.

Run dimple init in the project directory, or pass an existing dimple.jsonc file with --config.

To index the src directory of the current project, run:

Terminal window
dimple index ./src

The command reports the files it read, the memories it wrote, the unchanged memories it skipped, and any failures. The parser supports JavaScript and TypeScript files.

To ask about the project, run:

Terminal window
dimple query "Where is the deployment configured?" --content-type text/x-typescript

To return only code results, filter by a file or definition content type. Run --help to see the supported options in your installed version.

Run the same command after you change the source tree. Dimple skips unchanged units, replaces changed units, and marks the units of deleted files as removed. Removed units stop appearing in retrieval.

Indexing does not run your code. It reads and parses supported files, then stores their text for retrieval.

The default command creates embeddings before it finishes. For a large codebase, pass --defer-embed to store the units first and let the worker create embeddings in the background:

Terminal window
dimple index ./src --defer-embed

Keyword search can use the units first. Semantic search can use them after the embedding jobs finish. To learn how background jobs recover, see Durable jobs.