Skip to main content

Documentation Index

Fetch the complete documentation index at: https://www.greptile.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Use the Greptile CLI to run local code reviews from your terminal. This page covers Greptile CLI v3.0.1. Review your current branch against its base branch, resume unfinished reviews, and reopen past reviews without leaving your shell.

Install

Install the CLI:
npm i -g greptile
Check that the command works:
greptile --version

Prerequisites

Sign in

Authenticate once on each device:
greptile login
Check the signed-in account and org membership:
greptile whoami
To sign out:
greptile logout

Review a branch

Checkout to the branch you’re working in and run a review from the repository root:
git checkout new-feature
greptile review
By default, Greptile compares your current branch against the repository’s default branch, usually main, and reviews the unmerged commits on the current branch. Uncommitted changes are ignored. Set the base branch explicitly and Greptile will compare current branch with this branch and review the unmerged commits:
greptile review -b main
Resume the latest unfinished review:
greptile review --resume
Show findings inline with the relevant code:
greptile review --diff
Greptile CLI review running in a terminal Increase the surrounding code shown with inline findings (default: 15):
greptile review --diff --context=25

Output formats

Use JSON when another tool needs to parse the review:
greptile review --json
Use plain text for agent workflows or scripts:
greptile review --agent
--agent is an alias for --text. Plain text is also used automatically when output is piped.

Reopen a past review

Open a recent review picker:
greptile review show
Open a review by ID:
greptile review show REVIEW_ID

Command reference

CommandWhat it does
greptile loginSign in with your Greptile account
greptile logoutSign out on this device
greptile whoamiShow account and org membership
greptile reviewReview the current branch against its base
greptile review show [ID]Reopen a past review

Review options

FlagPurpose
-b, --branch=<BRANCH>Base branch to compare against. Defaults to the repo default branch
--resumeContinue the latest unfinished review
--diffShow findings inline with the relevant code
--context=<LINES>Lines of surrounding code. Default is 15
--jsonPrint machine-readable output
--text, --agentPrint plain text. --agent is an alias for --text
--width=<COLUMNS>Set output width
--no-colorDisable colored output

Next

MCP

Use Greptile review data from your editor or coding agent.