prxref
Fast automated AI code review for Bitbucket, GitLab, and GitHub.
prxref inspects pull and merge requests across the three major code hosting forges in sub-minute review cycles. It parses unified diffs, partitions changes into risk-ranked chunks, fans out parallel single-shot LLM reviews across a cheap-first model fallback chain, filters findings through deterministic quality gates, and publishes inline comments alongside an executive summary.
┌──────────────────────┐
│ Pull / MR URL │
└──────────┬───────────┘
│
▼
┌──────────────────────┐
│ detect_forge │
└──────────┬───────────┘
│
▼
┌──────────────────────┐
│ Forge Adapter │
│ (BB / GitHub / GL) │
└──────────┬───────────┘
│
▼
┌──────────────────────┐
│ Unified Diff │
└──────────┬───────────┘
│
▼
┌──────────────────────┐
│ Risk-Ranked Chunking │
└──────────┬───────────┘
│
▼
┌──────────────────────┐
│ Parallel LLM Workers │
│ (Fallback Chain) │
└──────────┬───────────┘
│
▼
┌──────────────────────┐
│ Quality Gate │
│ Line Align / Dedup │
└──────────┬───────────┘
│
▼
┌──────────────────────┐
│ Post Inline Comments │
│ + Summary │
└──────────────────────┘
Quickstart
Run reviews instantly without local installation using uvx, or install the CLI globally:
# Run one-shot review via uvx
uvx prxref review --pr-url https://github.com/org/repo/pull/123
# Or install tool globally
uv tool install prxref
prxref review --pr-url https://github.com/org/repo/pull/123
# Or install straight from source (works before the first PyPI release)
uv tool install git+https://github.com/sblattj/prxref
Review Any Forge
Pass any PR or MR URL directly. Forge type, repository namespace, and pull request ID are detected automatically:
# Bitbucket Cloud
prxref review --pr-url https://bitbucket.org/workspace/repo/pull-requests/42
# GitHub & GitHub Enterprise
prxref review --pr-url https://github.com/owner/repository/pull/108
# GitLab & Self-Hosted GitLab (including nested subgroups)
prxref review --pr-url https://gitlab.com/group/subgroup/project/-/merge_requests/15
LLM Configuration
prxref operates without direct cloud provider SDK keys (no Anthropic API keys). It ships with no default endpoint and no default model chain: point it at any OpenAI-compatible /chat/completions server (OpenRouter, Together, Groq, vLLM, Ollama, a self-hosted gateway), or install the optional litellm extra. PRXREF_LLM_BASE_URL and PRXREF_LLM_MODELS are required — leaving either unset exits 2 with an error naming the variable.
# Default backend: plain HTTP to any OpenAI-compatible endpoint
export PRXREF_LLM_BACKEND=http
export PRXREF_LLM_BASE_URL="https://openrouter.ai/api/v1"
export PRXREF_LLM_API_KEY="$OPENROUTER_API_KEY"
export PRXREF_LLM_MODELS="z-ai/glm-5.3-flash"
export PRXREF_LLM_REASONING_EFFORT=low
# Optional: in-process litellm extra
# pip install 'prxref[litellm]'
export PRXREF_LLM_BACKEND=litellm
export PRXREF_LLM_MODELS="openrouter/meta-llama/llama-3.3-70b-instruct,bedrock/anthropic.claude-3-7-sonnet-20250219-v1:0"
See docs/llm.md for architecture, failover behavior, and backend setup.
Forge Authentication
Configure the authentication token matching your forge:
| Forge | Environment Variable | Notes |
|---|---|---|
| Bitbucket | PRXREF_BITBUCKET_TOKEN |
Bearer token (workspace or repo access token) |
| Bitbucket (Basic) | PRXREF_BITBUCKET_USER + PRXREF_BITBUCKET_APP_PASSWORD |
App password fallback |
| GitHub | PRXREF_GITHUB_TOKEN |
Personal Access Token (PAT) or GitHub App token |
| GitHub Enterprise | PRXREF_GITHUB_ENTERPRISE_TOKEN |
Used when host is not github.com (falls back to PRXREF_GITHUB_TOKEN) |
| GitLab | PRXREF_GITLAB_TOKEN |
Personal, project, or group access token (PRIVATE-TOKEN) |
See docs/env-vars.md for the full configuration reference and docs/forges.md for forge specifics.
Webhook Server
Run prxref as a persistent daemon to handle webhook events from GitHub, Bitbucket, and GitLab:
prxref serve --port 8080 --host 0.0.0.0
The service exposes:
POST /webhook— verifies HMAC or token signatures per forge, enqueues incoming PR events, and responds immediately with202 Accepted. A background worker processes reviews serially.GET /health— liveness probe returning{"ok": true}.
CLI Flags
--pr-url URL— full web URL of the PR or MR (required forreview).--no-post— dry run; run review analysis and quality passes without writing comments to the forge.--max-chunks N— override maximum diff chunks evaluated (default8).-v, --verbose— output run timing, token counts, and finding breakdowns to stdout.
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 prxref-0.2.0.tar.gz.
File metadata
- Download URL: prxref-0.2.0.tar.gz
- Upload date:
- Size: 75.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36af857806f2b81702b3df4157aacb45d358a4d610f3edb6229cb256006372d9
|
|
| MD5 |
0708705cfed117fcfe39a41cc9233e8c
|
|
| BLAKE2b-256 |
9f833ccd144000eb3dc8786d61dec23a2e0bc7b26ef347fbd69ed19035cdc1e5
|
Provenance
The following attestation bundles were made for prxref-0.2.0.tar.gz:
Publisher:
release.yml on sblattj/prxref
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
prxref-0.2.0.tar.gz -
Subject digest:
36af857806f2b81702b3df4157aacb45d358a4d610f3edb6229cb256006372d9 - Sigstore transparency entry: 2611784225
- Sigstore integration time:
-
Permalink:
sblattj/prxref@9bf42fe56fe51e2d3dbfdc683ea3b7b31310cb19 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/sblattj
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@9bf42fe56fe51e2d3dbfdc683ea3b7b31310cb19 -
Trigger Event:
push
-
Statement type:
File details
Details for the file prxref-0.2.0-py3-none-any.whl.
File metadata
- Download URL: prxref-0.2.0-py3-none-any.whl
- Upload date:
- Size: 46.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92f35f1db39b79ed9063210d28c7f203f8be46c5e1defe688b55005f97e817e0
|
|
| MD5 |
3d2801018ff7aaf91e1354891941a989
|
|
| BLAKE2b-256 |
45c3164c8ce105f9abf7fcac8771042e2eb22a049fff6b56a8247de7ad1fbf8a
|
Provenance
The following attestation bundles were made for prxref-0.2.0-py3-none-any.whl:
Publisher:
release.yml on sblattj/prxref
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
prxref-0.2.0-py3-none-any.whl -
Subject digest:
92f35f1db39b79ed9063210d28c7f203f8be46c5e1defe688b55005f97e817e0 - Sigstore transparency entry: 2611784349
- Sigstore integration time:
-
Permalink:
sblattj/prxref@9bf42fe56fe51e2d3dbfdc683ea3b7b31310cb19 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/sblattj
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@9bf42fe56fe51e2d3dbfdc683ea3b7b31310cb19 -
Trigger Event:
push
-
Statement type: