Determine what to review. Based on what was requested, pick the right air invocation:
a. A specific commit:
air --wait --json --commit <commit-hash>
b. A range of commits (e.g., "last 3 commits", "commits since Tuesday"):
Determine the range. For the last N commits, find the Nth parent: git rev-parse HEAD~N. Run:
air --wait --json --commits <start-hash>..<end-hash>
c. A branch diff (e.g., "what changed on feature-x"):
air --wait --json --branch <base-branch>
d. The current gg stack — when on a branch matching the user/name pattern (no -- in name) and .git/gg/config.json exists:
Read the gg base branch from config (parse defaults.base, fall back to main). Run:
air --wait --json --commits <gg-base>..HEAD
This shows the full stack diff, matching what ai-review displays when opening a gg stack.
The air --wait --json command opens the ai-review desktop app and blocks until the human submits. The output is structured JSON.