Skip to content

This tool analyzes GitHub repositories for Celo Europe hackathon projects, evaluating code quality and checking for Celo blockchain integration using LangChain and Anthropic's Claude AI model.

Notifications You must be signed in to change notification settings

Celo-Europe/celo-hackathon-agent

This branch is up to date with celo-org/celo-hackathon-agent:main.

Folders and files

NameName
Last commit message
Last commit date
Mar 18, 2025
Mar 18, 2025
Mar 18, 2025
Mar 11, 2025
Mar 17, 2025
Mar 17, 2025
Mar 18, 2025
Mar 17, 2025
Mar 18, 2025
Mar 11, 2025
Mar 18, 2025
Mar 18, 2025

Repository files navigation

🌱 Celo Hackathon Project Analyzer

Celo AI Python

An intelligent tool that analyzes GitHub repositories for Celo hackathon projects, evaluating code quality and checking for Celo blockchain integration using AI-powered analysis.

✨ Features

  • πŸ“Š Multi-Repository Analysis: Analyze multiple GitHub repositories from Excel data
  • πŸ” Intelligent Code Review: AI-powered assessment of code quality and best practices
  • πŸ”— Celo Integration Detection: Automatically checks for Celo blockchain integration
  • πŸ“ Detailed Reports: Generates comprehensive reports with LLM-driven insights
  • 🧠 Smart Recommendations: Provides suggestions for improving code and integration

πŸš€ Installation

  1. Clone this repository:

    git clone https://github.com/yourusername/celo-hackathon-agent.git
    cd celo-hackathon-agent
  2. Install dependencies:

    pip install -r requirements.txt
  3. Configure API tokens:

    • Create a GitHub token with repo scope at GitHub Settings
    • Get an Anthropic API key from Anthropic Console
    • Create a .env file:
      GITHUB_TOKEN=your_github_token_here
      ANTHROPIC_API_KEY=your_anthropic_api_key_here
      

πŸ› οΈ Usage

πŸ“‹ Prepare Project Data

Create an Excel file with the following columns:

  • project_name: Name of the project
  • project_description: Brief description of the project
  • project_github_url: URL of the project's GitHub repository (can be comma-separated for multiple repos)
  • project_owner_github_url: GitHub URLs of project owners (can be comma-separated)
  • project_url: Main website URL of the project

Or generate sample data:

python create_sample_data.py

πŸ” Run the Analyzer

Using the Makefile (recommended):

# Display available commands
make help

# Install dependencies
make setup

# Run in interactive mode
make run

# Analyze projects from an Excel file
make run-excel FILE=sample_projects.xlsx VERBOSE=1

# Analyze a GitHub repository directly
make run-url URL="https://github.com/user/repo"

# Analyze with custom project name
make run-url URL="https://github.com/user/repo" NAME="My Project" VERBOSE=1

# Clean up generated files
make clean

Using the interactive CLI tool:

./devrel-agent.py

This will launch an interactive CLI that guides you through the process.

Using the legacy script:

python run.py --excel sample_projects.xlsx --output reports --verbose

Using the CLI tool in non-interactive mode:

# Analyze from Excel file
./devrel-agent.py --non-interactive --excel sample_projects.xlsx --verbose

# Analyze direct GitHub URLs (project name will be automatically extracted from repository name)
./devrel-agent.py --non-interactive --urls "https://github.com/user/repo1,https://github.com/user/repo2" --verbose

# Analyze direct GitHub URLs with custom project name
./devrel-agent.py --non-interactive --urls "https://github.com/user/repo1,https://github.com/user/repo2" --project-name "My Project" --verbose

Optional Arguments:

  • --config: Path to custom configuration file (default: config.json)
  • --output: Directory to save reports (default: reports)
  • --verbose: Display detailed progress information

βš™οΈ Configuration

Customize the analysis by editing config.json:

  • weights: Adjust the weight of each code quality category
  • celo_keywords: Keywords to search for when checking Celo integration
  • celo_files: Files to check for Celo-related configurations

πŸ“Š Project Structure

celo-hackathon-agent/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ models/         # Data types and configuration
β”‚   β”œβ”€β”€ analyzer/       # Analysis components
β”‚   β”œβ”€β”€ utils/          # Utility functions
β”‚   β”œβ”€β”€ reporting/      # Report generation
β”‚   └── main.py         # Main application logic
β”œβ”€β”€ run.py              # Legacy entry point script
β”œβ”€β”€ devrel-agent.py     # Interactive CLI tool
β”œβ”€β”€ Makefile            # Simplified command interface
β”œβ”€β”€ config.json         # Configuration
└── requirements.txt    # Dependencies

πŸ“ Output

The tool generates:

  • summary.md: Overview of all analyzed projects
  • Individual project reports with detailed analysis:
    • AI-powered code quality assessment with explanations
    • Analysis of coding standards and best practices
    • Suggestions for code improvements
    • Comprehensive evaluation of Celo blockchain integration
    • Evidence and detailed analysis of Celo technology usage
  • results.json: Raw data in JSON format for further processing

πŸ“„ License

MIT


Made with ❀️ for the Celo ecosystem

About

This tool analyzes GitHub repositories for Celo Europe hackathon projects, evaluating code quality and checking for Celo blockchain integration using LangChain and Anthropic's Claude AI model.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.4%
  • Makefile 1.6%