greptile

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Greptile CLI Review

Greptile CLI 审查

Run Greptile (
greptile
) for automated branch review before push. Pair with
coderabbit
for the default pre-CI workflow — both tools catch different issues and mirror CI.
在推送前运行Greptile
greptile
)进行自动化分支审查。搭配**
coderabbit
**使用以实现默认的CI前工作流——这两款工具能发现不同的问题,且与CI流程同步。

Relationship to analyze-* skills

与analyze-*技能的关系

The
analyze-code
,
analyze-project
, and
analyze-tests
skills are for manual or agent-driven pre-review checks—they run concrete commands (lintro, ripgrep, coverage, etc.) and produce structured findings before you open a PR.
This skill uses Greptile CLI for external AI branch review. Follow the
lint
and
test
skills (or the
commit
skill, which includes them) before invoking Greptile. Do not duplicate full analyze rubrics here.
analyze-code
analyze-project
analyze-tests
技能用于手动或Agent驱动的审查前检查——它们会运行具体命令(如lintro、ripgrep、coverage等),并在你发起PR前生成结构化检查结果。
本技能使用Greptile CLI进行外部AI分支审查。在调用Greptile之前,请先执行
lint
test
技能(或包含这两者的
commit
技能)。请勿在此重复完整的analyze检查规则。

Relationship to coderabbit

与coderabbit的关系

Default pre-push flow when CI runs both tools:
text
commit → [greptile ‖ coderabbit] → pr
Each step names the skill to follow.
Run greptile and coderabbit in parallel (
) when possible. Greptile is typically faster (~1 min). Do not re-run on unchanged code.
当CI同时运行两款工具时,默认的推送前流程如下:
text
commit → [greptile ‖ coderabbit] → pr
每个步骤标注了后续应执行的技能。
尽可能并行(
)运行greptilecoderabbit。Greptile通常速度更快(约1分钟)。请勿对未修改的代码重复运行。

Prerequisites

前置条件

bash
greptile login
greptile whoami
Install:
npm i -g greptile
or see Greptile CLI.
bash
greptile login
greptile whoami
安装方式:
npm i -g greptile
或查看 Greptile CLI

Commands

命令

  • greptile review -b main --agent
    — Review current branch vs main (default for agents)
  • greptile review --diff
    — Findings inline with relevant code
  • greptile review --json
    — Machine-readable output (use instead of
    --agent
    for parsing)
  • greptile review --resume
    — Continue the latest unfinished review
  • greptile review show [ID]
    — Reopen a past review
--agent
is an alias for
--text
(plain text, not JSON). Use
--json
when a tool needs structured output.
  • greptile review -b main --agent
    — 审查当前分支与main分支的差异(Agent默认使用该命令)
  • greptile review --diff
    — 在相关代码旁内嵌显示检查结果
  • greptile review --json
    — 生成机器可读格式的输出(解析时使用该命令替代
    --agent
  • greptile review --resume
    — 继续最近未完成的审查
  • greptile review show [ID]
    — 重新查看过往审查记录
--agent
--text
的别名(纯文本格式,非JSON)。当工具需要结构化输出时,请使用
--json

Rules

规则

  • Max 2 Greptile runs per change set (workflow discipline)
  • Commit before running — Greptile reviews branch commits vs base; uncommitted changes are ignored
  • Default to
    -b main
    unless the repo uses a different default branch
  • Run from the repository root on the feature branch
  • 每个变更集最多运行2次Greptile(遵循工作流规范)
  • 运行前先提交代码 — Greptile审查分支提交与基准分支的差异;未提交的变更会被忽略
  • 默认使用
    -b main
    ,除非仓库使用其他默认分支
  • 在功能分支的仓库根目录下运行命令

Usage

使用方法

When asked to run Greptile or as part of pre-push review:
  1. Ensure changes are committed and lint/tests pass
  2. Run
    greptile review -b main --agent
    (can run parallel with CodeRabbit)
  3. Analyze findings; address critical/major issues
  4. After fixes to Greptile-sensitive areas, optional verification pass
  5. Track run count (max 2 per change set)
For Raycast extension PRs, run static greps from
pr-raycast
before the CLI review.
当需要运行Greptile或作为推送前审查的一部分时:
  1. 确保变更已提交,且lint和测试通过
  2. 运行
    greptile review -b main --agent
    (可与CodeRabbit并行运行)
  3. 分析检查结果;处理严重/主要问题
  4. 在修改Greptile重点关注的区域后,可选择性进行验证
  5. 记录运行次数(每个变更集最多2次)
对于Raycast扩展PR,在运行CLI审查前,请先执行
pr-raycast
中的静态grep检查。

Differences from CodeRabbit

与CodeRabbit的差异

CodeRabbitGreptile
Scope
all
/
committed
/
uncommitted
Branch commits vs base only
Agent output
--agent
→ JSON stream
--agent
→ plain text;
--json
for machine-readable
Base branch
--base main
-b main
项目CodeRabbitGreptile
审查范围
all
/
committed
/
uncommitted
仅对比分支提交与基准分支
Agent输出格式
--agent
→ JSON流
--agent
→ 纯文本;如需机器可读格式请使用
--json
基准分支参数
--base main
-b main

References

参考链接