CodePrysm is a powerful tool for analyzing code repositories and generating relationship graphs using Tree-sitter abstract syntax trees. This system transforms source code into a searchable knowledge graph, enabling semantic code search, dependency analysis, and intelligent code navigation.
- Install Prerequisites
- Install CodePrysm
- Start Qdrant
- Run Initial Indexing
- Setup MCP Server
- Verify Installation
For Docker-based setup, see the Docker Setup Guide.
- Rust 1.85+: Install Rust
- Docker: Required for running Qdrant vector database
Optional:
- just: Command runner for development shortcuts
cargo install codeprysm-cligit clone https://github.com/codeprysm/codeprysm.git
cd codeprysm
cargo build --releaseThe binary will be available at ./target/release/codeprysm.
For faster embedding generation, build with GPU support:
# macOS (Apple Silicon)
cargo install codeprysm-cli --features metal
# Linux (NVIDIA)
cargo install codeprysm-cli --features cudaCodePrysm uses Qdrant for semantic search. Start it with Docker:
docker run -d --name qdrant \
-p 6333:6333 -p 6334:6334 \
-v qdrant_storage:/qdrant/storage \
qdrant/qdrant:latestOr using just:
just qdrant-startNavigate to your repository and run the initial indexing:
cd /path/to/your/repo
codeprysm initThis creates a .codeprysm/ directory containing:
- Code graph with all entities and relationships
- Merkle tree for incremental updates
- Semantic embeddings indexed in Qdrant
The .codeprysm/ directory is automatically added to .gitignore.
After the initial indexing, use update for faster incremental updates:
codeprysm updateCreate .vscode/mcp.json in your repository:
{
"servers": {
"codeprysm": {
"type": "stdio",
"command": "codeprysm",
"args": ["mcp"]
}
}
}Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"codeprysm": {
"command": "codeprysm",
"args": ["mcp", "--root", "/path/to/your/repo"]
}
}
}Start the MCP server manually:
codeprysm mcp --root /path/to/your/repo --qdrant-url http://localhost:6334codeprysm statscodeprysm search "function that handles authentication"- Open the Chat panel
- Select 'Agent' chat mode
- Test the search:
#search_graph_nodes authentication functions
You should see relevant code snippets from your codebase.
Ensure Qdrant is running:
docker ps | grep qdrantCheck Qdrant health:
curl http://localhost:6333/health- Enable GPU acceleration with
--features metal(macOS) or--features cuda(Linux) - For large repositories (>10K files), initial indexing may take 5-20 minutes
For very large repositories:
- Ensure sufficient RAM (4GB+ for medium repos, 16GB+ for large repos)
- Use incremental updates (
codeprysm update) instead of full rebuilds
- Code Graph Generation - How the code graph works
- Semantic Search Guide - Search best practices
- MCP Server Integration - Advanced MCP configuration