Metadata-Version: 2.5
Name: reviewloop-ai
Version: 0.1.0
Summary: AI code review in your own CI with your own agent CLI (Claude Code, Codex or Cursor) for GitHub, GitLab and Bitbucket.
Project-URL: Homepage, https://github.com/tpham1467/reviewloop
Project-URL: Issues, https://github.com/tpham1467/reviewloop/issues
Author: tpham1467
License-Expression: AGPL-3.0-only
License-File: LICENSE
Classifier: Development Status :: 1 - Planning
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: atlassian-python-api>=3.41
Requires-Dist: httpx>=0.27
Requires-Dist: pydantic>=2.7
Requires-Dist: pygithub>=2.3
Requires-Dist: python-gitlab>=4.6
Requires-Dist: pyyaml>=6
Requires-Dist: typer>=0.12
Description-Content-Type: text/markdown

<p align="center">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="docs/assets/logo-dark.svg">
    <img alt="reviewloop" src="docs/assets/logo.svg" width="300">
  </picture>
</p>

<p align="center">
  <b>Self-hosted AI code review that runs in your own CI, with your own coding agent and your own keys.</b>
</p>

<p align="center">
  <a href="https://github.com/tpham1467/reviewloop/actions/workflows/ci.yml"><img alt="CI" src="https://img.shields.io/github/actions/workflow/status/tpham1467/reviewloop/ci.yml?branch=main&label=CI"></a>
  <a href="LICENSE"><img alt="License: AGPL-3.0" src="https://img.shields.io/badge/license-AGPL--3.0-blue"></a>
  <a href="pyproject.toml"><img alt="Python 3.11+" src="https://img.shields.io/badge/python-3.11%2B-blue"></a>
  <a href="https://pypi.org/project/reviewloop-ai/"><img alt="PyPI" src="https://img.shields.io/pypi/v/reviewloop-ai?label=PyPI"></a>
  <a href="https://github.com/marketplace/actions/reviewloop-ai-code-review"><img alt="GitHub Marketplace" src="https://img.shields.io/badge/Marketplace-reviewloop-blue?logo=github"></a>
  <a href="https://scorecard.dev/viewer/?uri=github.com/tpham1467/reviewloop"><img alt="OpenSSF Scorecard" src="https://api.scorecard.dev/projects/github.com/tpham1467/reviewloop/badge"></a>
  <a href="https://tpham1467.github.io/reviewloop/"><img alt="Docs" src="https://img.shields.io/badge/docs-mkdocs-blue"></a>
</p>

<p align="center">
  <b>English</b> | <a href="README.vi.md">Tiếng Việt</a>
</p>

<p align="center">
  <a href="docs/index.md">Docs</a> ·
  <a href="#quick-start">Quick start</a> ·
  <a href="docs/configuration.md">Configuration</a> ·
  <a href="#how-it-works">How it works</a> ·
  <a href="#evaluation">Evaluation</a> ·
  <a href="#comparison-with-other-tools">Comparison</a> ·
  <a href="CONTRIBUTING.md">Contributing</a>
</p>

<p align="center">
  <img alt="reviewloop posts a finding on line 12 of a real pull request, with a suggested change you can commit in one click, then flags client-controlled prices" src="docs/assets/demo-findings.webp" width="860"><br>
  <sub>A real run on a test pull request: inline findings on the exact lines, with a suggested change you can commit.</sub>
</p>

---

## What it does

reviewloop is a job in your own CI. It runs a coding agent (Claude Code) with your own key and posts the review on
the pull request. No server, no account, no telemetry. Live example:
[reviewloop-demo #3](https://github.com/tpham1467/reviewloop-demo/pull/3).

> **Status:** pre-release. The PyPI package, the image, the `v0` action tag and the GitLab component appear with the
> first release (`0.1.0`).

## Features

- **Inline findings on the exact line**, placed by the quoted code, with one-click suggested changes.
- **Re-check on command:** `/reviewloop recheck` replies in each open thread and resolves the fixed ones.
- **Security branch:** gitleaks and opengrep, then a security agent and an independent verify pass.
- **Quality gate** drops findings the diff disproves, never critical or protected-category ones.
- **No silent skips:** every file ends reviewed, excluded or failed; JSON + SARIF; exit code can fail the job.
- **Sandboxed agent:** read-only git, no VCS token, one JSON output that reviewloop validates before posting.

## How it works

<picture>
  <source media="(prefers-color-scheme: dark)" srcset="docs/assets/how-it-works-dark.svg">
  <img alt="A pull request or a /reviewloop review comment starts a job on your CI runner. reviewloop builds the context from the target branch, then runs code review, security and PR overview agents in a sandbox. A quality gate filters the findings, each is anchored on its quoted code, and reviewloop posts inline comments, a summary and JSON and SARIF results. After fixes, /reviewloop recheck replies in each thread and resolves the fixed ones." src="docs/assets/how-it-works-light.svg" width="100%">
</picture>

Config and rules are read from the target branch, so a pull request cannot change how it is reviewed.
Step by step: [How a review runs](docs/index.md#how-a-review-runs).

## Quick start

**GitHub Actions.** Add the secret `ANTHROPIC_API_KEY`, then save
[`examples/github-workflow.yml`](examples/github-workflow.yml) as `.github/workflows/reviewloop.yml`:

<details>
<summary>Workflow</summary>

```yaml
name: reviewloop

on:
  pull_request:
    types: [opened, reopened, ready_for_review]
  issue_comment:
    types: [created]

permissions:
  contents: write
  pull-requests: write

jobs:
  review:
    if: >-
      github.event_name == 'pull_request' ||
      (github.event.issue.pull_request && startsWith(github.event.comment.body, '/reviewloop') &&
       contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association))
    concurrency:
      group: reviewloop-${{ github.event.pull_request.number || github.event.issue.number }}
      cancel-in-progress: true
    runs-on: ubuntu-latest
    timeout-minutes: 60
    steps:
      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
        with:
          ref: ${{ github.event.pull_request.base.ref || github.event.repository.default_branch }}
          fetch-depth: 0
          persist-credentials: false
      - name: Fetch the pull request head
        env:
          PR_NUMBER: ${{ github.event.pull_request.number || github.event.issue.number }}
          GH_TOKEN: ${{ github.token }}
        run: |
          auth=$(printf 'x-access-token:%s' "$GH_TOKEN" | base64 -w0)
          echo "::add-mask::$auth"
          git -c "http.https://github.com/.extraheader=Authorization: Basic $auth" \
            fetch --no-tags origin "+refs/pull/${PR_NUMBER}/head:refs/remotes/pull/${PR_NUMBER}/head"
      - uses: tpham1467/reviewloop@v0
        env:
          ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
```

</details>

Open a pull request. After pushing fixes, comment `/reviewloop recheck`.

## Platforms

| Git provider | CI | Status | Notes |
| --- | --- | --- | --- |
| GitHub | GitHub Actions | Supported | Commands from a comment, one-click suggestions |
| GitLab (.com and self-managed) | GitLab CI | Supported | Commands through a Comments webhook |
| Bitbucket Cloud | Bitbucket Pipelines | Preview | No one-click suggestions; commands from a custom pipeline |
| Bitbucket Data Center | Jenkins | Preview | No one-click suggestions; Bitbucket DC 8.0+ to resolve threads |
| Azure DevOps Repos | Azure Pipelines | Not supported yet | |
| Gitea / Forgejo | Gitea Actions / Forgejo Actions | Not supported yet | |
| Gerrit | Zuul, Jenkins | Not supported yet | |

Setup: [GitHub](docs/getting-started/github.md) · [GitLab](docs/getting-started/gitlab.md) ·
[Bitbucket Cloud](docs/getting-started/bitbucket-cloud.md) ·
[Bitbucket Data Center + Jenkins](docs/getting-started/bitbucket-dc-jenkins.md).
Want another provider? [Open an issue](https://github.com/tpham1467/reviewloop/issues/new).

## Evaluation

21 seeded pull requests across C#, Go, Java, PHP / Laravel, Python / Django, TypeScript / NestJS and React, each
with one known bug. A deterministic scorer matches a finding by file, a 3-line window and category, with no LLM judge.
Run 2026-11-28 on `main` with Claude Code, both models at once on one machine; [method and cases](eval/).

| Model | Precision | Recall | TP / FP / FN | Wall time |
| --- | --- | --- | --- | --- |
| Claude Opus 5.5 | 0.68 | 0.90 | 19 / 9 / 2 | 25.3 min |
| Claude Sonnet 5.5 | 0.62 | 0.86 | 18 / 11 / 3 | 10.7 min |

Floors for a release: recall 0.6, precision 0.5. A false positive here is any finding beyond the seeded bug, so some
are real but unplanned issues.

## Comparison with other tools

**Why reviewloop:**

- Runs entirely in your CI, with your agent and your keys; no vendor holds a token for your repositories.
- Every finding sits on the exact lines it quotes, with one-click suggestions on GitHub and GitLab.
- `/reviewloop recheck` replies in every thread and resolves the fixed ones.
- gitleaks plus two security agents, the second verifying the first's findings.
- A CI signal: per-file coverage, exit codes and SARIF.

| | reviewloop (AGPL-3.0) | OpenPR (MIT) | PR-Agent (MIT) | CodeRabbit | GitHub Copilot code review |
| --- | --- | --- | --- | --- | --- |
| Runs in | Your CI | Your agent CLI, on your machine | Your CI, CLI or server | SaaS; self-hosted on Enterprise | GitHub |
| Vendor holds a repo token | No | No | No | Yes (SaaS) | — |
| Your own model or key | Yes (Claude Code) | Yes (your agent CLI) | Yes, via LiteLLM | Self-hosted only | No |
| Platforms | GitHub, GitLab; Bitbucket preview | GitHub, GitLab, Bitbucket Cloud | GitHub, GitLab, Bitbucket, Azure DevOps, Gitea, Gerrit | GitHub, GitLab, Bitbucket, Azure DevOps | GitHub, Azure DevOps |
| Re-check resolves fixed threads | Yes, on command | On re-review, if enabled | Tracks resolved findings | After a push | unclear |
| Exit code and SARIF | Yes | unclear | Labels; SARIF unclear | Status check; SARIF unclear | unclear |

Sources (as of 2026-11), more tools, what reviewloop does not do yet and when to pick something else:
[Comparison](docs/comparison.md). "unclear" means the vendor's docs do not say.

## Documentation

[How a review runs](docs/index.md#how-a-review-runs) ·
[Configuration](docs/configuration.md) ·
[Security model](docs/security.md) ·
[Agents](docs/agents/claude-code.md) ·
[FAQ](docs/faq.md) ·
[Comparison](docs/comparison.md) ·
[Roadmap](docs/index.md#roadmap) ·
[Contributing](CONTRIBUTING.md) ·
[Security policy](SECURITY.md)

## License

reviewloop is licensed under the [GNU Affero General Public License v3.0 only](LICENSE) (AGPL-3.0-only).

reviewloop is an independent project, not affiliated with or endorsed by Anthropic. Claude Code is used under
Anthropic's terms; each user brings their own credentials. Other product names belong to their owners.

## Star history

<a href="https://star-history.com/#tpham1467/reviewloop&Date">
  <img alt="Star history chart" src="https://api.star-history.com/svg?repos=tpham1467/reviewloop&type=Date" width="600">
</a>
