Ever wished your project could explain itself? Now it can! ๐ช Project Guide uses AI to analyze your codebase and generate comprehensive documentation automagically.
- ๐ Deep code analysis
- ๐ Generates detailed developer guides
- ๐ฏ Identifies project purpose and architecture
- ๐บ๏ธ Creates clear documentation structure
- ๐ค AI-powered insights
- ๐ Markdown-formatted output
- ๐ Recursive directory analysis
- ๐จ Well-organized documentation
Checkout the guidebook.md and guidebook-components.md in my other repo to see an example of what is generated: https://github.com/sojohnnysaid/vim-restman
- guidebook.md is a medium-high level overview
- guidebook-components.md is an indepth look at individual modules/functions and their inputs/outputs, including how they fit into the bigger picture.
- Python 3.8+
- Anthropic API key
- Your favorite code project to document!
- Clone this repository:
git clone https://github.com/yourusername/project-guide.git
cd project-guide
- Create a virtual environment (recommended):
python -m venv .venv
source .venv/bin/activate # On Windows use: .venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Set up your environment variables:
export ANTHROPIC_API_KEY="your-api-key-here"
export GUIDE_TARGET_PROJECT_DIRECTORY="/path/to/your/project"
- Run the magic spell:
python guide.py
The script creates three magical artifacts:
- ๐
initial-summaries_{timestamp}.txt
- Raw project insights - ๐๏ธ
findings/{timestamp}/findings.json
- Structured analysis data - ๐
guidebook_{timestamp}.md
- Your beautiful developer guide!
- ๐งน The script automatically excludes common non-source directories (.git, node_modules, etc.)
- ๐ฎ Works best with well-organized codebases
- ๐ Large projects may take longer to analyze
- ๐ก The better organized your code, the better the documentation!
Want to exclude more directories? Modify the EXCLUSION_LIST
in the script:
EXCLUSION_LIST = [
'.git',
'.venv',
'node_modules',
'__pycache__',
'.DS_Store',
'pb_data',
'pb_public',
'migrations'
]
๐ Your Project
โโโ ๐ initial-summaries_20240122_123456.txt
โโโ ๐ findings
โ โโโ ๐ 20240122_123456
โ โโโ ๐ findings.json
โโโ ๐ guidebook_20240122_123456.md
- API Key Error
# Make sure your API key is set:
echo $ANTHROPIC_API_KEY # Should show your key
- Project Directory Error
# Verify your project directory is set and exists:
echo $GUIDE_TARGET_PROJECT_DIRECTORY
ls $GUIDE_TARGET_PROJECT_DIRECTORY
- Virtual Environment Issues
# Make sure you're in the virtual environment:
# You should see (.venv) in your terminal
# If not, activate it:
source .venv/bin/activate # On Windows use: .venv\Scripts\activate
Got ideas to make Project Guide even more magical? Contributions are welcome!
- ๐ด Fork the repo
- ๐ฑ Create your feature branch
- ๐ซ Make your changes
- ๐ Submit a PR
This project is licensed under the MIT License - see the LICENSE file for details.
- ๐ค Powered by Anthropic's Claude API
- ๐งโโ๏ธ Inspired by all the developers who hate writing documentation
- ๐ Special thanks to coffee and late-night coding sessions
Made with ๐ and a bit of AI magic
Remember: Documentation is like a love letter to your future self! ๐