Generate repository documentation for LLMs
Project description
Grawl
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)
pip install grawl
From Source
# 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:
export OPENAI_API_KEY='your-api-key'
On Windows:
set OPENAI_API_KEY=your-api-key
Usage
Command Line Interface
# 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:
- Clone the specified GitHub repository to
.grawl/repositories/<repo_name> - Analyze the repository structure and content
- 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
# 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
pytest
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Requirements
- Python 3.10+
- OpenAI API key
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file grawl-0.1.0.tar.gz.
File metadata
- Download URL: grawl-0.1.0.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b89be2000e7f1d6fc32108efe1ffb13fe7701e6205e469e8a70f66c01842e70
|
|
| MD5 |
2f97bcca018c71b83b8fbbed2fcc44fd
|
|
| BLAKE2b-256 |
e193ad8a540f587a20b1443c20a74681b02bea04769fb84a59c8f1311ab1535b
|
File details
Details for the file grawl-0.1.0-py3-none-any.whl.
File metadata
- Download URL: grawl-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
deaa124777f2717637f416d3156341cb93a2e496b0e82e79972deae5d296a247
|
|
| MD5 |
d0223c633019e13e400f66af90df1980
|
|
| BLAKE2b-256 |
9199f4dbe431c9d64718e51861da8a67865ab1a21c4fd0c5e3aacb44e8d6c48d
|