Appearance
Greptile CLI
FreshTrigger local code reviews from your terminal.
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:
bash
npm i -g greptileCheck that the command works:
bash
greptile --versionPrerequisites
- Sign up for a Greptile account
- A local Git repository with commits to review
Sign in
Authenticate once on each device:
bash
greptile loginCheck the signed-in account and org membership:
bash
greptile whoamiTo sign out:
bash
greptile logoutReview a branch
Checkout to the branch you're working in and run a review from the repository root:
bash
git checkout new-feature
greptile reviewBy 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:
bash
greptile review -b mainResume the latest unfinished review:
bash
greptile review --resumeShow findings inline with the relevant code:
bash
greptile review --diff!Greptile CLI review running in a terminal
Increase the surrounding code shown with inline findings (default: 15):
bash
greptile review --diff --context=25Output formats
Use JSON when another tool needs to parse the review:
bash
greptile review --jsonUse plain text for agent workflows or scripts:
bash
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:
bash
greptile review showOpen a review by ID:
bash
greptile review show REVIEW_IDCommand reference
| Command | What it does |
|---|---|
greptile login | Sign in with your Greptile account |
greptile logout | Sign out on this device |
greptile whoami | Show account and org membership |
greptile review | Review the current branch against its base |
greptile review show [ID] | Reopen a past review |
Review options
| Flag | Purpose |
|---|---|
-b, --branch=<BRANCH> | Base branch to compare against. Defaults to the repo default branch |
--resume | Continue the latest unfinished review |
--diff | Show findings inline with the relevant code |
--context=<LINES> | Lines of surrounding code. Default is 15 |
--json | Print machine-readable output |
--text, --agent | Print plain text. --agent is an alias for --text |
--width=<COLUMNS> | Set output width |
--no-color | Disable colored output |
Next
MCP
Use Greptile review data from your editor or coding agent.
Source
Mirrored from the official Greptile documentation. Self-contained reference copy.