codeprysm-core
Code graph generation using Tree-sitter AST parsing.
Part of the CodePrism project.
Features
- AST-Based Parsing: Uses Tree-sitter for precise, language-agnostic parsing
- Rich Code Graph: Builds a graph with Container, Callable, and Data nodes
- Relationship Types: CONTAINS (hierarchy), USES (dependencies), DEFINES (definitions)
- Incremental Updates: Merkle tree-based change detection for fast updates
- Multi-Language Support: Python, JavaScript/TypeScript, C/C++, C#, Go, Rust
Installation
[]
= "0.1"
Usage
use ;
use Path;
// Build a code graph from a repository
let config = default;
let builder = new;
let graph = builder.build?;
// Access nodes and edges
for node in graph.nodes
Node Types
| Type | Description | Examples |
|---|---|---|
| Container | Structural entities | Repository, File, Class, Module |
| Callable | Executable entities | Function, Method, Constructor |
| Data | Variables and fields | Field, Constant, Parameter |
License
MIT License - see LICENSE