index
Build or rebuild the vex code search database from scratch per project, then use update for incremental refreshes. Set semantic true to enable embeddings and similar search.
Instructions
Build or rebuild the vex index from scratch. Run once per project; use update afterward for incremental refreshes. Set semantic=true to also generate embeddings (slower; required for find_similar / similar / duplicates).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gpu | No | Use the GPU for embedding generation if this vex build supports it (DirectML on Windows / CoreML on macOS prebuilts; CUDA via source build), with silent CPU fallback. Only speeds up cold/large semantic builds. Omit to let .vex.toml gpu/device or $VEX_DEVICE decide; pass false to force CPU even when config enables GPU. | |
| device | No | Advanced: pin a specific embedding execution provider (cpu | auto | cuda | directml | coreml). Mutually exclusive with `gpu`. | |
| semantic | No | Also generate per-symbol embeddings (enables semantic search / similar / duplicates; adds ~30-90s on a medium repo) | |
| workspace | No | Multi-repo: fan out across every repo declared in the nearest `.vex-workspace.toml` (set `project_root` at or above it — the manifest is found by walking up). Results become an object `{workspace, repos:[...]}` grouped by repo, NOT the flat per-tool array — branch on shape. `why` is ignored in workspace mode (single-repo only). | |
| project_root | Yes | Absolute path to the project root to index |