Skip to main content

AI-powered GitHub Wiki generator for automated documentation

Project description

Git Wiki Builder

AI-powered GitHub Wiki generator that automatically creates comprehensive documentation for your projects.

PyPI version License: MIT Python 3.8+

๐ŸŒŸ Overview

Git Wiki Builder transforms your project's README, documentation files, and code structure into a comprehensive, well-organized GitHub Wiki using AI. It analyzes your project intelligently and generates professional documentation that follows industry best practices.

โœจ Key Benefits

  • ๐Ÿค– AI-Powered: Uses GitHub's hosted AI models (free for public repos) to generate high-quality content
  • ๐Ÿš€ Zero Configuration: Works out-of-the-box with sensible defaults
  • โšก Automated: Integrates seamlessly with GitHub Actions for continuous documentation
  • ๐Ÿ“š Comprehensive: Creates complete wiki structure with multiple sections
  • ๐ŸŽฏ Intelligent: Analyzes your project to detect APIs, Docker, tests, and more
  • โœ… Quality Assured: Built-in markdown validation and auto-fixing
  • ๐Ÿ”ง Customizable: Flexible prompts and configuration options
  • ๐Ÿ’ฐ Cost-Effective: Uses free GitHub Models for public repositories

๐Ÿ—๏ธ What It Creates

Git Wiki Builder automatically generates a complete wiki structure:

  • ๐Ÿ  Home: Project overview and navigation
  • ๐Ÿš€ Getting Started: Installation, configuration, first steps
  • ๐Ÿ“– User Guide: Features, usage examples, tutorials
  • ๐Ÿ”Œ API Reference: Endpoint documentation (if APIs detected)
  • ๐Ÿ‘ฉโ€๐Ÿ’ป Development: Contributing guidelines, setup, testing
  • ๐Ÿšข Deployment: Deployment guides and best practices
  • โ“ FAQ: Common questions and troubleshooting
  • ๐Ÿ“ Changelog: Release notes and migration guides

๐Ÿš€ Quick Start

1. Install Git Wiki Builder

pip install git-wiki-builder

2. One-Command Setup

Run this in your repository root to set up everything automatically:

curl -sSL https://raw.githubusercontent.com/example/git-wiki-builder/main/setup-wiki.sh | bash

Or manually create the workflow file:

mkdir -p .github/workflows

Create .github/workflows/wiki.yml:

name: Generate Wiki Documentation

on:
  push:
    branches: [main, master]
    paths: ['README.md', 'docs/**', 'src/**', '*.md']
  workflow_dispatch:

permissions:
  contents: read
  pages: write
  id-token: write

jobs:
  generate-wiki:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - uses: actions/setup-python@v4
        with:
          python-version: '3.11'
      - run: pip install git-wiki-builder
      - run: git-wiki-builder
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          GITHUB_REPOSITORY: ${{ github.repository }}

3. Enable Wiki & Push

  1. Enable Wiki in your repository:

    • Go to Settings โ†’ Features โ†’ Wikis โœ“
  2. Commit and push:

    git add .github/workflows/wiki.yml
    git commit -m "Add automated wiki generation"
    git push
    
  3. Your wiki is ready! ๐ŸŽ‰

    • Visit https://github.com/yourusername/yourrepo/wiki
    • Wiki updates automatically when you modify README.md, docs/, or source code

๐ŸŽฏ Why Git Wiki Builder?

Traditional Documentation Problems

  • โŒ Manual wiki creation is time-consuming
  • โŒ Documentation gets outdated quickly
  • โŒ Inconsistent structure across projects
  • โŒ Requires dedicated technical writers
  • โŒ Hard to maintain comprehensive coverage

Git Wiki Builder Solutions

  • โœ… Automated Generation: AI creates content from your existing files
  • โœ… Always Up-to-Date: Regenerates on every code change
  • โœ… Consistent Structure: Professional, standardized wiki layout
  • โœ… Developer-Friendly: Works with your existing workflow
  • โœ… Comprehensive Coverage: Analyzes entire project structure

Perfect For

  • ๐Ÿ”ง Open Source Projects: Professional documentation attracts contributors
  • ๐Ÿข Enterprise Teams: Consistent documentation across all repositories
  • ๐Ÿ“š API Projects: Automatic API documentation generation
  • ๐Ÿš€ Startups: Professional appearance without dedicated resources
  • ๐Ÿ‘จโ€๐ŸŽ“ Learning Projects: Well-documented code for portfolios

๐Ÿ› ๏ธ Advanced Usage

Local Testing

# Test locally before publishing
git-wiki-builder --dry-run --output-dir ./wiki-preview

# Use verbose logging for debugging
git-wiki-builder --verbose --dry-run

Custom Configuration

Create .git-wiki-builder.yml:

# AI Configuration
ai:
  provider: "github"      # Free for public repos
  model: "gpt-4o-mini"    # Fast and efficient

# Custom Wiki Structure
wiki_structure:
  "Home": ["overview", "quick_start"]
  "Documentation": ["user_guide", "api_docs"]
  "Development": ["contributing", "setup"]

# Validation
validation:
  skip: false  # Enable markdown validation

Alternative AI Providers

# Use OpenAI (requires API key)
ai:
  provider: "openai"
  model: "gpt-4"

# Use Anthropic Claude (requires API key)  
ai:
  provider: "anthropic"
  model: "claude-3-sonnet-20240229"

Custom Prompts

Create custom-prompts.yml:

home: |
  Create a welcoming home page for {project_name}.
  Highlight: {key_features}
  Make it beginner-friendly and engaging.

api_reference: |
  Document the API for {project_name}.
  Include authentication, endpoints, and examples.
  Code structure: {code_structure}

Use with: git-wiki-builder --prompt-file custom-prompts.yml

๐Ÿ“Š Supported Project Types

Git Wiki Builder works with any project but provides enhanced support for:

Technology Auto-Detected Features
Python Dependencies, virtual envs, testing frameworks
Node.js Package.json, npm scripts, testing
Docker Container deployment, compose files
APIs OpenAPI specs, endpoint documentation
CI/CD GitHub Actions, deployment pipelines
Databases Schema documentation, migrations

๐Ÿ”ง Command Line Options

git-wiki-builder [OPTIONS]

Options:
  -r, --repo-path DIRECTORY    Repository path (default: current directory)
  -c, --config-file FILE       Custom configuration file
  -p, --prompt-file FILE       Custom prompt templates
  -o, --output-dir DIRECTORY   Local output directory
  --ai-provider [github|openai|anthropic]  AI provider (default: github)
  --ai-model TEXT              Specific model to use
  --dry-run                    Generate locally without publishing
  --verbose                    Enable detailed logging
  --skip-validation            Skip markdown validation
  --help                       Show help message

๐ŸŒ Environment Variables

Variable Description Required
GITHUB_TOKEN GitHub token (auto-provided in Actions) Yes
GITHUB_REPOSITORY Repository name (auto-provided in Actions) Yes
OPENAI_API_KEY OpenAI API key Only for OpenAI provider
ANTHROPIC_API_KEY Anthropic API key Only for Anthropic provider

๐Ÿ” How It Works

  1. ๐Ÿ“– Analysis: Scans README, docs/, and source code
  2. ๐Ÿง  AI Generation: Uses AI to create comprehensive content
  3. โœ… Validation: Validates and fixes markdown formatting
  4. ๐Ÿ“ค Publishing: Commits to GitHub Wiki repository
  5. ๐Ÿ”„ Automation: Repeats on every relevant change

๐Ÿค Contributing

We welcome contributions! See our Contributing Guide for details.

Development Setup

git clone https://github.com/example/git-wiki-builder.git
cd git-wiki-builder
pip install -e ".[dev]"
pytest

๐Ÿ“„ License

MIT License - see LICENSE file for details.

๐Ÿ†˜ Support & Resources

๐ŸŒŸ Examples

See Git Wiki Builder in action:


โญ Star this repository if Git Wiki Builder helps your project!

Made with โค๏ธ for the developer 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

git_wiki_builder-0.1.4.tar.gz (59.0 kB view details)

Uploaded Source

Built Distribution

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

git_wiki_builder-0.1.4-py3-none-any.whl (45.9 kB view details)

Uploaded Python 3

File details

Details for the file git_wiki_builder-0.1.4.tar.gz.

File metadata

  • Download URL: git_wiki_builder-0.1.4.tar.gz
  • Upload date:
  • Size: 59.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for git_wiki_builder-0.1.4.tar.gz
Algorithm Hash digest
SHA256 2517ac2a8ad4985e02fcd12e79171bba467fda177355b312b3d781783532b2a1
MD5 17c7f98863d97e8956a599d46ddab542
BLAKE2b-256 a3bca2b09acb378f87c1fa7cb1bc0cbfe5e93afd19fdacf5d50efd50d0efc31d

See more details on using hashes here.

File details

Details for the file git_wiki_builder-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for git_wiki_builder-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 86e8613ee553ffd1bcc687a0b8615acec557d18aedbf0e7f0e2f5698d3cafe84
MD5 491f9fd32f182ad392986d5a18042a8d
BLAKE2b-256 27f600e14690dbdece67e0f2f34e1db032574efd38ef969294245bb430f70573

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