AI-powered PR review agent that reviews pull requests with the depth of a senior engineer
Project description
โก VibePR
AI-Powered PR Review Agent
Reviews pull requests with the depth, care, and directness of a senior engineer.
๐ What is VibePR?
VibePR is an intelligent, opinionated PR review tool that combines built-in static analysis with LLM-powered semantic review to catch bugs, security vulnerabilities, and code quality issues that other tools miss.
Unlike linters, VibePR thinks at the level of logic, architecture, security, and intent.
Key Features
- ๐ Multi-dimensional analysis โ Security, logic, performance, and maintainability checks
- ๐ค AI-powered deep review โ Optional LLM integration (OpenAI / Anthropic) for semantic analysis
- ๐ฏ Smart verdicts โ Automatically determines APPROVE, REQUEST_CHANGES, or COMMENT
- ๐ Beautiful output โ Rich terminal UI, JSON for CI/CD, and Markdown for GitHub comments
- ๐ Web dashboard โ Browse and search past reviews with a premium dark-mode UI
- ๐ฆ GitHub integration โ Fetch PRs directly, post reviews as comments
- ๐พ Review history โ SQLite-backed storage for all past reviews
- ๐ง Configurable โ YAML configuration with per-project overrides
๐ฆ Installation
pip install vibepr
Or install from source:
git clone https://github.com/chandanhastantram/vibepr.git
cd vibepr
pip install -e .
โก Quick Start
Review a GitHub PR
# Review a public PR (no token needed)
vibepr review https://github.com/owner/repo/pull/123
# Review with GitHub token for private repos
export GITHUB_TOKEN=ghp_your_token
vibepr review https://github.com/owner/repo/pull/123
# Shorthand format
vibepr review owner/repo#123
Review Local Changes
# Review all uncommitted changes
vibepr review --local
# Review against a specific branch
vibepr review --local --base main
# Review only staged changes
vibepr review --local --staged
Deep AI Review
# Enable LLM-powered analysis (requires API key)
export OPENAI_API_KEY=sk-your-key
vibepr review https://github.com/owner/repo/pull/123 --deep
# Or use Anthropic
export ANTHROPIC_API_KEY=sk-ant-your-key
vibepr review --local --deep
Output Formats
# Beautiful terminal output (default)
vibepr review --local
# JSON for CI/CD pipelines
vibepr review --local --format json
# Markdown for GitHub comments
vibepr review --local --format markdown
# Post review directly to GitHub
vibepr review <PR_URL> --post
๐ What VibePR Checks
๐ด Security
| Check | Languages | Severity |
|---|---|---|
| Hardcoded secrets (AWS, Stripe, GitHub, OpenAI, etc.) | All | BLOCKER |
| SQL injection via string interpolation | Python, JS | BLOCKER |
| Command injection (os.system, subprocess shell=True) | Python | BLOCKER |
| Unsafe functions (eval, exec, pickle.loads) | Python, JS | BLOCKER |
| XSS via innerHTML | JavaScript | BLOCKER |
| Path traversal vulnerabilities | Python | WARNING |
| Database connection strings in code | All | BLOCKER |
๐ก Logic & Correctness
| Check | Languages | Severity |
|---|---|---|
| Bare except clauses | Python | WARNING |
| Swallowed exceptions (except + pass) | Python | WARNING |
| == None instead of is None | Python | SUGGESTION |
| == instead of === | JavaScript | WARNING |
| Floating promises (missing await) | JavaScript | WARNING |
| Empty catch blocks | JavaScript | WARNING |
๐ต Performance
| Check | Languages | Severity |
|---|---|---|
| N+1 query patterns in loops | Python, JS | WARNING |
| File opened without context manager | Python | WARNING |
| Sync fs operations blocking event loop | JavaScript | WARNING |
| HTTP requests inside loops | Python, JS | WARNING |
| useEffect without dependency array | React | WARNING |
| Event listeners without cleanup | JavaScript | SUGGESTION |
๐ข Maintainability
| Check | Languages | Severity |
|---|---|---|
| Magic numbers in logic | All | SUGGESTION |
| Deep nesting (>4 levels) | All | WARNING |
| Long functions (>50 lines) | Python | SUGGESTION |
| Missing docstrings on public APIs | Python | SUGGESTION |
| TODO/FIXME/HACK in new code | All | SUGGESTION/WARNING |
| Good type hints (praise) | Python | PRAISE |
| Good test coverage (praise) | All | PRAISE |
โ๏ธ Configuration
Create a .vibepr.yml in your project root or home directory:
github:
token: "" # Or set GITHUB_TOKEN env var
llm:
provider: "none" # "openai", "anthropic", or "none"
api_key: "" # Or set OPENAI_API_KEY / ANTHROPIC_API_KEY
model: "gpt-4o"
review:
security: true
logic: true
performance: true
maintainability: true
min_level: "suggestion" # "blocker", "warning", "suggestion", "praise"
ignore_patterns:
- "*.min.js"
- "package-lock.json"
- "*.lock"
output:
format: "terminal" # "terminal", "json", "markdown"
show_praise: true
color: true
dashboard:
host: "127.0.0.1"
port: 8777
db_path: "~/.vibepr/reviews.db"
๐ Web Dashboard
Launch the built-in web dashboard to browse and search past reviews:
vibepr dashboard
Opens at http://127.0.0.1:8777 with:
- ๐ Aggregate statistics across all reviews
- ๐ Review history with filtering
- ๐ Detailed finding view per review
- ๐จ Premium dark-mode UI
๐ Review History
# View recent reviews
vibepr history
# Filter by repo
vibepr history --repo owner/repo
# Filter by verdict
vibepr history --verdict REQUEST_CHANGES
# Limit results
vibepr history --limit 5
๐๏ธ Architecture
vibe_pr/
โโโ cli.py # Click CLI โ entry point
โโโ config.py # YAML config + env vars
โโโ models.py # Pydantic data models
โโโ reviewer.py # Core orchestrator
โโโ github_client.py # GitHub API (PyGithub)
โโโ diff_parser.py # Unified diff parsing
โโโ storage.py # SQLite review history
โโโ utils.py # Shared utilities
โโโ analyzers/ # Static analysis engines
โ โโโ security.py # Secret, injection, unsafe function detection
โ โโโ logic.py # Error handling, edge cases, comparisons
โ โโโ performance.py # N+1, memory leaks, blocking ops
โ โโโ maintainability.py # Complexity, naming, documentation
โโโ llm/ # LLM providers
โ โโโ openai_provider.py
โ โโโ anthropic_provider.py
โ โโโ prompts.py # Review prompt templates
โโโ formatters/ # Output renderers
โ โโโ terminal.py # Rich terminal UI
โ โโโ json_formatter.py
โ โโโ markdown.py
โโโ dashboard/ # Web dashboard (Flask)
โโโ app.py
โโโ templates/
โโโ static/
๐งช Testing
# Install dev dependencies
pip install -e ".[dev]"
# Run all tests
pytest tests/ -v
# Run with coverage
pytest tests/ -v --cov=vibe_pr --cov-report=term-missing
๐ Finding Levels
| Level | Icon | Meaning |
|---|---|---|
| BLOCKER | ๐ด | Must fix before merge. Logic errors, security vulnerabilities, data loss risks. |
| WARNING | ๐ก | Should fix. Performance issues, missing error handling, unclear naming. |
| SUGGESTION | ๐ต | Consider changing. Better patterns, simpler approaches, future-proofing. |
| PRAISE | ๐ข | What is done well. Good abstractions, smart optimizations, clean coverage. |
๐ License
MIT License โ see LICENSE for details.
Built with โค๏ธ by the VibePR team
โก Review code like a senior engineer, every time.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vibepr-1.0.0.tar.gz.
File metadata
- Download URL: vibepr-1.0.0.tar.gz
- Upload date:
- Size: 46.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d4dffedbb2add70e87ffd9c4d61284a162dac1c358e14d2067b727a5654f669
|
|
| MD5 |
74262ee73df9b79a0f9390d35688a41e
|
|
| BLAKE2b-256 |
47372e6d684f585b931eecb4d930d5be625c9b17bad24d97cd8dd874c971205d
|
File details
Details for the file vibepr-1.0.0-py3-none-any.whl.
File metadata
- Download URL: vibepr-1.0.0-py3-none-any.whl
- Upload date:
- Size: 49.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4683ace3a58411e1101ab1eac5a5188b1b90a9fbf59eb25d0ae09c5bedfacb1
|
|
| MD5 |
3214257585eebed2cfa924e19f63a3b7
|
|
| BLAKE2b-256 |
0bddacbd61f23389428b1d89ab8a979b8bf7fa3c2ef2701c4d2a6acf5b042244
|