aptu-coder-core
Core library for code structure analysis using tree-sitter.
Features
- Directory analysis - File tree with LOC, function, and class counts
- File analysis - Functions, classes, and imports with signatures and line ranges
- Symbol call graphs - Callers and callees across a directory with configurable depth
- Module index - Lightweight function and import index (~75% smaller than full file analysis)
- Edit operations - In-file edits: overwrite, exact-block replace
- In-memory analysis -
analyze_strparses source text directly without a file path; returns the sameFileAnalysisOutputasanalyze_file - Multi-language - Rust, Python, TypeScript, TSX, Go, Java, Kotlin, Fortran, JavaScript, C/C++, C#
- Pagination - Cursor-based pagination for large outputs
- Caching - LRU cache for parsed results with mtime-based invalidation
- Parallel - Rayon-based parallel file analysis
Installation
Add to your Cargo.toml:
[]
= "*"
The current version is published on crates.io. Replace "*" with the latest version string if you prefer a pinned dependency.
Example
use ;
use Path;
Supported Languages
Rust, Python, TypeScript, TSX, Go, Java, Kotlin, Fortran, JavaScript, C/C++, C#. See the MCP server README for the full table with file extensions and feature flags.
Configuration
AnalysisConfig provides resource limits for library consumers:
use AnalysisConfig;
let config = AnalysisConfig ;
Support
For questions and support, visit clouatre.ca.
License
Apache-2.0. See LICENSE.