Skip to content

eitatech/gatomia-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gatomia CLI (Rust Core)

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.

🚀 Key Features

  • 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.
  • Fixture-Based Testing: High-reliability testing using real-world code examples for every supported language.
  • Zero-Warning Build: Highly optimized and stable Rust codebase.

🏗️ Architecture

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.

🌍 Supported Languages

Gatomia currently supports:

  1. C
  2. C++
  3. C#
  4. Go
  5. Java
  6. JavaScript
  7. Python
  8. Rust
  9. TypeScript
  10. Swift
  11. COBOL
  12. Objective-C

⚙️ Configuration

Gatomia uses a config.json file for its operation.

GitHub Copilot Integration

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.

Configuration Parameters

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).

🛠️ Usage

Analysis

Run the analyzer on your project:

cargo run --release -p gt-cli -- analyze

Publishing

Publish your analysis to a Git repository:

cargo run --release -p gt-cli -- publish

🧪 Testing

Gatomia uses a robust suite of tests based on real code fixtures.

To run analyzer tests:

cargo test -p gt-analyzer --test analyzer_tests

To run all tests in the workspace:

cargo test

📄 License

This project is proprietary. All rights reserved.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors