octocode 0.14.1

AI-powered code intelligence with semantic search, knowledge graphs, and built-in MCP server. Transform your codebase into a queryable knowledge graph for AI assistants.
Documentation
query,result1,result2,result3
extract meaningful code regions using tree-sitter AST,src/indexer/code_region_extractor.rs:41-61:2,src/indexer/code_region_extractor.rs:64-114:1,
smart merging of single line declarations into blocks,src/indexer/code_region_extractor.rs:117-166:2,src/indexer/code_region_extractor.rs:215-242:1,
text chunking with character-based overlap and line tracking,src/indexer/text_processing.rs:28-94:2,,
bottom-up hierarchical markdown chunking algorithm,src/indexer/markdown_processor.rs:266-276:2,src/indexer/markdown_processor.rs:349-404:1,
target chunk size calculation based on markdown header level,src/indexer/markdown_processor.rs:256-264:2,,
eliminate tiny chunks smaller than threshold after merging,src/indexer/markdown_processor.rs:278-322:2,src/indexer/markdown_processor.rs:324-347:1,
parse markdown document hierarchy from headers and sections,src/indexer/markdown_processor.rs:661-740:2,src/indexer/markdown_processor.rs:589-658:1,
generate embeddings with retry and exponential backoff,src/embedding/mod.rs:82-137:2,,
batch embedding generation with token limit splitting,src/embedding/mod.rs:141-193:2,,
generate search embeddings based on query mode code or text,src/embedding/mod.rs:204-255:2,,
calculate unique content hash SHA256 for deduplication,src/embedding/mod.rs:258-289:2,,
embedding configuration with code model and text model,src/embedding/mod.rs:41-61:2,src/embedding/mod.rs:65-74:1,
vector search with cosine distance and similarity threshold,src/store/mod.rs:647-708:2,,
hybrid search combining vector and keyword with reciprocal rank fusion,src/store/mod.rs:1039-1145:2,,
store code blocks with embeddings in LanceDB table,src/store/mod.rs:583-643:2,src/store/mod.rs:390-397:1,
initialize database collections and create table schema,src/store/mod.rs:289-382:2,,
remove indexed blocks by file path from store,src/store/mod.rs:519-548:2,,
CodeBlock struct definition with path language symbols and embedding,src/store/mod.rs:51-62:2,,
discover code file relationships without AI using imports,src/indexer/graphrag/relationships.rs:26-111:2,,
rust specific module and trait relationship patterns,src/indexer/graphrag/relationships.rs:237-281:2,,
relationship type enum and importance weight scoring,src/indexer/graphrag/types.rs:36-91:2,,
find shortest path between two graph nodes BFS,src/indexer/graphrag/builder.rs:928-984:2,src/indexer/graphrag/mod.rs:153-211:1,
AI enhanced relationship discovery with LLM analysis,src/indexer/graphrag/ai.rs:83-110:2,src/indexer/graphrag/ai.rs:113-150:1,
graph builder process code blocks into nodes with embeddings,src/indexer/graphrag/builder.rs:116-200:2,,
load graph from database nodes and relationships,src/indexer/graphrag/database.rs:70-222:2,,
MCP server handle semantic search tool request,src/mcp/server.rs:201-221:2,src/mcp/semantic_code.rs:130-369:1,
MCP server initialization and tool router registration,src/mcp/server.rs:401-522:2,,
execute semantic search across multiple queries,src/mcp/semantic_code.rs:130-369:2,,
view file signatures extract function and struct definitions,src/mcp/semantic_code.rs:372-511:2,src/indexer/signature_extractor.rs:49-107:1,
MCP JSON-RPC request and response message types,src/mcp/types.rs:19-42:2,src/mcp/handlers.rs:76-206:1,
main indexing pipeline process all files in directory,src/indexer/mod.rs:985-1100:2,,
differential incremental indexing skip unchanged code blocks,src/indexer/differential_processor.rs:43-173:2,,
batch process code blocks generate descriptions and embeddings,src/indexer/batch_processor.rs:76-124:2,,
determine when to trigger batch processing by size or tokens,src/indexer/batch_processor.rs:200-221:2,,
cleanup deleted files remove orphaned blocks from index,src/indexer/mod.rs:261-345:2,,
handle file change event in watch mode reindex single file,src/indexer/mod.rs:1912-2086:2,,
load configuration from TOML file with defaults,src/config.rs:263-290:2,,
search configuration threshold max results output format,src/config.rs:184-200:2,,
index configuration chunk size overlap batch settings,src/config.rs:82-121:2,,
GraphRAG LLM model configuration for descriptions and relationships,src/config.rs:23-36:2,src/config.rs:47-52:1,
project storage path calculation from git remote URL,src/storage.rs:59-83:2,src/storage.rs:142-147:1,
LSP client send request and wait for response,src/mcp/lsp/client.rs:122-156:2,src/mcp/lsp/client.rs:181-233:1,
LSP goto definition resolve symbol location,src/mcp/lsp/provider.rs:590-639:2,src/mcp/lsp/tools.rs:227-260:1,
LSP provider start and initialize language server,src/mcp/lsp/provider.rs:835-957:2,,
format LSP hover response with documentation,src/mcp/lsp/tools.rs:47-71:2,src/mcp/lsp/tools.rs:263-323:1,
rerank search results using cross-encoder model,src/reranker.rs:23-68:2,,
reranker configuration model candidates and final top-k,src/config.rs:140-150:2,src/reranker.rs:23-68:1,
CLI argument parsing and subcommand routing,src/main.rs:107-213:2,src/main.rs:35-105:1,
git URL normalization for project identity,src/storage.rs:109-139:2,,
contextual enrichment build embedding input with LLM description,src/indexer/contextual.rs:62-83:2,src/indexer/contextual.rs:90-134:1,
CodeRegion struct with content symbols start and end line,src/indexer/code_region_extractor.rs:26-33:2,,
check if two code regions are thematically related by language,src/indexer/code_region_extractor.rs:200-212:2,,
combine preceding comments with function declarations,src/indexer/code_region_extractor.rs:307-331:2,,
recursively collect meaningful AST nodes from parse tree,src/indexer/code_region_extractor.rs:64-114:2,,
create merged blocks from themed groups of declarations,src/indexer/code_region_extractor.rs:245-296:2,,
validate markdown chunk has complete code blocks no broken fences,src/indexer/markdown_processor.rs:106-131:2,,
repair broken markdown chunk fix missing closing code fence,src/indexer/markdown_processor.rs:134-159:2,,
merge markdown sections safely preserving code block integrity,src/indexer/markdown_processor.rs:233-254:2,,
find best child section merge combination for efficiency,src/indexer/markdown_processor.rs:450-490:2,,
process markdown sections at a specific header level,src/indexer/markdown_processor.rs:349-404:2,,
LLM system prompt template for generating code descriptions,src/indexer/contextual.rs:31-35:2,src/indexer/contextual.rs:152-250:1,
truncate code content before sending to LLM context window,src/indexer/contextual.rs:253-264:2,,
build file siblings map with all symbols per file path,src/indexer/contextual.rs:138-149:2,,
differential indexing for text files with hash comparison,src/indexer/differential_processor.rs:177-243:2,,
differential indexing for markdown files skip unchanged blocks,src/indexer/differential_processor.rs:246-298:2,,
TextBlock struct for indexed plain text file chunks,src/store/mod.rs:65-75:2,,
DocumentBlock struct for markdown document pages with title,src/store/mod.rs:78-90:2,,
CommitBlock struct with hash message author and timestamp,src/store/mod.rs:93-103:2,,
HybridSearchQuery struct vector keyword weights and limit,src/store/mod.rs:106-121:2,,
convert code blocks to Arrow RecordBatch with schema,src/store/batch_converter.rs:40-165:2,,
create new store with database path and vector dimensions,src/store/mod.rs:179-260:2,,
find code block by symbol name lookup in database,src/store/mod.rs:956-979:2,,
get node relationships filtered by direction and type,src/store/mod.rs:890-903:2,,
check if GraphRAG needs reindexing based on commit hash,src/store/mod.rs:788-795:2,,
IndexState struct tracking indexing progress and file counts,src/state.rs:20-36:2,,
CodeNode struct representing a file in knowledge graph,src/indexer/graphrag/types.rs:148-162:2,,
CodeRelationship struct with source target type and weight,src/indexer/graphrag/types.rs:179-204:2,,
parse legacy relationship format into typed struct,src/indexer/graphrag/types.rs:207-223:2,,
JavaScript TypeScript import and module relationship discovery,src/indexer/graphrag/relationships.rs:284-314:2,,
Python module import relationship pattern detection,src/indexer/graphrag/relationships.rs:317-345:2,,
file watcher with debouncing and ignore pattern filtering,src/mcp/watcher.rs:33-98:2,,
save graph nodes and relationships incrementally to database,src/indexer/graphrag/database.rs:225-260:2,,
convert graph nodes to Arrow RecordBatch for LanceDB storage,src/indexer/graphrag/database.rs:401-507:2,,
search graph nodes by embedding vector similarity,src/indexer/graphrag/database.rs:263-398:2,,
cosine similarity calculation between two embedding vectors,src/indexer/graphrag/utils.rs:21-44:2,,
normalize and clean node ID string for graph lookup,src/indexer/graphrag/utils.rs:229-245:2,src/indexer/graphrag/utils.rs:250-285:1,
generate simple file description without using AI model,src/indexer/graphrag/relationships.rs:504-537:2,,
build focused content sample for AI analysis of code,src/indexer/graphrag/ai.rs:314-356:2,,
batch extract AI descriptions for multiple code files,src/indexer/graphrag/ai.rs:362-423:2,src/indexer/graphrag/ai.rs:426-454:1,
parse AI batch JSON response into file descriptions,src/indexer/graphrag/ai.rs:486-529:2,,
extract file signatures functions and classes from AST,src/indexer/signature_extractor.rs:110-189:2,src/indexer/signature_extractor.rs:49-107:1,
calculate optimal vector index parameters for dataset size,src/store/vector_optimizer.rs:130-197:2,,
detect if vector index needs recreation after dataset growth,src/store/vector_optimizer.rs:247-258:2,src/store/vector_optimizer.rs:226-237:1,
create optimized vector index IVF HNSW SQ or RaBitQ,src/store/table_ops.rs:327-428:2,,
create full text search BM25 index on content column,src/store/table_ops.rs:529-573:2,,
expand symbols find related code blocks by symbol name,src/indexer/search.rs:206-284:2,,
LLM client chat completion with retry exponential backoff,src/llm/mod.rs:69-118:2,,
LLM structured JSON output with markdown stripping fallback,src/llm/mod.rs:217-287:2,src/llm/mod.rs:297-362:1,
search command execute parallel queries with branch and reranking,src/commands/search.rs:99-272:2,,
store record batch in LanceDB table create or append,src/store/table_ops.rs:298-324:2,,
how to prevent infinite loops when text chunks overlap each other,src/indexer/text_processing.rs:83-87:2,src/indexer/text_processing.rs:77-91:1,
what happens when the repository has not changed since last indexing,src/indexer/mod.rs:1088-1134:2,,
how does the system avoid storing duplicate embeddings for code that has not changed,src/indexer/differential_processor.rs:93-150:2,,
what compression ratio does the vector quantization achieve,src/store/vector_optimizer.rs:26-36:2,src/config.rs:102-105:1,src/store/vector_optimizer.rs:49-56:1
how does the system ensure two developers indexing the same repo get the same database path,src/storage.rs:60-83:2,src/storage.rs:110-139:1,
what is the minimum number of consecutive short declarations before they get grouped,src/indexer/code_region_extractor.rs:36-37:2,src/indexer/code_region_extractor.rs:150-154:1,
why are some symbols hidden when displaying search results to the user,src/indexer/search.rs:43-52:2,src/indexer/render_utils.rs:339-352:1,
how does the system decide whether to use AI or rules for analyzing code relationships,src/indexer/graphrag/ai.rs:153-161:2,src/indexer/graphrag/ai.rs:83-110:1,
what prevents the search from returning results that are too dissimilar,src/store/mod.rs:686-693:2,src/indexer/search.rs:942-947:1,src/commands/search.rs:260-265:1
how does the system know which files need reindexing after a git commit,src/indexer/mod.rs:1031-1076:2,,
how are LLM responses cleaned up when they wrap JSON inside markdown code fences,src/llm/mod.rs:297-362:2,,
what happens when the embedding API call keeps failing after multiple attempts,src/embedding/mod.rs:103-136:2,,
how does the system skip files that have not been modified on disk since last index,src/indexer/mod.rs:1250-1266:2,,
how does the graph builder prevent inserting duplicate nodes during rebuild,src/indexer/graphrag/builder.rs:1047-1071:2,,
what happens when you switch to a different embedding model with different vector dimensions,src/store/mod.rs:214-253:2,,
how does the system make sure index metadata is not saved if the data flush fails,src/indexer/mod.rs:470-490:2,,
how does the MCP server prevent two reindexing tasks from running simultaneously,src/mcp/server.rs:624-656:2,,
how are duplicate results eliminated when the user provides multiple search queries,src/commands/search.rs:224-230:2,,
what happens to files that are not recognized as any programming language during indexing,src/indexer/mod.rs:1674-1679:2,,
why does the indexer force a database flush immediately after removing blocks for changed files,src/indexer/mod.rs:1060-1070:2,,
how does the store avoid opening the same database table multiple times,src/store/mod.rs:265-285:2,,
how are cross-encoder relevance scores made compatible with the distance-based ranking pipeline,src/reranker.rs:47-58:2,,
how does the graph builder roughly estimate token counts without a real tokenizer,src/indexer/graphrag/builder.rs:996-999:2,,
why is there an additional delay before the background reindexing actually starts,src/mcp/server.rs:694-696:2,,
how does the cleanup process handle files that were recently added to gitignore,src/indexer/mod.rs:294-301:2,,
how is the user-facing similarity threshold converted to the internal distance metric for filtering,src/commands/search.rs:260-265:2,src/commands/search.rs:218-222:1,
how does the system decide to build GraphRAG from existing database when no new files were indexed,src/indexer/mod.rs:1807-1829:2,,