Skip to main content

Self-contained AI-powered documentation generator

Project description

DocForge - Open Source AI Documentation Generator

License: MIT Python 3.8+ OpenAI

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.

๐Ÿš€ 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 .env file
  • 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

  1. Project Charter - Executive-level project overview with business objectives, scope, and timeline
  2. Software Requirements Specification (SRS) - Detailed functional and non-functional requirements with user stories
  3. System Architecture - High-level system design with components, security, and scalability
  4. Low-Level Design - Detailed technical design with API specifications and database schema
  5. Test Specification - Comprehensive testing strategy with test cases and acceptance criteria
  6. Deployment Guide - Step-by-step deployment and release procedures
  7. Operations Manual - System operations, monitoring, and maintenance procedures
  8. Business Case - ROI analysis and business justification for the project
  9. Market Requirements - Market analysis and user requirements documentation
  10. Vision Brief - Strategic vision and opportunity brief for stakeholders

๐Ÿ› ๏ธ Installation

Prerequisites

Quick Install

Option 1: Install from PyPI (Recommended)

pip install docforge-ai

After installation, use:

python -m docforge.docforge init
python -m docforge.docforge generate "Your project idea"

Option 2: Install from Source

# Clone the repository
git clone https://github.com/docforge-community/docforge-opensource.git
cd docforge-opensource

# Install dependencies
pip install -r requirements.txt

# Initialize DocForge (creates .env file and shows available document types)
python -m docforge.docforge init

Package Installation

# Install from source
pip install .

# Or install in development mode
pip install -e .

โš™๏ธ Configuration

Initial Setup

  1. Run initialization to create the .env file:
python -m docforge.docforge init
  1. Edit the .env file 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
  1. Get your OpenAI API key from OpenAI Platform

๐Ÿš€ Quick Start

Interactive Mode (Recommended for first-time users)

python start_docforge.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
python -m docforge.docforge generate PRD "AI-powered chatbot for customer service"

Step 2: Review and Optionally Revise the PRD

# Review the generated PRD file, then optionally add more specifications
python -m docforge.docforge 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
python -m docforge.docforge continue ai-powered-chatbot-for-customer-service ARCH TEST DEPLOY

# Or generate specific documents
python -m docforge.docforge continue ai-powered-chatbot-for-customer-service ARCHITECTURE
python -m docforge.docforge continue ai-powered-chatbot-for-customer-service BUSINESS MARKET

Alternative: Generate Single Documents

# Generate individual documents (without PRD workflow)
python -m docforge.docforge generate SRS "E-commerce platform for handmade crafts"
python -m docforge.docforge generate ARCHITECTURE "Mobile banking application"

Legacy: Generate Complete Documentation Set

# Generate all default documents at once
python -m docforge.docforge generate "E-commerce platform for handmade crafts"
python -m docforge.docforge generate "Mobile task management app" --docs project_charter,srs,architecture

List Available Document Types and Aliases

python -m docforge.docforge 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:

  1. Validation Before Expansion: Review and validate the core requirements and user stories before generating additional documents
  2. Consistency: All subsequent documents are generated based on the same validated PRD, ensuring consistency across the documentation set
  3. Iterative Improvement: Easily revise the PRD with additional specifications without regenerating all documents
  4. Cost Effective: Generate only what you need - start with PRD, validate, then expand
  5. Better Quality: Documents generated from a validated PRD tend to be more accurate and detailed
  6. User Story Foundation: PRDs include comprehensive user stories that inform all other documents

Quick Aliases Reference:

  • PRD or PR โ†’ Software Requirements Specification
  • SRS โ†’ Software Requirements Specification
  • ARCH or ARCHITECTURE or HLD โ†’ System Architecture
  • LLD or DESIGN โ†’ Low-Level Design
  • TEST or TESTING โ†’ Test Specification
  • DEPLOY or DEPLOYMENT โ†’ Deployment Guide
  • OPS or OPERATIONS โ†’ Operations Manual
  • BUSINESS โ†’ Business Case
  • MARKET โ†’ Market Requirements
  • VISION โ†’ Vision Brief
  • CHARTER or PROJECT โ†’ Project Charter
  • CONCEPT โ†’ Concept Expansion

Check Project Status

python -m docforge.docforge status my-ecommerce-platform

List All Projects

python -m docforge.docforge list-projects

๐Ÿ“ Project Structure

docforge/
โ”œโ”€โ”€ docforge.py              # Main CLI interface
โ”œโ”€โ”€ start_docforge.py        # Interactive startup script
โ”œโ”€โ”€ docforge/               # Package directory
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ””โ”€โ”€ docforge.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

python -m docforge.docforge generate "AI-powered customer service chatbot" --context "React frontend, Node.js backend, PostgreSQL database"

Example 2: Architecture-Focused Documentation

python -m docforge.docforge generate "Microservices e-commerce platform" --docs architecture,deployment_guide,operations_manual

Example 3: Business-Focused Documentation

python -m docforge.docforge generate "SaaS project management tool" --docs business_case,market_requirements,vision_brief

Example 4: Custom Project Name

python -m docforge.docforge 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 python -m docforge.docforge 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:

python -m docforge.docforge 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 documents
  • storage/documents/ - Document metadata (JSON files) - Created automatically when first generating documents
  • generated-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-community/docforge-opensource.git
cd docforge-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

๐Ÿ™ Acknowledgments

  • Built with CrewAI for AI agent orchestration
  • Powered by OpenAI for document generation
  • Inspired by the need for better software documentation practices

Made with โค๏ธ by the DocForge Community

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

docforge_ai-2.0.0.tar.gz (118.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

docforge_ai-2.0.0-py3-none-any.whl (63.6 kB view details)

Uploaded Python 3

File details

Details for the file docforge_ai-2.0.0.tar.gz.

File metadata

  • Download URL: docforge_ai-2.0.0.tar.gz
  • Upload date:
  • Size: 118.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for docforge_ai-2.0.0.tar.gz
Algorithm Hash digest
SHA256 3742f6afbcbc2db0c0e6e938627118aab49f2fffa070d5dc7ef11d392e0c94f7
MD5 39f1323e850f02c2c75f46d7ac30bfd4
BLAKE2b-256 71f105e89f368c4731047975bef430dd62a080e5c5a8b1647447378a9db2cdb4

See more details on using hashes here.

File details

Details for the file docforge_ai-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: docforge_ai-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 63.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for docforge_ai-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 43c415121a675e0b94a55c0fc01d437cd753acee779877698c9687fa194ea5b8
MD5 815f57c90841e148c322fb2f3c2aa05e
BLAKE2b-256 7f07ef9e1fdc383e79c4af07852611d668fea2d5c1aecf0a14877072b14fe8e4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page