Supercharge your Gerrit workflow with LLM-powered code reviews and fixes
Project description
clerrit
Supercharge your Gerrit Code Review workflow with LLM-powered code reviews and fixes!
clerrit is a CLI tool which bridges Gerrit Code Review with Claude Code.
The current features are, for a given change and patchset:
-
Review a Gerrit change using Claude Code, identifying bugs, security issues, edge cases, style problems, and missing error handling.
This command only shows a code review report in Claude Code, helping you write your actual review comments on Gerrit. It doesn't send anything to Gerrit.
-
Address Gerrit code review comments by having Claude Code fix the issues based on reviewer feedback.
Claude Code fixes the code locally without running
git add,git commit, or such. It doesn't send anything to Gerrit.Your typical workflow after having reviewed the changes would be something like:
$ git add -u $ git commit --amend --no-edit $ git reviewYou could also use
git stash push/git stash pop, cherrypick, or create a fixup commit and rebase.
clerrit is meant to assist reviewers and developers, not to replace them.
Try it now!
-
Make clerrit review the latest patchset of change 27362 using the
reviewremote of the current Git repository:$ uvx clerrit review 27362 --mdYou'll end up in Claude Code performing a code review, providing raw Markdown comments for specific files and line numbers.
-
Make clerrit address the code review of the latest patchset of change 1189 using the
reviewremote of the current Git repository:$ uvx clerrit fix 1189You'll end up in Claude Code fixing the code to address the review comments.
See clerrit --help to learn more.
What clerrit does
-
reviewcommand:-
Fetches the patchset from the Gerrit remote.
-
Creates a temporary local branch with the change.
-
Launches Claude Code with a prompt to analyze the latest commit for bugs, security issues, edge cases, style problems, and missing error handling.
-
If a
CONTRIBUTING*file exists, mentions it as context.
-
-
fixcommand:-
Fetches the patchset from the Gerrit remote.
-
Creates a temporary local branch with the change.
-
Queries the Gerrit server via SSH to retrieve all review comments for the patchset.
-
Launches Claude Code with the comments and instructions to fix the reported issues (without staging, committing, or creating new files unless requested).
-
Examples
-
Review latest patchset of change 15753:
$ clerrit review 15753 -
Review patchset 3 of change 15753:
$ clerrit review 15753 3 -
Review with raw Markdown output for Gerrit comments:
$ clerrit review 15753 --md -
Review using a custom remote instead of the default
review:$ clerrit review 15753 --remote=gerrit -
Review with extra context for Claude:
$ clerrit review 15753 --extra-prompt='Focus on memory safety.' -
Fix latest patchset based on review comments:
$ clerrit fix 8472 -
Fix a specific patchset:
$ clerrit fix 8472 2 -
Fix using a specific Claude model:
$ clerrit fix 8472 --model=sonnet -
Fix in YOLO mode:
$ clerrit fix 8472 --permission-mode=acceptEdits
Project details
Release history Release notifications | RSS feed
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 clerrit-0.3.0.tar.gz.
File metadata
- Download URL: clerrit-0.3.0.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27453233845420f6b14bbd0bf30dbfa2d866421b71de2344347f8cc056867731
|
|
| MD5 |
5b9e0fe3ed265484d9e05356ff5e43f6
|
|
| BLAKE2b-256 |
dfe2880f7bff81d956c3a75310e2260242e9330ba5126e8a26120ea2d5e1a54c
|
File details
Details for the file clerrit-0.3.0-py3-none-any.whl.
File metadata
- Download URL: clerrit-0.3.0-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63933cd79c73a007ba7f7d1de107aa78f1a76c3092fd7118b6604b191176cab0
|
|
| MD5 |
e03805c3c5407ff2f026850024a72f6b
|
|
| BLAKE2b-256 |
0c7a3192d82ebc60af2a559961bc152afbe835daba6e2dfb9f189e7a7b3b5853
|