TreeGetter is a production-grade Repository Intelligence Engine for AI coding agents.
Instead of generating simple text directory trees, TreeGetter understands the entire repository architecture, framework setup, dependencies, languages, entrypoints, and file maps—producing compact, token-optimized context structures for LLMs.
pip install treegetterfrom treegetter import Repository, get_tree
# Print traditional tree
print(get_tree("./"))
# Initialize Repository Intelligence
repo = Repository("./")
# Get high-level overview
print(repo.summary())
# Get token-optimized context for LLM agents
print(repo.export_llm(max_tokens=4000))graph TD
A[Client / AI Agent] --> B[TreeGetter Repository Engine]
B --> C[Lazy Cache Manager]
C --> D[Repository Scanner]
C --> E[Language Detector]
C --> F[Dependency Analyzer]
C --> G[EntryPoint Detector]
C --> H[Architecture Analyzer]
C --> I[Framework Detector]
C --> J[Statistics Engine]
C --> K[Indexed Search Engine]
I --> L[Plugin Registry]
L --> M[Python / JS / Java / Go / Rust / PHP / C# Plugins]
B --> N[AI Context Builder]
N --> O[Token Optimizer]
N --> P[Repository Exporters]
P --> Q[JSON / Markdown / HTML / YAML / LLM]
Run common developer tasks using make:
make install # Install dependencies
make test # Run Python test suites
make lint # Run Python linters (Ruff, Mypy)
make build # Build PyPI wheel
make docs # Serve local documentation
make release # Publish PyPI packageTreeGetter is licensed under the MIT License.