Runs a Greptile CLI review for the current local branch, installing or authenticating the CLI when needed, then summarizes JSON findings for the user. Use when
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-cli-review-9e7d1efc9357 ,按照其中的说明把「cli-review」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Run a Greptile review from the local checkout and summarize the findings.
Start from the current repository root:
git rev-parse --show-toplevel
If the command fails, tell the user that the Greptile CLI review must be run from a git repository.
Check whether greptile is installed:
command -v greptile
If it is missing, do not install it automatically. Ask the user for permission, then show the recommended install command:
npm i -g greptile
If npm is unavailable, offer the shell installer fallback:
curl -fsSL "https://greptile.com/cli/install" | sh
After installation, re-run command -v greptile.
Check the signed-in account:
greptile whoami
If the CLI reports that authentication is missing, run:
greptile login
Wait for the user to complete the login flow before continuing.
Prefer JSON output:
greptile review --json
If JSON output is unsupported or fails with a usage error, fall back to:
greptile review --agent
Do not hide the raw command failure if both commands fail. Summarize the failing command and the next action the user needs to take.
Parse JSON output when available and report:
When output is plain text, preserve the same structure as much as possible. Keep the summary concise and focused on actionable findings.