/project-guide

Your magical AI-powered project documentation generator

Primary LanguagePython

๐Ÿง™ Project Guide

Your magical AI-powered project documentation generator

Project Guide Made with Python Powered by Anthropic

Ever wished your project could explain itself? Now it can! ๐Ÿช„ Project Guide uses AI to analyze your codebase and generate comprehensive documentation automagically.

โœจ Features

  • ๐Ÿ” 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.

๐Ÿš€ Quick Start

Prerequisites

  • Python 3.8+
  • Anthropic API key
  • Your favorite code project to document!

Installation

  1. Clone this repository:
git clone https://github.com/yourusername/project-guide.git
cd project-guide
  1. Create a virtual environment (recommended):
python -m venv .venv
source .venv/bin/activate  # On Windows use: .venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Set up your environment variables:
export ANTHROPIC_API_KEY="your-api-key-here"
export GUIDE_TARGET_PROJECT_DIRECTORY="/path/to/your/project"
  1. Run the magic spell:
python guide.py

๐Ÿ“ฆ Output

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!

๐ŸŽฏ Usage Tips

  • ๐Ÿงน 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!

โš™๏ธ Configuration

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'
]

๐ŸŽจ Example Output Structure

๐Ÿ“ Your Project
โ”œโ”€โ”€ ๐Ÿ“„ initial-summaries_20240122_123456.txt
โ”œโ”€โ”€ ๐Ÿ“ findings
โ”‚   โ””โ”€โ”€ ๐Ÿ“ 20240122_123456
โ”‚       โ””โ”€โ”€ ๐Ÿ“„ findings.json
โ””โ”€โ”€ ๐Ÿ“„ guidebook_20240122_123456.md

๐Ÿ›Ÿ Troubleshooting

Common Issues:

  1. API Key Error
# Make sure your API key is set:
echo $ANTHROPIC_API_KEY  # Should show your key
  1. Project Directory Error
# Verify your project directory is set and exists:
echo $GUIDE_TARGET_PROJECT_DIRECTORY
ls $GUIDE_TARGET_PROJECT_DIRECTORY
  1. 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

๐Ÿค Contributing

Got ideas to make Project Guide even more magical? Contributions are welcome!

  1. ๐Ÿด Fork the repo
  2. ๐ŸŒฑ Create your feature branch
  3. ๐Ÿ’ซ Make your changes
  4. ๐Ÿš€ Submit a PR

๐Ÿ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.

โœจ Acknowledgments

  • ๐Ÿค– 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! ๐Ÿ’Œ