商业产业 Hacker News Agent 2026-08-27T14:50 正文 ok 918 words

Show HN:Proval——面向 GitLab、Forgejo 和 GitHub 的自托管代码审查 Agent

英文标题:🔶 Show HN: Proval – Self-hosted code review agent for GitLab, Forgejo, and GitHub

Proval 是一款可自托管的 LLM 代码审查 Agent,可连接 GitLab、Forgejo 和 GitHub,并允许用户使用自有模型或内部模型网关。它兼容 OpenAI Chat Completions API,因此可接入 OpenAI、Ollama、llama.cpp 等本地或云端模型;Anthropic 和 Gemini 的原生集成正在规划中。Proval 可对 Pull Request、Issue、行内评论及讨论线程进行自动响应,并记录每次活动的 Token 消耗以追踪模型成本。项目可通过 Docker Compose、Docker 或 Kubernetes 部署,对希望在内网、HomeLab 或隐私环境中运行代码审查 Agent 的开发者具有实用价值。
打开原文相关 3 · 机会 3
media31.1 KB media361.3 KB media122.2 KB

中文

Proval

一款自托管的 LLM 代码审查 Agent。将它连接到你的 Git 托管平台,使用你自己的模型,让它在你的基础设施上审查 Pull Request 和 Issue。

网站 | 演示 | 文档

视频/嵌入内容:演示视频

  • 易于部署 Proval 只需 3 分钟、不到 10 行配置即可部署到你的服务器。

  • 自带 LLM(包括本地模型) Proval 支持兼容 OpenAI 的 Chat Completions API,因此你可以使用 OpenAI、Ollama 和 llama.cpp 等本地模型 API,或任意内部 LLM 网关。Anthropic 和 Gemini 支持计划作为一等集成推出。

  • 支持 GitLab、Forgejo 和 GitHub Proval 支持 GitLab、Forgejo 和 GitHub。Gitea 和 Codeberg 也可通过兼容 Forgejo 的 API 自然接入。

  • 在自己的网络中运行 你可以在内部网络、HomeLab 或注重隐私的环境中使用 Proval,无需依赖外部代码审查 SaaS。

  • Pull Request 审查 当 Pull Request 收到有实际意义的推送(或草稿状态转为就绪)时,Proval 会读取 diff,将变更文件划分为审查单元,运行专业子 Agent 调查每个分组,并生成按严重程度归类发现结果的汇总审查意见。每个子 Agent 都会独立探索代码库,因此能够发现跨文件问题和隐藏依赖。仓库设置可选择关闭、仅首次推送时审查,或每次推送都审查。

  • Issue 回复 同样支持 Issue。Proval 会在 Issue 创建时留下评论,并可在有人回复后继续响应。你可以将其设为回复每条消息,或仅在被 @ 提及时回复。

  • 行内评论 发现结果会直接发布在受影响的代码行上。Proval 支持 GitHub、GitLab 和 Forgejo 的单行及多行定位。

  • 线程式回复 当有人回复 Proval 的评论时,它会读取线程上下文并作出回应。你可以设置为仅在被提及时回复,或回复每条评论。

  • 活动追踪 每次审查、回复和 Issue 评论都会连同 Token 用量一并记录,便于你追踪模型成本。

Proval 活动仪表盘

试用 Proval 最简单的方式是通过 Docker Compose 运行它。

Docker Compose(推荐)

services:
    proval:
        image: ghcr.io/seoes/proval:latest
        ports:
            - "7900:7900"
            - "7901:7901"
        volumes:
            - ./data:/data
        environment:
            - ENCRYPTION_KEY=[Encryption Key]

ENCRYPTION_KEY 是通过 openssl rand -base64 32 生成的随机字符串。

局域网 HTTP 无需额外设置。当仪表盘通过 HTTPS 提供服务时,请设置 COOKIE_SECURE=true,以便将会话 Cookie 标记为 Secure。参见快速开始 HTTPS。

docker run -d \
  --name proval \
  -p 7900:7900 \
  -p 7901:7901 \
  -v proval-data:/data \
  -e DB_FILE_NAME=/data/app.db \
  -e ENCRYPTION_KEY=[Encryption Key] \  # openssl rand -base64 32
  ghcr.io/seoes/proval:latest

当仪表盘通过 HTTPS 提供服务时,添加 -e COOKIE_SECURE=true。

请保持单个副本(SQLite 位于 /data),使用 Recreate,并固定镜像标签。完整说明参见:Kubernetes 示例。

apiVersion: v1
kind: Secret
metadata:
    name: proval
type: Opaque
stringData:
    encryption-key: "[Encryption Key]"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
    name: proval-data
spec:
    accessModes:
        - ReadWriteOnce
    resources:
        requests:
            storage: 10Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
    name: proval
spec:
    replicas: 1
    strategy:
        type: Recreate
    selector:
        matchLabels:
            app: proval
    template:
        metadata:
            labels:
                app: proval
        spec:
            containers:
                - name: proval
                  image: ghcr.io/seoes/proval:latest
                  ports:
                      - name: dashboard
                        containerPort: 7900
                      - name: webhook
                        containerPort: 7901
                  env:
                      - name: ENCRYPTION_KEY
                        valueFrom:
                            secretKeyRef:
                                name: proval
                                key: encryption-key
                      - name: DB_FILE_NAME
                        value: /data/app.db
                  volumeMounts:
                      - name: data
                        mountPath: /data
                  readinessProbe:
                      httpGet:
                          path: /api/health
                          port: 7900
                  livenessProbe:
                      httpGet:
                          path: /api/health
                          port: 7900
            volumes:
                - name: data
                  persistentVolumeClaim:
                      claimName: proval-data
---
apiVersion: v1
kind: Service
metadata:
    name: proval
spec:
    selector:
        app: proval
    ports:
        - name: dashboard
          port: 7900
          targetPort: dashboard
        - name: webhook
          port: 7901
          targetPort: webhook


Webhook event
  -> Repository settings
  -> Git provider API
  -> LLM agent with code review tools
  -> Review comments or replies

Pull request review
  -> Planning agent (group changed files)
  -> Specialist sub-agents (parallel)
  -> Writing agent (summary + inline comments)
  -> Git provider comments
  • Bun

  • Hono

  • Sveltekit

  • SQLite

    git clone git@github.com:seoes/proval.git cd proval bun install cp .env.example .env

    fill in your env vars

    bun dev

我当时在寻找一款可使用自有 LLM 的自托管代码审查工具,但没有找到我满意的产品。作为 HomeLab 用户,我还发现能支持个人 GitLab 的代码审查 Agent 很少。因此,我构建了这款自托管代码审查 Agent——Proval。

它仍处于早期阶段,存在一些不够完善的地方,也有功能尚未实现。我正在积极开发它,而反馈是你能提供的最有价值帮助。如果你提交功能请求或 Bug 报告 Issue,这将帮助我,也将帮助其他使用 Proval 的人。

我相信每个人终有一天都会拥有自己的本地 LLM。模型会持续变得更智能,代码审查能力也会不断提升。如今硬件价格相当高,但未来会变得更便宜。希望我们能以更好的性能运行个人 LLM,同时保持数据私密和安全。

  • 自定义用户提示词
  • 身份验证与授权
  • SSO 支持
  • 基于 OAuth 订阅的 LLM Provider 集成
  • 提升审查质量
    • 减少误报
    • 仅聚焦关键问题
  • 速率限制
  • 仅回复特定用户
  • 按模型进行基准测试

采用 GNU Affero General Public License v3.0 许可证。

English / 原文

Proval

A Self-hosted LLM code review agent. Connect it to your Git host, bring your own model, and let it review pull requests and issues on your own infrastructure.

Website | Demo | Docs

demo.mp4

  • Easy deploy Proval takes 3 min, less than 10 lines to deploy to your server

  • Bring your own LLM (Even local models) Proval works with OpenAI-compatible Chat Completions APIs, so you can use OpenAI, local model APIs like Ollama and llama.cpp, or any internal LLM gateway. Anthropic and Gemini support are planned as first-class integrations.

  • GitLab, Forgejo, and GitHub support Proval supports GitLab, Forgejo, and GitHub. Gitea and Codeberg are also a natural fit through Forgejo-compatible APIs.

  • Run it on your own network Use Proval inside an internal network, homelab, or privacy-focused environment without depending on an external review SaaS.

  • Pull request review When a pull request gets a meaningful push (or a draft becomes ready), Proval reads the diff, groups changed files into review units, runs specialist sub-agents to investigate each group, and writes a consolidated review with findings grouped by severity. Each sub-agent explores the codebase on its own, so it can catch cross-file issues and hidden dependencies. Repository settings choose off, first push only, or every push.

  • Issue replies Works on issues too. Proval leaves a comment when one opens, and can reply when someone comments back. You can set it to respond to every message or only when @mentioned.

  • Inline comments Findings are posted directly on the affected lines of code. Proval handles single-line and multi-line positions for GitHub, GitLab, and Forgejo.

  • Threaded replies When someone replies to a Proval comment, it reads the thread context and responds. You can set it to reply only when mentioned or reply to every comment.

  • Activity tracking Every review, reply, and issue comment is logged with token usage so you can track model costs.

Proval activity dashboard

The easiest way to try Proval is to run it with Docker Compose

Docker Compose (Recommended)

services:
    proval:
        image: ghcr.io/seoes/proval:latest
        ports:
            - "7900:7900"
            - "7901:7901"
        volumes:
            - ./data:/data
        environment:
            - ENCRYPTION_KEY=[Encryption Key]

ENCRYPTION_KEY is a random string generated by openssl rand -base64 32.

LAN HTTP needs no extra setting. When the dashboard is served over HTTPS, set COOKIE_SECURE=true so the session cookie is marked Secure. See Quick Start HTTPS.

docker run -d \
  --name proval \
  -p 7900:7900 \
  -p 7901:7901 \
  -v proval-data:/data \
  -e DB_FILE_NAME=/data/app.db \
  -e ENCRYPTION_KEY=[Encryption Key] \  # openssl rand -base64 32
  ghcr.io/seoes/proval:latest

When the dashboard is served over HTTPS, add -e COOKIE_SECURE=true.

Keep one replica (SQLite on /data), use Recreate, and pin an image tag. Full notes: Kubernetes example.

apiVersion: v1
kind: Secret
metadata:
    name: proval
type: Opaque
stringData:
    encryption-key: "[Encryption Key]"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
    name: proval-data
spec:
    accessModes:
        - ReadWriteOnce
    resources:
        requests:
            storage: 10Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
    name: proval
spec:
    replicas: 1
    strategy:
        type: Recreate
    selector:
        matchLabels:
            app: proval
    template:
        metadata:
            labels:
                app: proval
        spec:
            containers:
                - name: proval
                  image: ghcr.io/seoes/proval:latest
                  ports:
                      - name: dashboard
                        containerPort: 7900
                      - name: webhook
                        containerPort: 7901
                  env:
                      - name: ENCRYPTION_KEY
                        valueFrom:
                            secretKeyRef:
                                name: proval
                                key: encryption-key
                      - name: DB_FILE_NAME
                        value: /data/app.db
                  volumeMounts:
                      - name: data
                        mountPath: /data
                  readinessProbe:
                      httpGet:
                          path: /api/health
                          port: 7900
                  livenessProbe:
                      httpGet:
                          path: /api/health
                          port: 7900
            volumes:
                - name: data
                  persistentVolumeClaim:
                      claimName: proval-data
---
apiVersion: v1
kind: Service
metadata:
    name: proval
spec:
    selector:
        app: proval
    ports:
        - name: dashboard
          port: 7900
          targetPort: dashboard
        - name: webhook
          port: 7901
          targetPort: webhook


Webhook event
  -> Repository settings
  -> Git provider API
  -> LLM agent with code review tools
  -> Review comments or replies

Pull request review
  -> Planning agent (group changed files)
  -> Specialist sub-agents (parallel)
  -> Writing agent (summary + inline comments)
  -> Git provider comments
  • Bun

  • Hono

  • Sveltekit

  • SQLite

    git clone git@github.com:seoes/proval.git cd proval bun install cp .env.example .env

    fill in your env vars

    bun dev

I was looking for a self hosted code review using my own LLM but couldn't find one I liked. As a HomeLab user, I also found only few code review agents that worked with my personal GitLab. That's why I built this self hosted code review agent Proval

It's still early. There are rough edges, missing features. I am actively developing it and feedback is the most useful thing you can give. If you open an issue for feature request or bug report, it'll helps me and everyone else using Proval.

I believe everyone will get their own Local LLM someday. Models keep getting smarter, and they keep getting better at code review. Hardware is quite expensive now but someday it will get cheaper. Hope we can run personal LLMs with better performance, keep our data private and safe.

  • Custom User Prompt
  • Authentication and authorization
  • SSO support
  • LLM Provider integration based on OAuth subscriptions
  • Enhance review quality
    • Reduce False Positives
    • Focus on critical issues only
  • Rate limit
  • Only respond to certain users
  • Benchmark by models

Licensed under the GNU Affero General Public License v3.0.