Skip to content

inferaldata/acre

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

acre - Agentic Code Review

A terminal code review tool where you and Claude review code together in real time.

You navigate diffs with vim keybindings. You add comments. In another terminal, Claude reads your comments and responds. acre hot-reloads and shows Claude's answers inline, right next to your questions.

acre demo

How It Works

Your review session is stored in .opencodereview.xml using the OpenCodeReview specification - a portable format designed for both humans and AI to read and edit. The file contains the diff, your comments, and Claude's responses. When either of you saves changes, acre reloads instantly.

Quick Start

cd acre
uv sync
uv run acre

That's it. acre reviews your uncommitted changes and creates .opencodereview.xml in your repo root.

Usage

acre                    # Review uncommitted changes (default)
acre --staged           # Only staged changes
acre --branch main      # Changes vs main branch
acre --commit abc123    # A specific commit
acre --pr 42            # GitHub PR (requires gh CLI)
acre --new              # Start fresh, ignore existing session

Everything auto-saves. Close acre, come back later, your comments and progress are still there.

Navigation

acre speaks vim. If you know vim, you already know acre.

Key What it does
j / k Scroll line by line
Ctrl-d / Ctrl-u Half-page jumps
Ctrl-f / Ctrl-b Full page jumps
g / G Jump to top / bottom
{ / } Previous / next file
[ / ] Previous / next hunk
n / N Next / previous comment

Reviewing

Key What it does
r Mark current file as reviewed
c Add comment at cursor (or on selection)
C Add file-level comment
e Edit comment at cursor
x Delete comment at cursor
v Visual mode - select lines, then c to comment on range

Panels

Key What it does
p Toggle comment panel (see all comments)
` Toggle LLM sidebar
a Analyze current file with Claude
Tab Toggle file panel
q Quit

Comment Categories

When adding a comment, choose a category:

  • NOTE - Observations, context, things to remember
  • SUGGESTION - Ideas for improvement (not blocking)
  • ISSUE - Problems that should be fixed
  • PRAISE - Positive feedback (yes, this matters!)

The Magic: LLM Collaboration

Here's where acre gets interesting.

The .opencodereview.xml file is designed to be read and written by LLMs. It includes:

  1. Instructions for Claude on how to participate
  2. Diff context so Claude can see what changed
  3. Your comments with a place for Claude to respond

Workflow

  1. Run acre and add some comments
  2. In another terminal: cat .opencodereview.xml | claude "Review this and respond to my comments"
  3. Claude edits the file, adding replies to your comments
  4. acre hot-reloads - Claude's responses appear inline!

Or just open the file in Claude Code and have a conversation about the code.

What Claude Sees

The .opencodereview.xml file uses the OpenCodeReview specification. Comments are stored as activities:

<activity>
  <category>issue</category>
  <content>Could this silently drop data?</content>
  <author><name>Jane Developer</name><email>jane@example.com</email></author>
  <location>
    <file>src/api.py</file>
    <lines><range><start>44</start><end>44</end></range></lines>
  </location>
  <replies>
    <!-- Claude adds replies here -->
  </replies>
</activity>

Claude responds by adding a reply inside <replies>:

<replies>
  <activity>
    <category>note</category>
    <content>Good catch. If item is None, transform() would fail...</content>
    <author><type>agent</type><name>Claude</name><model>opus</model></author>
  </activity>
</replies>

The file also contains embedded instructions and the diff context, so Claude has everything needed to understand and respond to your comments.

Tips

Visual selection: Press v to enter visual mode, move to select lines, then c to comment on the range. Great for commenting on multi-line changes.

File-level comments: Press C (capital) to add a comment about the whole file, not a specific line.

Comment navigation: Use n/N to jump between comments. Works even for file-level comments at the top.

Hot reload: Edit .opencodereview.xml externally (with Claude, vim, whatever). acre picks up changes automatically.

Session persistence: Your session is tied to the diff source. acre --branch main and acre --staged maintain separate sessions.

Development

git clone https://github.com/inferaldata/acre
cd acre/acre
uv sync
uv run acre

Built With

License

MIT

About

Agentic Code Review - TUI for AI-assisted code review

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages