Metadata-Version: 2.4
Name: grawl
Version: 0.1.0
Summary: Generate repository documentation for LLMs
Home-page: https://github.com/kacppian/grawl
Author: Kacppian
Author-email: Kacppian <kacppian@example.com>
License: MIT License
        
        Copyright (c) 2025 Grawl Team
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/kacppian/grawl
Project-URL: Issues, https://github.com/kacppian/grawl/issues
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Documentation
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: openai>=1.10.0
Requires-Dist: openai-agents==0.0.7
Requires-Dist: typer>=0.9.0
Requires-Dist: gitpython>=3.1.40
Requires-Dist: rich>=13.6.0
Requires-Dist: pydantic>=2.5.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: isort>=5.12.0; extra == "dev"
Requires-Dist: flake8>=6.0.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# Grawl

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Python Version](https://img.shields.io/badge/python-3.10%2B-blue)](https://www.python.org/downloads/)

A CLI tool that clones GitHub repositories and generates comprehensive documentation for LLMs using OpenAI's agents framework.

## Features

- Clone GitHub repositories to a local directory
- Analyze repository structure and content
- Generate comprehensive documentation optimized for LLMs
- Identify important files and components
- Filter out binary and irrelevant files

## Installation

### From PyPI (Recommended)

```bash
pip install grawl
```

### From Source

```bash
# Clone the repository
git clone https://github.com/kacppian/grawl.git
cd grawl

# Create a virtual environment
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Install in development mode
pip install -e .
```

## Configuration

Before using Grawl, you need to set your OpenAI API key:

```bash
export OPENAI_API_KEY='your-api-key'
```

On Windows:

```cmd
set OPENAI_API_KEY=your-api-key
```

## Usage

### Command Line Interface

```bash
# Get help
grawl --help

# Generate documentation for a GitHub repository
grawl generate https://github.com/username/repository

# Specify a custom output path for documentation
grawl generate https://github.com/username/repository --output custom_path.txt
```

## How it works

Grawl uses OpenAI's agents framework to:

1. Clone the specified GitHub repository to `.grawl/repositories/<repo_name>`
2. Analyze the repository structure and content
3. Generate comprehensive documentation in `.grawl/generated/<repo_name>.txt`

The documentation includes:
- Repository overview
- Architecture and components
- Key functionality
- API documentation
- Dependencies
- Usage examples
- Development guidelines

## Development

### Setup Development Environment

```bash
# Clone the repository
git clone https://github.com/kacppian/grawl.git
cd grawl

# Create a virtual environment
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Install development dependencies
pip install -e ".[dev]"
```

### Running Tests

```bash
pytest
```

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Requirements

- Python 3.10+
- OpenAI API key
