Skip to main content

AI-powered git repository change analysis tool

Project description

AutoRepoReview

codecov

AI-powered git repository change analysis

Quick Start

Before running AutoRepoReview, you need to configure your API settings. The configuration step will prompt you to enter:

  • API URL (e.g., https://api.openai.com/v1)
  • Model name (optional, e.g., gpt-4)
  • API key (hidden from display)

Option 1: Run via uvx (Recommended)

If you have uv installed, you can run AutoRepoReview directly:

  1. Configure AutoRepoReview (first time setup):

    uvx autoreporeview configure
    

    You will be prompted to enter your API URL, model name (optional), and API key.

  2. Run AutoRepoReview:

    uvx autoreporeview summary <path> <commit_a> <commit_b>
    

This will automatically download and run the latest version from PyPI.

Option 2: Download Pre-built Binary

  1. Download the latest release from GitHub Releases

    • Windows: Download autoreporeview.exe
    • Linux: Download autoreporeview (Linux binary)
    • macOS: Download autoreporeview (macOS binary)
  2. Make it executable (Linux/macOS):

    chmod +x autoreporeview
    
  3. Configure AutoRepoReview (first time setup):

    # Windows
    .\autoreporeview.exe configure
    
    # Linux/macOS
    ./autoreporeview configure
    

    You will be prompted to enter your API URL, model name (optional), and API key.

  4. Run AutoRepoReview:

    # Windows
    .\autoreporeview.exe summary <path> <commit_a> <commit_b>
    
    # Linux/macOS
    ./autoreporeview summary <path> <commit_a> <commit_b>
    

Option 3: Run from GitHub Sources via uvx

  1. Configure AutoRepoReview (first time setup):

    uvx --from git+https://github.com/AutoRepoReviewITPD/AutoRepoReview autoreporeview configure
    

    You will be prompted to enter your API URL, model name (optional), and API key.

  2. Run AutoRepoReview:

    uvx --from git+https://github.com/AutoRepoReviewITPD/AutoRepoReview autoreporeview summary <path> <commit_a> <commit_b>
    

This builds and runs the tool from the latest GitHub sources.

Option 4: Clone and Run Locally

  1. Clone the repository:

    git clone https://github.com/AutoRepoReviewITPD/AutoRepoReview.git
    cd AutoRepoReview
    
  2. Install uv (if you don't have it)

  3. Configure AutoRepoReview (first time setup):

    # Using uv run
    uv run autoreporeview configure
    
    # Or if running directly (after making executable on Linux/macOS)
    chmod +x autoreporeview
    ./autoreporeview configure
    

    You will be prompted to enter your API URL, model name (optional), and API key.

  4. Run AutoRepoReview:

    # Using uv run
    uv run autoreporeview summary <path> <commit_a> <commit_b>
    
    # Or run directly (Linux/macOS)
    ./autoreporeview summary <path> <commit_a> <commit_b>
    

Summary Modes

When running the summary or summary-by-time commands, you'll be prompted to choose a summary mode that focuses on specific aspects of the changes:

  1. General summary - Provides an overview of all changes (default)
  2. Documentation changes - Focuses specifically on documentation updates, README changes, comments, and docstrings
  3. Features add/removed - Highlights new features, removed features, and enhancements to existing functionality
  4. Breaking changes - Identifies breaking changes, API modifications, and migration requirements

Each mode uses specialized prompts to generate more focused and relevant summaries based on your specific needs.

Getting Help

You can get help about available commands and options:

  • View all available commands:

    ./autoreporeview --help
    # Or with uv run
    uv run autoreporeview --help
    
  • View help for a specific command:

    Example:

    autoreporeview summary --help
    # Or with uv run
    uv run autoreporeview summary --help
    

That's it!

Releases and Builds

Creating a Release

To create a new release with pre-built binaries and publish to PyPI:

  1. Update version in pyproject.toml:

    # Update the version field in pyproject.toml
    # Example: version = "0.1.1"
    # Or use uv to bump version:
    uv version 0.1.1
    
  2. Ensure your changes are committed and pushed:

    git add .
    git commit -m "Your commit message"
    git push origin main
    
  3. Create and push a version tag:

    # Create a tag (use semantic versioning: vMAJOR.MINOR.PATCH)
    # Version should match pyproject.toml (with 'v' prefix)
    git tag v0.1.1
    
    # Push the tag to trigger the workflows
    git push origin v0.1.1
    
  4. Monitor the workflows:

    • Go to the Actions tab to see the build progress
    • The Build Binaries workflow will automatically build binaries for Windows, Linux, and macOS
    • The Publish to PyPI workflow will automatically build the package and publish to PyPI
    • Both workflows will create/update a GitHub Release and attach their artifacts
    • Once complete, binaries and wheel files will be attached to the release, and the package will be available on PyPI

Important Notes:

  • The tag name must start with v followed by a version number (e.g., v0.1.0, v1.2.3)
  • The version in pyproject.toml should match the tag (without the v prefix)
  • Both workflows trigger automatically on tag push, so no manual release creation is needed
  • Before first publish to PyPI, you need to enable trusted publishing:
    1. Go to PyPI Account Settings
    2. Navigate to "Publishing" → "Add a pending publisher"
    3. Add your GitHub repository (e.g., AutoRepoReviewITPD/AutoRepoReview)
    4. Specify the workflow filename: .github/workflows/publish-pypi.yml
    5. Specify the environment: leave empty

Building Locally

For local development and testing, you can build the package and binaries manually.

Building the Package Locally

To build the Python package (wheel and source distribution):

# Build the package using uv
uv build --no-sources

The built packages will be in the dist/ directory.

Note: The --no-sources flag ensures the package builds correctly without tool.uv.sources, which is recommended when publishing.

After building, you can test installing the package locally:

# Install from the built wheel
pip install dist/autoreporeview-*.whl

# Or install from source distribution
pip install dist/autoreporeview-*.tar.gz

Building Binaries Locally

Build standalone executables for Windows, Linux, and macOS using PyInstaller.

Prerequisites: Install build dependencies:

uv sync --group dev

Building for Current Platform:

Build a binary for your current operating system:

uv run pyinstaller --clean --name autoreporeview --onefile autoreporeview_cli.py

The binary will be created in the dist/ directory:

  • Windows: dist/autoreporeview.exe
  • Linux/macOS: dist/autoreporeview

After building, test the binary:

# Windows
.\dist\autoreporeview.exe summary <path> <commit_a> <commit_b>

# Linux/macOS
./dist/autoreporeview summary <path> <commit_a> <commit_b>

Cross-Platform Building:

PyInstaller doesn't support cross-compilation. To build binaries for other platforms:

  1. Using Docker (for Linux builds on Windows/macOS):

    docker run --rm -v "$(pwd):/src" python:3.13 bash -c "cd /src && pip install uv && uv sync --group dev && uv run pyinstaller --clean --name autoreporeview --onefile autoreporeview_cli.py"
    
  2. Using WSL (for Linux builds on Windows):

    • Install WSL and Ubuntu
    • Follow the Linux build instructions inside WSL
  3. Native builds:

    • Build Windows binaries on Windows
    • Build Linux binaries on Linux
    • Build macOS binaries on macOS

Project Goals

  • Automate routine review of repository changes
  • Learn about the health and development dynamics of a project
  • Quickly discover hidden patterns and issues in code
  • Explain complex changes in simple terms using AI

Description

This project develops a code summarizer tool that analyzes GitHub commits to generate concise summaries of code changes. It highlights key modifications, such as added/removed features, bug fixes, and the overall impact on functionality, enabling users to quickly understand what the new code can do without reviewing the entire diff.

Threshold of Success Diagram

The project is considered successful if it meets the following criteria:

  • Accurately summarizes at least 80% of simple commits (e.g., single-file changes) based on manual evaluation.
  • Processes commits from public GitHub repositories in under 1 minute per commit.
  • Provides readable summaries that include change type, affected components, and functional implications.
  • Handles common programming languages like Python, JavaScript, and Java.
  • Has a user-friendly interface, similar to the command-line interface of Git.
  • Easily installable on Linux.

Project Context

flowchart TD
    %% Define nodes with clean labels and subtitles
    A[GitHub Repository<br/><small>Commits & Diffs</small>] 
    B[AutoRepoReview<br/><small>Code Changes Summarizer</small>]
    C[User Interface<br/><small>View Summaries</small>]
    D[Summary Output<br/><small>Text Description</small>]
    E[LLM Provider<br/><small>External API</small>]

    %% Define data flows with arrows
    A -->|Provides commit diff| B
    B -->|Sends code changes| E
    E -->|Returns AI analysis| B
    B -->|Generates summary| C
    B -->|Produces| D

    %% Style the nodes for better readability
    classDef system fill:#4a90e2,stroke:#333,stroke-width:2px,color:white
    classDef output fill:#f39c12,stroke:#333,stroke-width:2px,color:white
    classDef input fill:#27ae60,stroke:#333,stroke-width:2px,color:white
    classDef ui fill:#9b59b6,stroke:#333,stroke-width:2px,color:white
    classDef external fill:#e74c3c,stroke:#333,stroke-width:2px,color:white,dashed

    class A input
    class B system
    class C ui
    class D output
    class E external

Features Roadmap

In Progress

  • Commit difference summarization
  • CLI for summary viewing

Planned

  • PDF report generation for visualization
  • Advanced pattern recognition (identify stable, volatile, and recurrently-changing code patterns)
  • Contributors activity analysis

Documentation

View Documentation Site with sprint reports, meeting notes, and project documentation.

  • ./docs/sprints — Contains scripts, meeting notes, sprint reports, and other iterative documentation reflecting project progress.
  • ./docs/ai-usage.md — Details how AI tools have been used within the project.

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

autoreporeview-0.1.2.tar.gz (463.2 kB view details)

Uploaded Source

Built Distribution

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

autoreporeview-0.1.2-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

Details for the file autoreporeview-0.1.2.tar.gz.

File metadata

  • Download URL: autoreporeview-0.1.2.tar.gz
  • Upload date:
  • Size: 463.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for autoreporeview-0.1.2.tar.gz
Algorithm Hash digest
SHA256 4ace9501e1b88ffcf62cd5c825be3d43871010910ad46be18e8de53beb997456
MD5 9319635dd531284efc8de223f90e33dd
BLAKE2b-256 b437e870483a73ef7dbfa7021ed40005c0b87c59aeb2e83cc5cca56f5b0f1438

See more details on using hashes here.

File details

Details for the file autoreporeview-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: autoreporeview-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for autoreporeview-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a270f8bc834854ad05617868be860289091febc853e019dec8f74508a9db8197
MD5 223b12f98675e39e2b44b7e0644ce79e
BLAKE2b-256 3dc74c376d386927ed178a9396e29a41937e957e6ce7127c8750dec8dad91bed

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