Supercharge your Gerrit workflow with LLM-powered code reviews and fixes
Project description
clerrit
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:
$ clerrit review 18263This 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:
$ clerrit fix 2439Claude 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 can also use the
--no-fetchoption to avoid creating a new branch for the fix: just work in your current tree as is.
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.
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 Code:
$ clerrit review 15753 --extra-prompt='Focus on memory safety.' -
Fix the latest patchset, addressing the review comments of the last patchset:
$ clerrit fix 8472 -
Fix a specific patchset:
$ clerrit fix 8472 2 -
Fix the latest patchset, addressing the review comments of all the patchsets, and don't create a new branch:
$ clerrit fix 8472 all --no-fetch -
Fix with extra context for Claude Code:
$ clerrit fix 8472 --extra-prompt='Do NOT take into account the comments of Jérémie.' -
Fix using a specific Claude Code model:
$ clerrit fix 8472 --model=sonnet -
Fix in YOLO mode:
$ clerrit fix 8472 all --permission-mode=acceptEdits
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.adoc,CONTRIBUTING.md, orCONTRIBUTING.rstfile exists and there's noCLAUDE.mdfile, mentions it as context.
-
-
fixcommand:-
Without the
--no-fetchoption:-
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(s).
-
Launches Claude Code with the comments and instructions to fix the reported issues (without staging, committing, or creating new files, unless requested).
-
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.5.0.tar.gz.
File metadata
- Download URL: clerrit-0.5.0.tar.gz
- Upload date:
- Size: 11.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33717d97302a2b122d0f69f54db60c8d05399e7f8f3fac17b8a813f9f937da42
|
|
| MD5 |
e21c81fe70bcbaba86b1d644d56f3ba5
|
|
| BLAKE2b-256 |
257f6902bc5de02f8a8127bbc648f86d3d8c0cf26b58d59376c30076876d06c9
|
File details
Details for the file clerrit-0.5.0-py3-none-any.whl.
File metadata
- Download URL: clerrit-0.5.0-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a373162019b2b0f25da82cde03055eebc8d3d0d70ef72006369afd6ee47d5eb
|
|
| MD5 |
8aecd8081b09c65ce46b9a9a77ab57ed
|
|
| BLAKE2b-256 |
087fc8ca7037cac0895e140474e16f5ac2461cfa5e702a83b51db1bd0c232f1c
|