Metadata-Version: 2.4
Name: treegetter
Version: 2.2.1
Summary: AI-Ready Repository Intelligence Engine for Agents
Author-email: Rupam Manna <rupammanna8@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/RupamManna8/TreeGetter
Project-URL: Documentation, https://rupammanna8.github.io/TreeGetter/
Project-URL: Repository, https://github.com/RupamManna8/TreeGetter.git
Project-URL: Bug Tracker, https://github.com/RupamManna8/TreeGetter/issues
Project-URL: Changelog, https://github.com/RupamManna8/TreeGetter/blob/main/CHANGELOG.md
Keywords: repository,directory-tree,ai-agent,codebase-intelligence,llm-context,token-optimizer,repo-parser,ast-analyzer,dependency-parser,architecture-detector
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Utilities
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# TreeGetter Python Package

[![PyPI Version](https://img.shields.io/pypi/v/treegetter.svg)](https://pypi.org/project/treegetter/)
[![Python Versions](https://img.shields.io/pypi/pyversions/treegetter.svg)](https://pypi.org/project/treegetter/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

**TreeGetter** is an AI-Ready Repository Intelligence Engine for Python. It transforms raw directory trees into compact, structured, token-optimized context payloads for AI coding agents.

## Key Features

- 🌐 **Remote Git Extraction**: Analyze local directories or remote Git URLs directly (`https://`, `git@`, `file://`).
- 🕸️ **Import Dependency Relation Graph**: Module import dependency parsing for **Python (`.py`)**, **JavaScript/TypeScript (`.js`, `.jsx`, `.ts`, `.tsx`)**, **Java (`.java`)**, and **Go (`.go`)** exported to **Mermaid**, **DOT**, or **JSON**.
- 🤖 **Token-Optimized LLM Context**: Compact context payloads budgeted by token limits (`max_tokens`).
- ⚡ **Indexed Search**: O(1) exact, fuzzy, and regex repository search.

## Installation

```bash
pip install treegetter
```

## Quick Start & Usage

```python
from treegetter import Repository, generate_tree

# 1. Directory Tree for local path or remote Git URL
print(generate_tree("./", show_stats=True))
print(generate_tree("https://github.com/RupamManna8/TreeGetter.git"))

# 2. High-Level AI Repository Intelligence Engine (with Git URL support)
with Repository("https://github.com/RupamManna8/TreeGetter.git") as repo:
    # Summary & LLM context
    print(repo.summary())
    print(repo.export_llm(max_tokens=4000))

    # Import Dependency Relation Graph (Python, JS/TS/JSX/TSX, Java, Go)
    graph = repo.import_graph()
    print(graph.to_mermaid())
    print(graph.to_dot())

    # Indexed Search
    results = repo.search("Repository")
```

For full documentation, visit [https://rupammanna8.github.io/TreeGetter/](https://rupammanna8.github.io/TreeGetter/).
