index_project
Index local source files into a semantic cache, enabling AI assistants to retrieve relevant code without re-reading the whole codebase. Walks directories and stores file summaries with paths.
Instructions
Index local source files into the cachly semantic cache so AI assistants can use semantic_search to find relevant files instead of re-reading the whole codebase every time. Walks a directory recursively, reads each matching file, and stores a summary + path as a semantic cache entry (prompt = file path + content excerpt, value = relative path). Requires an embedding provider (OPENAI_API_KEY or CACHLY_EMBED_PROVIDER + key). Run once, then re-run after major refactors. TTL=86400 (24h) keeps entries fresh.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| instance_id | Yes | UUID of the cachly instance | |
| dir | Yes | Absolute path to the directory to index (e.g. /Users/you/myproject/src) | |
| extensions | No | File extensions to include (default: ["ts","js","go","py","java","rs","md","kt","swift"]) | |
| max_files | No | Maximum number of files to index (default: 100) | |
| ttl | No | TTL in seconds for indexed entries (default: 86400 = 24 h) | |
| summary_chars | No | Characters to use as summary per file (default: 1200) | |
| namespace | No | Semantic namespace to store under (default: cachly:sem:code) |