Skip to main content

Supercharge your Gerrit workflow with LLM-powered code reviews and fixes

Project description

clerrit

PyPI version

Supercharge your Gerrit Code Review workflow with LLM-powered code reviews and fixes!

clerrit is a CLI tool which bridges Gerrit Code Review and 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.

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 review remote of the current Git repository:

    $ uvx clerrit review 27362 --md
    

    You'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 review remote of the current Git repository:

    $ uvx clerrit fix 1189
    

    You'll end up in Claude Code fixing the code to address the review comments.

See clerrit --help to learn more.

What clerrit does

  • review command:

    1. Fetches the patchset from the Gerrit remote.

    2. Creates a temporary local branch with the change.

    3. Launches Claude Code with a prompt to analyze the latest commit for bugs, security issues, edge cases, style problems, and missing error handling.

    4. If a CONTRIBUTING* file exists, mentions it as context.

  • fix command:

    1. Fetches the patchset from the Gerrit remote.

    2. Creates a temporary local branch with the change.

    3. Queries the Gerrit server via SSH to retrieve all review comments for the patchset.

    4. 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 Markdown output for Gerrit comments:

    $ clerrit review 15753 --md
    
  • Review using a different remote instead of gerrit:

    $ 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
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clerrit-0.1.3.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

clerrit-0.1.3-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file clerrit-0.1.3.tar.gz.

File metadata

  • Download URL: clerrit-0.1.3.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.17

File hashes

Hashes for clerrit-0.1.3.tar.gz
Algorithm Hash digest
SHA256 e5a7b6ad8a3efc7931dd8bfaa220659a502bb9601258880353d0bb5bec89c7e6
MD5 15760b48c43bd36e545941f73cce38a9
BLAKE2b-256 83917d8f93556ab312b6ae88f4993b3c64ab3d3bac32b583627b2d8d7c692486

See more details on using hashes here.

File details

Details for the file clerrit-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: clerrit-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.17

File hashes

Hashes for clerrit-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 819fd970087fd454c7a8993e8d3fe58a6cb0149abcf671733136672ea8b7fead
MD5 7074aca1db1e99393ea46f06c874c6cd
BLAKE2b-256 0bc486d947b267c9400842b10108b37c81204aabd1b39c6c5533034fbbf91f97

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page