Skip to main content
Use Greptile in Codex to inspect pull requests, run local reviews, and fix review feedback.
Prerequisites: Install Codex and git. Create a Greptile account and connect your repositories. Install gh for GitHub or glab for GitLab.

Installation

1

Set your Greptile API key

Create a key in Settings > Organization > API Keys. Export it in the shell that starts Codex:
Add the export to your shell profile if you want it available in new terminals. Do not commit the key.
2

Add the Greptile marketplace

3

Install the Greptile plugin

The plugin configures Greptile MCP and installs the $check-pr, $cli-review, and $greploop skills. Start a new Codex task after installation.
4

Authenticate your code-host CLI

Sign in to your code-host CLI:
Use glab auth login for GitLab.
5

Verify the installation

Check the marketplace, plugin, and MCP server:
The output should include the greptile-codex-plugins marketplace, the enabled greptile plugin, and the greptile MCP server with GREPTILE_API_KEY as its bearer token environment variable.Open a repository in a new Codex task. Test the skill and MCP connections:

What You Can Do

Once installed, ask Codex to work with Greptile reviews and local changes.

Check a Pull Request

$check-pr checks a GitHub PR or GitLab MR for unresolved comments, failed checks, and an incomplete description. It can fix issues and resolve threads when asked.

Review a Local Branch

$cli-review requires the Greptile CLI. Install it, then run greptile whoami to verify that GREPTILE_API_KEY is available.
$cli-review runs a Greptile CLI review against the current local branch and summarizes the findings.

Run the Full Review Loop

$greploop fixes feedback, triggers another review, and repeats until Greptile reaches 5/5 confidence with no unresolved comments. It stops after five iterations.
$check-pr and $greploop can change code, commit, push, and resolve review threads. Run them from the branch you want to update.

Example Prompts

Available Tools

The plugin gives Codex access to Greptile’s MCP server and three public skills:

Troubleshooting

Start a new Codex task after installation. If the skill is still missing, reinstall the plugin:
Check that the key is available in the shell that launched Codex:
Create a new API key if the current key was revoked.
Run codex plugin list and codex mcp list. Confirm the plugin is enabled, the MCP URL is https://api.greptile.com/mcp, and the bearer token environment variable is GREPTILE_API_KEY. Then restart Codex.
Confirm your code-host CLI is installed and signed in. Run gh auth status for GitHub or glab auth status for GitLab.
Run greptile whoami and greptile --version. The review must run from a Git repository with committed changes.

Next Steps

MCP setup

Configure Greptile MCP in other coding tools.

Agent skills

Learn how the review skills work.

Greptile CLI

Install the CLI and run local reviews.

Skills source

Review the public skill source.

Codex plugin source

Review the marketplace package and installation instructions.