跳到正文
GitHub·· 5 天前AI 评分60

CodePanel 开源多模型 PR 代码评审工具,支持自带 API key 与自托管

Code-Panel-AI/codepanel

AI 导读

CodePanel 发布面向 GitHub pull request 的 AI 代码评审工具,由多个模型各自独立评审,再由一个编排者模型合并结果、去重并剔除误报,最终在 PR 上发布一条评论。

正文

CI License: Apache-2.0

AI code review for GitHub pull requests, done by a panel of models instead of one. Several models review the change independently. An orchestrator model then merges their findings, drops duplicates and false positives, and posts a single review on the pull request.

A CodePanel review posted on a pull request

  • Free with your own API keys. Use a key from Anthropic, OpenAI, Google, DeepSeek, Groq or any OpenAI-compatible provider. You pay the provider per token, and CodePanel charges nothing for reviews on your keys.
  • Hosted or self-hosted. Use it at codepanel.ai, or run your own copy. It is open source under Apache-2.0.
  • Lives in the pull request. Reviews are posted as a PR comment and updated as you push. Comment /review to run one by hand, or /feedback to rate a finding.
  • Scriptable. It also comes with a CLI, an MCP server for coding assistants, and a GitHub Actions merge gate.

Get started on codepanel.ai

  1. Sign in at codepanel.ai with GitHub and choose the repositories to review.
  2. Add a provider API key under Settings → Provider keys. CodePanel builds a low-cost starter panel from it.
  3. Open a pull request, or comment /review on an existing one.

A review on the starter panel typically costs a few cents in provider fees. You need a developer API key: a Claude or ChatGPT subscription can't be used, because neither includes API access. The quickstart covers each step in detail.

How a review works

A panel is a few reviewers plus one orchestrator. Each reviewer reads the whole pull request with its own focus, called its role:

Role Looks for
Bugs & Security Logic errors, edge cases, error handling, security holes
Tests & Maintainability Untested changes, dead or duplicated code, confusing names
Docs & Best Practices The repository's own rules and docs, and framework guidance
Security A deeper pass on auth, payments and secrets
Performance Queries in loops, missing indexes, unbounded work
API & Migrations Breaking changes, schema and data migrations

The model for each reviewer is chosen separately from its role, so you can mix providers or give one role a stronger model. Reviewers run in parallel, and a provider that fails costs only its own reviewer. The orchestrator reads the reviews, not the diff, and writes the comment that gets posted.

Read more in Reviewers and panels and Choosing models.

Run it yourself

CodePanel runs on a Convex backend and a React frontend deployed to Cloudflare Workers. For local development you need Bun, a free Convex account and a GitHub account.

  1. Install dependencies and create your own Convex dev deployment:

    bun install
    bunx convex dev

    convex dev writes VITE_CONVEX_URL to .env.local and keeps your functions in sync. Leave it running.

  2. Create a GitHub OAuth app. Set its callback URL to https://<your-deployment>.convex.site/api/auth/callback/github.

  3. Set the backend secrets on your deployment, then generate the session signing keys:

    bunx convex env set AUTH_GITHUB_ID <client id>
    bunx convex env set AUTH_GITHUB_SECRET <client secret>
    bunx convex env set ENCRYPTION_KEY "$(openssl rand -hex 32)"
    bunx convex env set SITE_URL http://localhost:3000
    bunx @convex-dev/auth
  4. Start the app at http://localhost:3000:

    bun run dev

Provider API keys are added by each user in the app, not as server settings. Everything optional is listed in .env.example: the GitHub App, error tracking, and billing. Deploying to production is covered in Self-hosting.

Documentation

Using CodePanel (also at codepanel.ai/docs): Quickstart · Providers and keys · Triggering reviews · Budgets and limits · CLI · MCP server · Merge gate · Billing · Security · FAQ

The source for these pages is in src/content/docs/pages/.

Working on CodePanel:

Contributing

Contributions are welcome. Read CONTRIBUTING.md before opening a pull request. Report security issues privately as described in SECURITY.md, not in public issues. This project follows a Code of Conduct.

License

CodePanel is open source under the Apache License 2.0. You can use, modify, self-host and redistribute it, commercially or not. The license does not grant rights to the CodePanel name or logo, so a fork or hosted copy should use its own name.

Earlier versions were published under FSL-1.1-MIT. All of the code, including those versions, is now available under Apache-2.0.

The benchmark fixtures in tools/eval/fixtures/oss/ contain code copied from MIT, Apache-2.0, BSD and ISC projects, which stays under those licenses (see NOTICE and tools/eval/fixtures/oss/NOTICE.md).

来源:GitHub · github.com