Skip to content

maxheim/DocumentationCreator

Repository files navigation

DocumentationCreator

A CLI tool that automatically generates comprehensive documentation for software projects using AI.

Features

  • Language-Agnostic: Works with projects written in any programming language (C#, Java, Python, JavaScript, TypeScript, Go, and more)
  • Two Documentation Types:
    • Technical Documentation: Detailed architecture, components, use cases, and Mermaid diagrams for developers
    • Sales Documentation: Business-focused feature descriptions and value propositions for sales teams
  • AI-Powered: Uses Claude AI to generate intelligent, context-aware documentation
  • Simple CLI: Easy-to-use command-line interface

Installation

Prerequisites

Build from source

git clone <repository-url>
cd DocumentationCreator
dotnet build

Usage

Setup API Key

Choose one of three methods:

Method 1: .env file (Recommended)

# Copy the example file
cp .env.example .env

# Edit .env and add your API key
echo "ANTHROPIC_API_KEY=your_api_key_here" > .env

Method 2: Environment variable

export ANTHROPIC_API_KEY=your_api_key_here

Method 3: Command line argument

DocumentationCreator /path/to/project --api-key your_api_key_here

Basic Usage

# Generate documentation (reads from .env file)
dotnet run --project DocumentationCreator/DocumentationCreator.csproj -- /path/to/your/project

# Or use the built executable
./DocumentationCreator/bin/Debug/net8.0/DocumentationCreator /path/to/your/project

Command Line Options

Usage:
  DocumentationCreator <project-path> [options]

Arguments:
  <project-path>  The path to the project directory to analyze

Options:
  -o, --output <output>    Output directory for generated documentation [default: ./docs]
  -k, --api-key <api-key>  Anthropic API key (or set ANTHROPIC_API_KEY in .env file or environment variable)
  --help                   Show help and usage information

Examples

# Generate docs in default ./docs folder
DocumentationCreator /path/to/project

# Specify custom output directory
DocumentationCreator /path/to/project --output ./my-docs

# Pass API key directly
DocumentationCreator /path/to/project --api-key sk-ant-xxxxx

Output

The tool generates two markdown files:

  1. TECHNICAL_DOCUMENTATION.md: Comprehensive technical documentation including:

    • Architecture overview
    • Core components and their responsibilities
    • Features with implementation details
    • Use cases with code examples
    • Mermaid diagrams (flowcharts, class diagrams, sequence diagrams)
    • API/public interfaces
  2. SALES_DOCUMENTATION.md: Business-focused documentation including:

    • Product overview
    • Key features (non-technical)
    • Value propositions
    • Real-world use cases
    • Target audience
    • Competitive advantages

How It Works

  1. Scans the project directory to find all code files
  2. Detects programming languages used
  3. Analyzes code structure (classes, methods, interfaces)
  4. Generates documentation using Claude AI based on the analysis
  5. Outputs two markdown files with comprehensive documentation

Supported Languages

C#, Java, Python, JavaScript, TypeScript, JSX, TSX, Go, Rust, C++, C, Ruby, PHP, Swift, Kotlin, Scala, Shell, PowerShell, SQL, HTML, CSS

Dependencies

  • System.CommandLine: CLI framework
  • .NET 8.0: Runtime and standard libraries

License

[Your License Here]

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published