DEV Community

Cover image for CLI Tool that analyzes git repos and generates beautiful documentation!
Julian
Julian Subscriber

Posted on

CLI Tool that analyzes git repos and generates beautiful documentation!

GitHub Copilot CLI Challenge Submission

This is a submission for the GitHub Copilot CLI Challenge

What I Built

πŸ’‘ Project Background

We can't deny that using "vibe coding" and AI tools makes our process of creating new programs and software much more efficient. However, one major issue I've encountered is that we can sometimes lose visibility into what's actually being builtβ€”or even forget what we did in previous commits.
That's why I decided to build a CLI tool powered by GitHub Copilot to solve this problem!

DocWeave is a command-line tool that analyzes your git repository and generates organized documentation using GitHub Copilot CLI. It transforms your commit history into markdown docs, Mermaid diagrams, and AI-powered insights.
DocWeave extends AI to post-coding tasks. It turns rapid development into professional, well-documented outputs, making developers and teams more efficient.

Problem Solved

Developers often face "documentation debt" where code evolves faster than docs, leading to:

  • Onboarding delays for new team members
  • Bugs from misunderstandings
  • Reduced productivity (20-50% of dev hours on docs per Gartner reports)

DocWeave automates documentation creation, saving time and improving project maintainability.

✨ Features

  • πŸ€– AI-Powered Analysis: Uses GitHub Copilot CLI to understand code changes and provide context
  • πŸ“Š Visual Diagrams: Generates Mermaid diagrams (timelines, file relationships, importance charts)
  • πŸ“ Auto-Documentation: Creates organized markdown files in DocweaveDocs/ folder
  • 🎯 Next Steps: Suggests actionable next steps based on code analysis
  • ⚑ Simple CLI: Just run docweave analyze in any git repository
  • πŸ”„ Graceful Fallback: Works even without Copilot CLI using intelligent heuristics

πŸ“ Example Use Cases

  • Solo Developer: After a coding session, analyze commits and generate documentation
  • Team Collaboration: Generate changelogs and architecture diagrams for team reviews
  • Code Review: Auto-document PR changes with AI-powered context
  • Onboarding: Create up-to-date documentation for new team members
  • Project Handoff: Generate comprehensive documentation before transferring a project

Demo


Repo:https://github.com/Juls95/DocWeave/tree/main

Recent Changes
Diagrams

πŸ“– Usage

Basic Usage

# Navigate to any git repository
cd /path/to/your/repo

# Analyze last 5 commits (default)
docweave analyze

# Analyze only the last commit (quick)
docweave analyze --last
Enter fullscreen mode Exit fullscreen mode

Options

# Analyze last commit only (quick analysis)
docweave analyze --last

# Analyze last 5 commits (default)
docweave analyze

# Analyze specific number of commits
docweave analyze --limit 20

# Analyze specific repository
docweave analyze --path /path/to/repo
# or short: docweave analyze -p /path/to/repo

# Analyze commits from last 7 days only
docweave analyze --days 7
# or short: docweave analyze -d 7

# Combine options
docweave analyze --path ./my-repo --limit 15 --days 30
Enter fullscreen mode Exit fullscreen mode

πŸ“ Generated Documentation

DocWeave creates a DocweaveDocs/ folder in your repository with:

πŸ—οΈ Architecture

src/docweave/
β”œβ”€β”€ cli.py              # CLI entrypoint and command handling
β”œβ”€β”€ components/         # Reusable components
β”‚   β”œβ”€β”€ copilot_integration.py  # GitHub Copilot CLI integration
β”‚   └── doc_generator.py        # Documentation generation
β”œβ”€β”€ features/           # Business logic
β”‚   └── commit_analysis.py      # Git commit analysis
β”œβ”€β”€ lib/                # Utilities
β”‚   β”œβ”€β”€ copilot_check.py        # Copilot CLI availability check
β”‚   β”œβ”€β”€ repo_utils.py           # Repository path utilities
β”‚   └── utils.py               # General utilities
└── types/              # Type definitions
    └── models.py               # Data models
Enter fullscreen mode Exit fullscreen mode

Test

My Experience with GitHub Copilot CLI

Before Copilot CLI, I had to constantly ask LLMs or IDEs to explain what they understood, request a specific format, provide templates for generating documentation, and ensure everything was correct. Now, with GitHub Copilot, I can be confident thatβ€”as a n*ative GitHub development* toolβ€”it fully analyzes all the information available in the repo and generates content strictly following the specified templates.

GitHub Copilot CLI provides AI-powered analysis that:

  • Understands code context and intent
  • Provides deeper insights into why changes were made
  • Suggests more relevant next steps
  • Generates better summaries

Top comments (0)