Run a bounded AI review → fix → verify loop on your local branch — before you push.
RevRem asks Codex to review your branch against a base, applies valid actionable findings through a bounded remediation pass, reruns your own verification commands, and leaves an inspectable artifact trail — all locally, before you open a pull request.
Text version of the demo
$ revrem --base main --max-iterations 2 --check "pytest -q"
12:08:23|rev|1 |start: codex review --base main
12:10:14|rev|1 |[P1] Preserve failure artifacts when review startup fails
12:10:15|rem|1 |start: codex exec --full-auto --sandbox workspace-write ...
12:13:41|rem|1 |done
12:13:42|chk|1.1 |start: pytest -q
12:14:18|chk|1.1 |passed
12:14:19|rev|2 |clear
Review-remediation loop: clear (review_clear)
Artifacts: .revrem/runs/20260509T120823Z
JSON summary: .revrem/runs/20260509T120823Z/summary.json
The demo above is maintained from deterministic demo assets under
docs/assets/. Runscripts/record-demo --checkto verify the asciicast source has not drifted. It is not a live model-backed capture.
- Entirely local. No hosted service, no telemetry — RevRem runs on your machine against your checkout.
- Bounded and watched. Iterations are capped by default, and the run exits with a clear pass/fail status code you can gate CI or hooks on.
- Inspectable. Every run writes review, remediation, check, and summary artifacts you can read before committing or merging.
- Works at any stage. Use it pre-commit, pre-merge, or post-merge — wherever a fast, automated review-and-fix pass adds confidence.
Install from PyPI with pipx (recommended):
pipx install revrem
revrem --versionIf you do not use pipx, install into a managed virtual environment:
python -m pip install revrem
revrem --versionTo work on RevRem itself, see Development.
The repository and Python package use the public name
revrem. The legacycode-review-loopcommand remains available as a compatibility alias.
From the repository you want to review:
revrem --base main --max-iterations 2 --check "pytest -q"Add checks that match the target repository:
revrem \
--base main \
--max-iterations 2 \
--check "pytest -q" \
--check "git diff --check"Expected behavior:
- exit
0when the final loop status is clear; - exit
2when findings or check failures remain after the bounded loop; - write artifacts to
.revrem/runs/<timestamp>/; - append run metadata to
~/.local/share/revrem/runs.jsonlunless--no-run-historyis used.
Use repository-native checks. Python repositories can use pytest; TypeScript
repositories usually use commands such as pnpm test, pnpm run typecheck, and
pnpm run lint.
Before a live, model-backed loop, run setup diagnostics (no model is invoked):
revrem doctor --base main --check "pytest -q"revrem doctor validates the Git base, a writable artifact path, the Codex
executable, routed remediation harnesses, and configured checks. Use
--format json for automation. See the
operator guide
for the full diagnostics contract.
RevRem is intentionally local, watched, and bounded:
- Runs
codex reviewagainst a chosen base branch. - Detects whether the review is clear or has findings.
- Runs a bounded Codex remediation pass for valid actionable findings.
- Runs your configured verification commands.
- Repeats until the review is clear or
--max-iterationsis reached. - Writes review, remediation, check, and summary artifacts for inspection.
- Profiles keep long commands repeatable, with per-phase model, effort, and timeout control.
- Bundled expert profiles (
security,performance,refactor,test-gap,docs) give focused review lenses without writing TOML first. - Interactive wizard builds a run command in a plain terminal and previews the exact provider calls before anything runs.
- Finding triage and routing (optional) turn review prose into ordered, schema-validated actions and route them to the right harness/model.
- Auto-commit (optional) commits each verified remediation pass after your checks pass.
- Bug-report bundles package a failed run into a redacted, shareable archive.
- Static HTML reports render a finished run into a single, self-contained,
redacted-by-default HTML file (or a machine-readable JSON index) — no model
re-run, no network, safe to upload as a CI artifact (
revrem report). - Hands-off CI via the reference GitHub Action (
action.yml): runs a profile on a PR, uploads the redacted report, and posts a single updatable comment. ANSI-free in CI by default (--no-tty, auto-detected fromCI), least-privilege permissions, fork-PR safe. - Git hooks install bounded pre-push/pre-commit example hooks into a target repo.
- Examples and shell completions provide copyable profiles for common
stacks plus
revrem completions bash|zsh|fish. - Rich progress and an optional Textual TUI for richer watched-terminal runs.
Each of these is documented in depth in the
operator guide. Machine-readable
artifact contracts live under docs/52-api/.
Profiles keep long commands repeatable:
revrem config new final-pr --description "Full PR readiness check"
revrem config edit final-pr
revrem --profile final-prIn an interactive terminal, bare revrem (or revrem --wizard) opens a guided
setup. It offers your last compatible settings or the recommended defaults,
then shows a run-shape preview listing the exact provider CLI commands for
each phase before any model is called. Model, reasoning effort, and timeout are
selectable per phase (review, triage, remediation, commit-message drafting).
Project-local profiles can be saved to .revrem.toml without running the loop:
revrem --base main --max-iterations 2 --check "git diff --check" --save-profile final-prFor triage, routing, multi-harness setups, and the full wizard reference, see the operator guide.
Bundled expert profiles are available immediately:
revrem --profile security --dry-run
revrem config clone security security-localCopyable stack profiles live under examples/.
RevRem is a pre-merge confidence tool, not a substitute for review or tests. Its safety posture is built around local operator control:
- iteration count is bounded by default;
- generated run artifacts are kept out of normal commits;
- auto-commit requires a clean worktree before the loop starts, and commits only after configured checks pass;
- machine-readable output is opt-in (
--summary-format json); - local run history can be disabled with
--no-run-history; - no hosted service or telemetry is part of RevRem itself.
Use --commit-after-remediation only when each verified remediation pass should
become a git commit. Commit-hook failure handling, --no-redact bundle risks,
and the full auto-commit contract are documented in the
operator guide.
Optional extras must be installed into the same environment as revrem, so
revrem can import them at launch. If you installed with pipx, add the extra
with pipx too (use pip install "revrem[...]" only for a plain pip install).
For richer watched-terminal output:
pipx install --force "revrem[progress]"
revrem --profile final-pr --progress-style richThe optional TUI is dependency-gated so the default CLI stays lightweight:
pipx install --force "revrem[tui]"
revrem ui --profile final-prThe TUI renders Home, Profiles, Pipeline, Run Monitor, and Controls views, and shells through the same CLI command plans as normal terminal usage.
Alpha. RevRem is used daily in its own development and runs end to end today. The core review → fix → verify loop is stable; some CLI flags and artifact formats may still change ahead of a 1.0 release — pin a version if you depend on exact output.
- Codex must be installed and authenticated locally.
- The current directory must be the repository under review.
- The selected
--basebranch must share history with the current branch. - Review/remediation quality depends on the model and the checks you provide.
- Human review, security review, and release approval still matter.
- Avoid dirty worktrees unless the local edits are intentional and understood.
- Do not use unbounded iteration counts for unattended automation.
- Do not paste raw model transcripts or local run artifacts into public issues; use the redacted bug-report workflow instead.
git clone https://github.com/GitCmurf/revrem.git
cd revrem
./scripts/install-dev
./.venv/bin/revrem --versionRun the local gates:
pre-commit install
./scripts/dev-check
pre-commit run --all-filesRuff, mypy, pytest, DocOps checks, and git diff --check are required local and
CI gates. For a stable revrem command usable from other repositories, promote
a snapshot with ./scripts/promote-stable — see the
operator guide.
See CONTRIBUTING.md for contribution expectations, governed documentation, and release process details.
This project is licensed under the Apache License 2.0; see LICENSE for details. NOTICE contains project attribution and must be preserved where Apache-2.0 notice requirements apply.
