freshcrate
Home > Testing > ContribAI

ContribAI

Autonomous AI agent that contributes to open source β€” discovers repos, analyzes code, generates fixes, and submits PRs

Description

Autonomous AI agent that contributes to open source β€” discovers repos, analyzes code, generates fixes, and submits PRs

README

ContribAI

Autonomous AI agent that discovers, analyzes, and submits
Pull Requests to open source projects on GitHub.

RustVersionLicenseTestsPRs MergedGetting Started Β· Features Β· Commands Β· Architecture Β· Hall of Fame


Set it up once. Wake up to merged PRs.

πŸ† Track Record

Metric
PRs Submitted 44+
PRs Merged 10
Repos Contributed 21+
Languages Analyzed 13

Notable Contributions:

🌍 Worldmonitor β€” 45k ⭐ Β· 3 merged
πŸ•΅οΈ Maigret β€” 19k ⭐ Β· 3 merged
πŸ€– AI-Research-SKILLs β€” 6k ⭐ Β· 1 merged
πŸ“Š s-tui β€” 5k ⭐ Β· 1 merged
πŸ” HolmesGPT β€” 2k ⭐ Β· 1 merged

See the full Hall of Fame β†’ for every PR with links.


⚑ How It Works

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Discovery  │────▢│  Analysis   │────▢│  Generator  │────▢│  PR + CI    │────▢│   Patrol    β”‚
β”‚             β”‚     β”‚             β”‚     β”‚             β”‚     β”‚             β”‚     β”‚             β”‚
β”‚ Search reposβ”‚     β”‚ 13-lang AST β”‚     β”‚ LLM-powered β”‚     β”‚ Fork, commitβ”‚     β”‚ Auto-fix    β”‚
β”‚ by language β”‚     β”‚ 17 skills   β”‚     β”‚ code gen +  β”‚     β”‚ create PR   β”‚     β”‚ review      β”‚
β”‚ and stars   β”‚     β”‚ security,   β”‚     β”‚ self-review β”‚     β”‚ sign CLA    β”‚     β”‚ feedback    β”‚
β”‚             β”‚     β”‚ quality,    β”‚     β”‚ + scoring   β”‚     β”‚ monitor CI  β”‚     β”‚ & reply     β”‚
β”‚             β”‚     β”‚ performance β”‚     β”‚             β”‚     β”‚             β”‚     β”‚             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸš€ Getting Started

Install

# Build from source (recommended)
git clone https://github.com/tang-vu/ContribAI.git && cd ContribAI
cargo install --path crates/contribai-rs

# Or one-line install
curl -fsSL https://raw.githubusercontent.com/tang-vu/ContribAI/main/install.sh | bash
# Windows:
irm https://raw.githubusercontent.com/tang-vu/ContribAI/main/install.ps1 | iex

Configure

contribai init     # Interactive setup wizard
contribai login    # Verify auth + switch LLM providers

Run

contribai hunt                # Autonomous: discover β†’ analyze β†’ PR
contribai target <repo_url>   # Target a specific repo
contribai analyze <repo_url>  # Dry-run analysis (no PRs)
contribai interactive         # Browse in ratatui TUI
πŸ“ Example config.yaml
github:
  token: "ghp_your_token"       # or set GITHUB_TOKEN env var

llm:
  provider: "gemini"            # gemini | openai | anthropic | ollama | vertex
  model: "gemini-3-flash-preview"
  api_key: "your_api_key"       # or set GEMINI_API_KEY env var
  # base_url: "https://api.openai.com/v1"  # Optional: override default endpoint for OpenAI-compatible providers

discovery:
  languages:                    # default: all 15 languages
    - python
    - javascript
    - typescript
    - go
    - rust
  stars_range: [100, 5000]

See config.yaml.template for all options.


✨ Features

πŸ” Code Analysis

  • 13-language AST via tree-sitter
  • Security: SQLi, XSS, resource leaks
  • Code quality, complexity, dead code
  • Performance bottlenecks
  • Documentation gaps
  • 17 progressive skills loaded on-demand

πŸ€– Multi-LLM Support

  • Gemini 3.x (default) β€” Flash, Pro, Lite tiers
  • OpenAI, Anthropic, Ollama, Vertex AI
  • Smart task routing across model tiers
  • 5 specialized sub-agents

🎯 Hunt Mode

  • Multi-round autonomous hunting
  • Issue-first strategy
  • Cross-file fixes
  • Outcome learning per repo

πŸ‘ PR Patrol

  • Monitors PRs for review feedback
  • LLM-classifies maintainer comments
  • Auto-pushes code fixes
  • Auto-replies to questions
  • Auto-cleans stale PRs from memory

πŸ”Œ Integrations

  • MCP Server β€” 21 tools for Claude Desktop
  • Web Dashboard β€” axum REST API at :8787
  • Cron Scheduler β€” automated runs
  • Docker β€” compose-ready deployment
  • Webhooks β€” Slack, Discord, Telegram

πŸ›‘ Safety

  • AI policy detection
  • CLA auto-signing
  • Quality gate scoring
  • Duplicate PR prevention
  • Protected file guardrails

Supported Languages

Deep AST (tree-sitter) Fallback Parser
Python Β· JavaScript Β· TypeScript Β· Go Β· Rust Β· Java Kotlin β†’ Java
C Β· C++ Β· Ruby Β· PHP Β· C# Β· HTML Β· CSS Swift β†’ Java Β· Vue/Svelte β†’ HTML

πŸ“– Commands

ContribAI ships with 40+ commands accessible via CLI or interactive menu.

πŸ”₯ Hunt & Contribute
contribai hunt                        # Autonomous discovery + PRs
contribai hunt --dry-run              # Analyze only, no PRs
contribai run                         # Single pipeline run
contribai target <url>                # Target specific repo
contribai analyze <url>               # Dry-run analysis
contribai solve <url>                 # Solve open issues
πŸ“Š Monitor & Stats
contribai patrol                      # Respond to PR reviews
contribai status                      # PR status table
contribai stats                       # Contribution statistics
contribai leaderboard                 # Merge rate by repo
contribai system-status               # DB, rate limits, scheduler
πŸ–₯️ Interactive & Config
contribai                             # Interactive menu (22 items)
contribai interactive                 # ratatui TUI browser
contribai init                        # Setup wizard
contribai login                       # Interactive auth + provider config
contribai config-list                 # Show all config
contribai config-get llm.provider     # Get config value
contribai config-set llm.provider openai  # Set config value
contribai profile security-focused    # Named profile
🌐 Servers & Tools
contribai web-server                  # Dashboard at :8787
contribai schedule                    # Cron scheduler
contribai mcp-server                  # MCP stdio server
contribai cleanup                     # Remove stale forks
contribai notify-test                 # Test Slack/Discord/Telegram

πŸ— Architecture

ContribAI/
β”œβ”€β”€ crates/contribai-rs/src/        ← Rust v5.8.1 (primary)
β”‚   β”œβ”€β”€ cli/                        40+ commands + ratatui TUI
β”‚   β”œβ”€β”€ core/                       Config, events, error types
β”‚   β”œβ”€β”€ github/                     REST v3 + GraphQL client
β”‚   β”œβ”€β”€ analysis/                   13-lang AST + 17 skills
β”‚   β”œβ”€β”€ generator/                  LLM code generation + scoring
β”‚   β”œβ”€β”€ orchestrator/               Pipeline + SQLite memory (72h TTL)
β”‚   β”œβ”€β”€ llm/                        Multi-provider + 5 sub-agents
β”‚   β”œβ”€β”€ pr/                         PR lifecycle + patrol + CI
β”‚   β”œβ”€β”€ mcp/                        21-tool MCP server (stdio)
β”‚   β”œβ”€β”€ web/                        axum dashboard + webhooks
β”‚   β”œβ”€β”€ sandbox/                    Docker + local fallback
β”‚   └── tools/                      Tool protocol interface
β”‚
└── python/                         Legacy v4.1.0 (reference only)
πŸ”§ Tech Stack
Layer Technology
Language Rust 2021 (primary), Python 3.11+ (legacy)
Async Tokio (full), async/await throughout
HTTP reqwest 0.12 (async, rustls-tls)
Database SQLite (rusqlite, bundled)
LLM Gemini 3.x, OpenAI, Anthropic, Ollama, Vertex AI
GitHub REST API v3 + GraphQL
AST tree-sitter (13 languages)
Web axum 0.7 + tower-http
TUI ratatui + crossterm
CLI clap v4 + dialoguer + colored
Tests 418 tests (mockall, wiremock, tokio-test)

See docs/system-architecture.md for the full design.


πŸ§ͺ Testing

cargo test                  # Run all 418 tests
cargo test -- --nocapture   # With stdout output
cargo test ast_intel        # AST module tests only
cargo clippy                # Lint check

πŸ”Œ MCP Server

Use ContribAI as a tool provider for Claude Desktop or Antigravity IDE:

{
  "mcpServers": {
    "contribai": {
      "command": "contribai",
      "args": ["mcp-server"]
    }
  }
}

21 tools available: repo analysis, PR management, GitHub search, issue solving, memory queries, and more.


🐳 Docker

docker compose up -d dashboard            # Dashboard at :8787
docker compose run --rm runner run        # One-shot pipeline run
docker compose up -d dashboard scheduler  # Dashboard + cron scheduler

πŸ“š Documentation

Document Description
Hall of Fame 10 merged Β· 14 closed across 21+ repos
AGENTS.md AI agent guide β€” architecture, patterns, CLI reference
Deployment Guide Install, Docker, config, all 22 CLI commands
System Architecture Pipeline, middleware, events, LLM routing
Codebase Summary Module map, tech stack, data structures
Project Roadmap Version history and future plans

πŸ“„ License

AGPL-3.0 + Commons Clause β€” see LICENSE for details.


Built with Rust πŸ¦€ and LLMs πŸ€–

Releases Β· Issues Β· Hall of Fame

Release History

VersionChangesUrgencyDate
v6.4.1See [CHANGELOG.md](https://github.com/tang-vu/ContribAI/blob/main/CHANGELOG.md) for details. High4/14/2026
v6.4.0See [CHANGELOG.md](https://github.com/tang-vu/ContribAI/blob/main/CHANGELOG.md) for details. High4/14/2026
v6.2.1See [CHANGELOG.md](https://github.com/tang-vu/ContribAI/blob/main/CHANGELOG.md) for details. High4/14/2026
v6.2.0 ### Added - **Sprint 18 complete** β€” Dependencies, benchmarks, binary optimization: - Criterion benchmark suite (5 benchmarks: AST extraction, framework detection, risk classification) - Rust dependabot (weekly automated dependency updates) - Test fixtures for benchmarking (Python/Rust/JavaScript samples) ### Changed - **Dependencies updated**: - tower 0.4 β†’ 0.5 (compatible with axum 0.7) - Tree-sitter grammar audit (documented 0.23/0.24/0.25 compatibility) - **Binary size optimizatiHigh4/10/2026
v6.0.0## Plugin System + Enterprise Mode + i18n **BREAKING CHANGE**: Major version bump for plugin system architecture and enterprise features. ### Plugin System Extensible lifecycle hooks for pipeline events: ```yaml plugins: - name: "slack-notifier" hooks: [on_pr_created, on_error] config: webhook_url: "https://hooks.slack.com/test" channel: "#devops" - name: "custom-audit" hooks: [on_analysis_complete, on_pr_merged] ``` **Available hooks:** - `on_analysis_complete` β€”High4/7/2026

Dependencies & License Audit

Loading dependencies...

Similar Packages

crab-codeπŸ¦€ Open-source alternative to Claude Code, built from scratch in Rust. Agentic coding CLI β€” thinks, plans, and executes with any LLM. Compatible with Claude Code workflows.main@2026-04-21
claude-doctor-skillAudit projects for security, broken hooks, tests, and CI issues across 20+ languages with adaptive scoring and actionable fixes.main@2026-04-21
PulSeedAn AI agent system that grows your goals from seed to tree. Set a goal β€” Seedy observes, delegates, and tracks until done.v0.4.17
ryvosOpen-source autonomous AI assistant with 5-tier security, 62 tools, 14 LLM providers. Written in Rust. Single binary.v0.9.0
agent-brainAgent ReAct framework with cognitive planning engine β€” five-phase cognitive cycle with nested ReAct loops, dynamic skill acquisition, and interactive user input.v0.1.2