The Code Review extension is an open-source Gemini CLI extension, built to enhance your repository's code quality. The extension adds a new command to Gemini CLI that analyzes code changes to identify a variety of code quality issues.
This extension is brought to you by the authors of the Gemini Code Assist GitHub App, which provides code reviews directly in your GitHub pull requests.
Install the Code Review extension by running the following command from your terminal (requires Gemini CLI v0.4.0 or newer):
gemini extensions install https://github.com/gemini-cli-extensions/code-reviewIf you do not yet have Gemini CLI installed, or if the installed version is older than 0.4.0, see Gemini CLI installation instructions.
The Code Review extension adds the /code-review command to Gemini CLI which analyzes code changes on your current branch for quality issues.
The Code Review extension adds the /pr-code-review command to Gemini CLI which analyzes code changes on your pull request for quality issues.
To use this extension for a pull request, you need to enable the github mcp server, and provide pull request information. You can either provide through /pr-code-review link/to/pull/request or by configuring the following environment variables:
REPOSITORY: The github repository which contains the pull request.PULL_REQUEST_NUMBER: The pull request number that need the code review.ADDITIONAL_CONTEXT: Additional context or specific area that should focus on.
- Gemini CLI extensions: Documentation about using extensions in Gemini CLI
- Blog post: Announcement of Gemini CLI Extensions
- GitHub issues: Report bugs or request features
- License: Apache License 2.0