Skip to main content
Use the Greptile CLI to review local branches before you push. This page covers Greptile CLI v3.2.3.

Install

The npm package and install script require Node.js 22 or newer. Check the installed version:
Upgrade npm and install script builds with greptile update. For Homebrew, run brew upgrade greptile.

Sign in

Sign in once on each device:
For CI or self-hosted deployments, use an API key:
You can also store a key on the device. The command prompts for the key or reads it from stdin:
Do not pass the key as a command-line argument. Shell history and process lists can expose it. Check the current account and organizations:
Use greptile logout to remove stored credentials. See CLI Reviews on Self-Hosted Greptile to connect the CLI to a self-hosted deployment.

Review a branch

Run a review from the repository root:
Greptile compares the current branch with the repository’s default branch. It reviews committed changes that have not been merged. It ignores uncommitted changes. Set the base branch:
Give the reviewer extra instructions for this run:
Greptile applies the text like an @greptile <instructions> comment on a pull request. Resume the latest unfinished review for the repository:

Include a sensitive file

The CLI holds back changed files that look like they contain secrets. Use --include only after you confirm the file is safe to send:
Files passed to --include skip the sensitive-file check.

Change the output

Show findings beside the changed code:
--diff is shorthand for --layout diff. The default layout is comments. Greptile CLI review running in a terminal Change the number of nearby lines shown with each finding:
Use JSON for scripts:
Use plain text for agents or other tools:
--agent is an alias for --text. Plain text is also the default when output is piped.

Reopen a review

Open the recent review picker:
Open a review by ID:
When output is piped, or when you pass --json, --text, or --agent, omitting the ID prints recent reviews instead of opening the picker. review show accepts the same output, layout, context, width, and color flags as review.

Check review status

Check the latest review for HEAD:
Check another commit:
Add --json for machine-readable output. This command works in hooks and scripts. It uses these exit codes:

Inspect the effective review config

Show the review config that applies at the repository root:
Pass a file path to resolve directory-scoped settings, rules, and instructions for that file:
The output merges .greptile/ files, dashboard settings, and organization rules. Add --json for machine-readable output. See .greptile/ Configuration for the config format.

Save CLI settings

Run greptile settings in a terminal to open the interactive settings hub. It manages local CLI defaults, repositories, review settings, and team members. Use subcommands in scripts:
Add --json to settings, settings list, or settings get for machine-readable output. A command-line flag overrides the saved setting for that run.

Command reference

Run greptile <command> --help for command-specific help.

Review options

Fix commands

Next

CLI Onboarding

Set up an organization and run your first review.

MCP

Use Greptile review data from your editor or coding agent.