The index_project tool creates the indexes that power Stellarion's advanced features. It generates vector embeddings for semantic search and builds a dependency graph for structure analysis. Running this tool enables fast, intelligent code search and accurate dependency mapping.
Stellarion uses RoBERTa (Robustly optimized BERT approach) to generate vector embeddings of your code. Code is split into 50-line chunks, each converted to a high-dimensional vector that captures semantic meaning. These vectors are stored in a RocksDB database for fast similarity search. Simultaneously, import/export statements are analyzed to build a dependency graph in KuzuDB.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
path | string | No | . | Project root to index |
forceReindex | boolean | No | false | Re-index even if already indexed |
maxFiles | number | No | 1000 | Maximum files to index |
fileTypes | array | No | All code files | Specific extensions to index |
buildGraph | boolean | No | true | Build dependency graph |
generateEmbeddings | boolean | No | true | Generate semantic embeddings |
includeStatistics | boolean | No | false | Include detailed indexing statistics |
useCache | boolean | No | false | Use cache to skip unchanged files |
mcp__stellarion__index_project path:. forceReindex:true includeStatistics:true
Natural Language:
Index this project for semantic search
Direct MCP Call:
mcp__stellarion__index_project
Returns: Indexing summary with file count and storage location
Natural Language:
Re-index this project from scratch
Direct MCP Call:
mcp__stellarion__index_project forceReindex:true
Returns: Fresh index, ignoring any existing data
Natural Language:
Index only TypeScript and JavaScript files
Direct MCP Call:
mcp__stellarion__index_project fileTypes:["ts","tsx","js","jsx"]
Returns: Index containing only the specified file types
Natural Language:
Index this project and show me detailed statistics
Direct MCP Call:
mcp__stellarion__index_project includeStatistics:true
Returns: Comprehensive stats including files processed, chunks created, time taken
Natural Language:
Just rebuild the dependency graph, don't regenerate embeddings
Direct MCP Call:
mcp__stellarion__index_project buildGraph:true generateEmbeddings:false
Returns: Updated dependency graph for structure analysis
Natural Language:
Regenerate semantic search embeddings only
Direct MCP Call:
mcp__stellarion__index_project generateEmbeddings:true buildGraph:false
Returns: Updated vector embeddings for semantic search
Natural Language:
Index this large project but limit to 500 files
Direct MCP Call:
mcp__stellarion__index_project maxFiles:500
Returns: Index of the most important 500 files
Results include:
| Field | Description |
|---|---|
| Files indexed | Number of files processed |
| Chunks created | Number of code chunks generated |
| Embeddings generated | Number of vector embeddings created |
| Graph nodes | Number of files in dependency graph |
| Graph edges | Number of dependency relationships |
| Time taken | Duration of indexing process |
| Storage location | Path to .stellarion directory |
| Language | Extensions |
|---|---|
| TypeScript | .ts, .tsx |
| JavaScript | .js, .jsx, .mjs, .cjs |
| Python | .py |
| Rust | .rs |
| Go | .go |
| Java | .java |
| C/C++ | .c, .cpp, .h, .hpp |
| Ruby | .rb |
node_modules/ and similar dependency directoriesdist/, build/, target/ (build artifacts).git/ and other VCS directories.stellarion/ (Stellarion's own data).gitignore patternsIndex data is stored in your project:
.stellarion/
├── vector_store/ # RoBERTa embeddings (RocksDB)
└── graph_kuzu/ # Dependency graph (KuzuDB)
This directory should be added to .gitignore as it's machine-specific and can be regenerated.
Re-index your project when:
| Situation | Command |
|---|---|
| Adding significant new code | forceReindex:true |
| After major refactoring | forceReindex:true |
| Search results seem stale | forceReindex:true |
| Switching branches with different code | forceReindex:true (if major differences) |
| Fixing corrupted index | forceReindex:true |
maxFiles for very large codebases: Focus on the most important directoriesuseCache: true for incremental updates: Skip files that haven't changedfileTypes to exclude irrelevant languagesmcp__stellarion__index_project forceReindex:true
mcp__stellarion__index_project generateEmbeddings:true
mcp__stellarion__index_project buildGraph:true forceReindex:true
mcp__stellarion__index_project maxFiles:500 fileTypes:["ts","js"]