DocForge - Open Source AI Documentation Generator
DocForge is a powerful, self-contained AI-powered documentation generator that transforms simple project ideas into comprehensive, professional software documentation. Built with CrewAI and OpenAI, it generates enterprise-grade documents including project charters, requirements specifications, architecture documents, and more.
🚀 Quick Start
Install from PyPI:
# Using pip
pip install docforge-ai
# Using uv (faster)
uv pip install docforge-ai
Get started in seconds:
docforge-ai init
docforge-ai generate "AI-powered chatbot for customer service"
📦 Available on PyPI: Install with
pip install docforge-aioruv pip install docforge-ai
🚀 Features
- PRD-First Workflow: Start with a Product Requirements Document including user stories, validate, then expand
- AI-Powered Generation: Uses advanced AI agents to create professional documentation
- Multiple Document Types: Generate 10+ different types of technical documents
- Self-Contained: No external database dependencies - uses local file storage
- Easy Setup: Simple installation and configuration with
.envfile - Professional Quality: Enterprise-grade document templates and formatting
- Document Revision: Revise PRDs with additional specifications using AI
- Contextual Generation: Generate additional documents based on validated PRD content
- Flexible Output: Generate specific document types or complete document sets
- Neat Organization: Documents are stored in organized project directories
- Interactive Setup: Guided initialization with document type selection
📋 Supported Document Types
- Project Charter - Executive-level project overview with business objectives, scope, and timeline
- Software Requirements Specification (SRS) - Detailed functional and non-functional requirements with user stories
- System Architecture - High-level system design with components, security, and scalability
- Low-Level Design - Detailed technical design with API specifications and database schema
- Test Specification - Comprehensive testing strategy with test cases and acceptance criteria
- Deployment Guide - Step-by-step deployment and release procedures
- Operations Manual - System operations, monitoring, and maintenance procedures
- Business Case - ROI analysis and business justification for the project
- Market Requirements - Market analysis and user requirements documentation
- Vision Brief - Strategic vision and opportunity brief for stakeholders
🛠️ Installation
Prerequisites
- Python 3.10 or higher
- OpenAI API key (Get one here)
Install from PyPI (Recommended)
Using pip:
pip install docforge-ai
Using uv (faster and more reliable):
# Install uv if you don't have it
pip install uv
# Install docforge-ai
uv pip install docforge-ai
Using conda:
conda install -c conda-forge pip
pip install docforge-ai
Install from Source (Development)
# Clone the repository
git clone https://github.com/Venkatesh188/docforge-ai.git
cd docforge-ai
# Install dependencies
pip install -r requirements.txt
# Initialize DocForge (creates .env file and shows available document types)
docforge-ai init
🎯 Getting Started
After installation, follow these steps:
-
Initialize DocForge:
docforge-ai initThis creates a
.envfile where you'll add your OpenAI API key. -
Add your OpenAI API key:
# Edit the .env file OPENAI_API_KEY=your_actual_openai_api_key_here
-
Generate your first document:
docforge-ai generate "AI-powered chatbot for customer service"
-
Explore available commands:
docforge-ai --help docforge-ai list-docs
Package Installation
# Install from source
pip install .
# Or install in development mode
pip install -e .
⚙️ Configuration
Initial Setup
- Run initialization to create the
.envfile:
docforge-ai init
- Edit the
.envfile with your OpenAI API key:
# Required
OPENAI_API_KEY=your_actual_openai_api_key_here
# Optional (defaults shown)
OPENAI_MODEL=gpt-4o-mini
DOCFORGE_GENERATED_DOCS_PATH=generated-docs
- Get your OpenAI API key from OpenAI Platform
🚀 Quick Start
Interactive Mode (Recommended for first-time users)
python start_docforge-ai.py
Command Line Usage
PRD-First Workflow (Recommended)
The recommended approach is to start with a Product Requirements Document (PRD) that includes user stories, validate it, and then generate additional documents based on the validated PRD.
Step 1: Generate a PRD
# Generate a PRD with user stories
docforge-ai generate "AI-powered chatbot for customer service" --docs srs
Step 2: Review and Optionally Revise the PRD
# Review the generated PRD file, then optionally add more specifications
docforge-ai revise ai-powered-chatbot-for-customer-service -s "Add multi-language support and integration with Slack and Microsoft Teams"
Step 3: Generate Additional Documents Based on Validated PRD
# Generate architecture, testing, and deployment documents based on the PRD
docforge-ai continue ai-powered-chatbot-for-customer-service ARCH TEST DEPLOY
# Or generate specific documents
docforge-ai continue ai-powered-chatbot-for-customer-service ARCHITECTURE
docforge-ai continue ai-powered-chatbot-for-customer-service BUSINESS MARKET
Alternative: Generate Single Documents
# Generate individual documents (without PRD workflow)
docforge-ai generate "E-commerce platform for handmade crafts" --docs srs
docforge-ai generate "Mobile banking application" --docs architecture
Legacy: Generate Complete Documentation Set
# Generate all default documents at once
docforge-ai generate "E-commerce platform for handmade crafts"
docforge-ai generate "Mobile task management app" --docs project_charter,srs,architecture
List Available Document Types and Aliases
docforge-ai list-docs
This command shows all available document types and their quick aliases for single document generation.
🎯 Why Use PRD-First Workflow?
The PRD-first workflow offers several advantages:
- Validation Before Expansion: Review and validate the core requirements and user stories before generating additional documents
- Consistency: All subsequent documents are generated based on the same validated PRD, ensuring consistency across the documentation set
- Iterative Improvement: Easily revise the PRD with additional specifications without regenerating all documents
- Cost Effective: Generate only what you need - start with PRD, validate, then expand
- Better Quality: Documents generated from a validated PRD tend to be more accurate and detailed
- User Story Foundation: PRDs include comprehensive user stories that inform all other documents
Document Type Aliases (use with --docs flag):
srsorprd→ Software Requirements Specificationarchitectureorarchorhld→ System Architecturelow_level_designorlldordesign→ Low-Level Designtest_specificationortestortesting→ Test Specificationdeployment_guideordeployordeployment→ Deployment Guideoperations_manualoropsoroperations→ Operations Manualbusiness_caseorbusiness→ Business Casemarket_requirementsormarket→ Market Requirementsvision_brieforvision→ Vision Briefproject_charterorcharterorproject→ Project Charter
Check Project Status
docforge-ai status my-ecommerce-platform
List All Projects
docforge-ai list-projects
📁 Project Structure
docforge-ai/
├── docforge-ai.py # Main CLI interface
├── start_docforge-ai.py # Interactive startup script
├── docforge-ai/ # Package directory
│ ├── __init__.py
│ └── docforge-ai.py # Package main module
├── backend/ # Core application logic
│ └── app/
│ ├── core/ # Configuration and settings
│ │ └── simple_config.py
│ ├── models.py # Data models
│ └── services/ # Business logic services
│ ├── document_agents.py
│ ├── local_storage_service.py
│ └── openai_service.py
├── prompts/ # AI prompt templates
│ ├── charter.md
│ ├── requirements.md
│ ├── architecture.md
│ ├── design.md
│ ├── testing.md
│ ├── deployment.md
│ ├── operations.md
│ ├── business_case.md
│ ├── market_requirements.md
│ └── vision_brief.md
├── storage/ # Local data storage
│ ├── projects/ # Project metadata
│ ├── documents/ # Document metadata
│ └── generated-docs/ # Generated documentation
├── generated-docs/ # User-generated documentation
├── requirements.txt # Python dependencies
└── .env # Configuration file (created by init)
📖 Usage Examples
Example 1: Complete Project Documentation
docforge-ai generate "AI-powered customer service chatbot" --context "React frontend, Node.js backend, PostgreSQL database"
Example 2: Architecture-Focused Documentation
docforge-ai generate "Microservices e-commerce platform" --docs architecture,deployment_guide,operations_manual
Example 3: Business-Focused Documentation
docforge-ai generate "SaaS project management tool" --docs business_case,market_requirements,vision_brief
Example 4: Custom Project Name
docforge-ai generate "Build a mobile app" --name "MyAwesomeApp" --docs srs,architecture
📂 Document Organization
DocForge organizes your generated documents neatly:
generated-docs/
└── your-project-name/
├── README.md # Project overview and index
├── 01_project_charter.md # Project charter
├── 02_srs.md # Software requirements
├── 03_architecture.md # System architecture
├── 04_test_specification.md # Test specification
└── ... # Additional documents
Each project gets its own directory with:
- Sequential numbering for easy navigation
- README.md with project overview and document index
- Clean markdown files ready for use
- Metadata tracking in the storage system
🎯 Document Type Selection
When you run docforge-ai init, DocForge will show you all available document types:
📋 Available Document Types (10):
1. Project Charter
Type: project_charter
Description: Executive-level project overview with business objectives, scope, and timeline
2. Software Requirements Specification
Type: srs
Description: Detailed functional and non-functional requirements with user stories
3. System Architecture
Type: architecture
Description: High-level system design with components, security, and scalability
...
You can then generate specific documents using the type names:
docforge-ai generate "My project" --docs project_charter,srs,architecture
🔧 Advanced Configuration
Environment Variables
| Variable | Description | Default |
|---|---|---|
OPENAI_API_KEY |
OpenAI API key (required) | - |
OPENAI_MODEL |
OpenAI model to use | gpt-4o-mini |
DOCFORGE_GENERATED_DOCS_PATH |
Generated docs directory | generated-docs |
DOCFORGE_MAX_TOKENS |
Max tokens per document | 3000 |
DOCFORGE_DEFAULT_DOCS |
Default document types | project_charter,srs,architecture,test_specification |
Custom Document Types
You can customize the document generation by modifying the prompt templates in the prompts/ directory.
Storage Configuration
DocForge uses local file storage by default. All data is stored in:
storage/projects/- Project metadata (JSON files) - Created automatically when first generating documentsstorage/documents/- Document metadata (JSON files) - Created automatically when first generating documentsgenerated-docs/- Generated markdown files organized by project - Created during initialization
🤝 Contributing
We welcome contributions! Please see our Contributing Guide for details.
Development Setup
# Clone and setup development environment
git clone https://github.com/docforge-ai-community/docforge-ai-opensource.git
cd docforge-ai-opensource
# Install in development mode
pip install -e .
# Install development dependencies
pip install -e ".[dev]"
# Run tests
pytest
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🆘 Support
- Documentation: Wiki
- Issues: GitHub Issues
- Discussions: GitHub Discussions
🙏 Acknowledgments
-
Built with CrewAI for AI agent orchestration
-
Powered by OpenAI for document generation
-
Inspired by the need for better software documentation practices
#crewai>=0.141.0,<1.0.0
Made with ❤️ by the DocForge Community
Metadata
Release files for docforge-ai 2.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| docforge_ai-2.0.3.tar.gz | 118.6 kB | Without provenance | Details for docforge_ai-2.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| docforge_ai-2.0.3-py3-none-any.whl | Python 3 | none | any | Details for docforge_ai-2.0.3-py3-none-any.whl |
Total release size: 182.5 kB
Release files / docforge_ai-2.0.3.tar.gz
| Download URL | docforge_ai-2.0.3.tar.gz |
|---|---|
| Size | 118.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8f842f49252900c70987b0503e0da89a06b48fdb1a18258172a54c2d49480e2b
|
|
BLAKE2b-256 checksum How to use checksums |
506d140a067e8059449bc131fca1a3afe1f28b770b1b57722e01f691a37b84fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / docforge_ai-2.0.3-py3-none-any.whl
| Download URL | docforge_ai-2.0.3-py3-none-any.whl |
|---|---|
| Size | 63.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
99c5332367cd8fb1b13dd27cad1286564a54bef68359a58933b4a538f434d7f4
|
|
BLAKE2b-256 checksum How to use checksums |
13e2540a82a50626f858270f92ffa8c6309a72aafda89863e7f4d8c8b1978699
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for docforge-ai 2.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.