Skip to content

Repository files navigation

GitHub Bug Finder

A Python tool that uses repomix to analyze GitHub repositories and Google's Gemini AI to identify bugs, vulnerabilities, and code quality issues.

Prerequisites

  • Python 3.8+
  • Node.js and npm (required for repomix)
  • Python packages:
    pip install google-generativeai python-dotenv
    
  • Google API Key for Gemini API access

Setup

  1. Create a .env file in the same directory as the script:

    GOOGLE_API_KEY=your_google_api_key_here
    
  2. Ensure Node.js and npm are installed and accessible from your PATH.

Usage

  1. Default mode - analyze the default repository:

    python repo_analyzer.py
    
  2. Analyze a different repository:

    • Open repo_analyzer.py
    • Edit the DEFAULT_GITHUB_REPO_URL constant (around line 30)
    • Run the script
    # Example: Change repository URL
    DEFAULT_GITHUB_REPO_URL = "https://github.com/username/repository"

Output

The script automatically generates two files:

  • {repo_name}_repomix_dump.txt - Contains the repository code extracted by repomix
  • {repo_name}_gemini_analysis.txt - Contains Gemini's analysis of the codebase

Customizing

Other configurable options in the script:

  • GEMINI_MODEL_NAME - The Gemini model to use for analysis
  • SAVE_REPOMIX_OUTPUT - Whether to save the repomix output (true/false)
  • SAVE_GEMINI_ANALYSIS - Whether to save the Gemini analysis (true/false)
  • DEFAULT_REPOMIX_OUTPUT_FILENAME - Template for the repomix output filename
  • DEFAULT_GEMINI_ANALYSIS_FILENAME - Template for the Gemini analysis filename

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages