Gatomia is a high-performance, AST-based documentation generator and codebase analyzer written in Rust. It leverages Tree-sitter for robust parsing across multiple programming languages and integrates with various LLM providers to generate intelligent insights and documentation.
- Multi-Language AST Analysis: Precise parsing for 11 languages using Tree-sitter.
- Dependency Graph Generation: Automated extraction of relationships (calls, inheritance, etc.).
- Unified LLM Interface: Native support for:
- GitHub Copilot (via
copilot-sdk) - OpenAI (GPT-4o and others)
- Anthropic (Claude 3.5 Sonnet, etc.)
- Google Gemini
- OpenRouter, Groq, DeepSeek, and more.
- GitHub Copilot (via
- Fixture-Based Testing: High-reliability testing using real-world code examples for every supported language.
- Zero-Warning Build: Highly optimized and stable Rust codebase.
The project is organized as a Cargo workspace with specialized crates:
gt-analyzer: The core analysis engine. It contains specific handlers for each language (e.g.,rust.rs,cobol.rs,objc.rs) that traverse ASTs to extract components and relationships.gt-llm: A abstraction layer for Large Language Models. It provides a common trait (LlmClient) to switch between providers seamlessly.gt-core: Defines the shared domain models (Node,CallRelationship) and handles configuration management.gt-cli: The command-line interface that wires everything together.
Gatomia currently supports:
- C
- C++
- C#
- Go
- Java
- JavaScript
- Python
- Rust
- TypeScript
- Swift
- COBOL
- Objective-C
Gatomia uses a config.json file for its operation.
To use GitHub Copilot as your LLM provider, set the llm_provider to "copilot". You can optionally provide a copilot_token for BYOK (Bring Your Own Key) scenarios, or the system will attempt to use your local Copilot CLI authentication.
| Parameter | Type | Description |
|---|---|---|
repo_path |
String | Path to the repository to analyze. |
output_dir |
String | Directory where temporary analysis files are stored. |
docs_dir |
String | Target directory for generated documentation. |
llm_provider |
Enum | openai, anthropic, google, copilot, openrouter, etc. |
main_model |
String | The primary model for documentation (e.g., gpt-4o). |
fallback_model |
String | Model used if the primary model fails (e.g., gpt-4o-mini). |
llm_api_key |
String | API key for the chosen provider. |
copilot_token |
String? | (Optional) GitHub Copilot auth token. |
max_tokens |
Int | Global token limit for LLM requests. |
include_reasoning |
Bool | Whether to include AI reasoning in output (OpenRouter). |
Run the analyzer on your project:
cargo run --release -p gt-cli -- analyzePublish your analysis to a Git repository:
cargo run --release -p gt-cli -- publishGatomia uses a robust suite of tests based on real code fixtures.
To run analyzer tests:
cargo test -p gt-analyzer --test analyzer_testsTo run all tests in the workspace:
cargo testThis project is proprietary. All rights reserved.