newspaperPress Guidelines
Pricing
Blog
Downloaddownload

Explore our next generation products

See overview

Products

antigravityAntigravity 2.0terminalAntigravity CLIcodeAntigravity IDEsdkAntigravity SDK

Built for developers in the agent-first era

See overview
EnterpriseFrontendFullstackScienceMarketer

Everything you need to stay up-to-date and get help

Documentationkeyboard_arrow_rightChangelogSupportPressReleases

Explore our next generation products

See overview

Products

antigravityAntigravity 2.0terminalAntigravity CLIcodeAntigravity IDEsdkAntigravity SDK

Built for developers in the agent-first era

See overview
EnterpriseFrontendFullstackScienceMarketer
Pricing
Blog

Everything you need to stay up-to-date and get help

Documentationkeyboard_arrow_rightChangelogSupportPressReleases
Home
Antigravity 2.0v2.3.1keyboard_arrow_right
Overview
Getting Started
Build with Google
Feature Overview
Models
Projects
Settingskeyboard_arrow_right
Overview
Agent Settings
Artifact Review
Customizationskeyboard_arrow_right
MCP
Skills
Rules
Plugins
Hooks
Sidecars
Agent Capabilitieskeyboard_arrow_right
Permissions
Subagents
Artifactskeyboard_arrow_right
Overview
Plan
Walkthrough
Screenshots
Antigravity CLIv1.1.5keyboard_arrow_right
Overview
Getting Started
Installation & Auth
Tutorial
Using AGY CLI
Features
Gemini Migration
Prompting
Artifactskeyboard_arrow_right
Overview
Conversations
Agent Capabilitieskeyboard_arrow_right
Choose an execution mode
Subagents
Sandbox
Permissions
Projects
Settingskeyboard_arrow_right
Overview
AI Credits
Customizationskeyboard_arrow_right
MCP
Plugins & Skills
Status Line
Window Title
Commandskeyboard_arrow_right
Agents (/agents)
Code Search (/codesearch)
AI Credits (/credits)
Diff (/diff)
Permissions (/permissions)
Resume (/resume)
Status Line (/statusline)
Window Title (/title)
Model Quotas (/usage, /quota)
Best Practices
Troubleshooting
Reference
Antigravity SDKv0.1.7keyboard_arrow_right
Overview + Quick Start
Customizationskeyboard_arrow_right
MCP
Antigravity IDEv2.1.1keyboard_arrow_right
Overview
Getting Started
Featureskeyboard_arrow_right
Tab
Side Panel
Review Changes
Artifactskeyboard_arrow_right
Plan
Walkthrough
Screenshots
Browser Recordings
Browserkeyboard_arrow_right
Overview
Allowlist / Denylist
Separate Chrome Profile
Customizationskeyboard_arrow_right
MCP
Skills
Rules
Workflows
Plugins
Hooks
Settings
Migrationkeyboard_arrow_right
Firebase Studio Migration
Enterprise
Plans
FAQ
  • side_navigation
  • Antigravity CLI
  • >
  • Commands
  • >
  • Diff (/diff)

Diff Command (/diff)link

View and review workspace changes, commit history, and agent turn diffs interactively within the TUI.

Overviewlink

The /diff command opens the Interactive Diff Viewer, a full-screen panel that allows you to inspect changes in your workspace and conversation history. It supports three distinct modes (VCS, Turn, and Commit) and provides an interactive review workflow where you can add line-by-line comments to steer the agent's next steps.

Interactive Diff Viewer Panelslink

To open the Diff Viewer:
  1. Type /diff in the prompt box.
  2. Press Enter.
text
/diff

Navigation and Controlslink

The Diff Viewer operates in three modes, which you can cycle through using Tab (or Right / Left arrow keys):
  • VCS Mode: Shows a list of all modified and untracked files in your active workspace.
  • Supports Git, Mercurial (Hg), and Jujutsu (JJ) automatically.
  • Use ↑/↓ to navigate the file list, and Enter to open the detail view.
  • Turn Mode: Shows the changes introduced by the agent in each turn of the current conversation.
  • Useful for reviewing the agent's work step-by-step.
  • Use ↑/↓ to navigate, and Enter to view details.
  • Commit Mode: Renders an interactive commit graph/tree of your repository.
  • Use ↑/↓ to navigate the commit chain.
  • Use ←/→ to navigate to adjacent branches in the graph.
  • Press Enter to load the diff for the selected commit.
---

Step-by-Step Walkthroughlink

Here is how to use the Diff Viewer to review changes, add comments, and steer the agent.

1. Reviewing Workspace Changes (VCS Mode)link

When you run /diff, it opens in VCS Mode by default (if you have uncommitted changes). You will see a list of modified and untracked files:
VCS Diff List
Press Enter on a file to open its Detail View. This shows the unified diff.
  • Use ↑/↓ (arrow keys) to scroll the diff.
  • Use j/k (or ←/→) to quickly swap between files without returning to the list.
  • Use n/N to jump to the next/previous diff hunk.
Detail View

2. Adding Comments and Steering the Agentlink

While in the Detail View, you can review the code and write feedback directly onto specific lines.
Step 1: Locate the line Scroll to the line you want to comment on.
Step 2: Open the comment input Press c. The Comment Input overlay opens at the bottom:
Comment Input
Step 3: Write your feedback Type your feedback and press Enter to save (or Esc to cancel).
Step 4: Manage your comments Saved comments are marked in the diff. You can delete a comment by highlighting the line and pressing d.
Step 5: Exit and submit Press Esc to return to the file list. Press Esc again to exit /diff. If you have unsaved comments, a confirmation screen appears:
  • Press Shift+Y to approve and exit. Your comments are formatted and sent to the agent as your next prompt, allowing you to steer its next turn.
  • Press Shift+N to reject and exit, discarding the comments.

3. Reviewing Turn History (Turn Mode)link

Press Tab to switch to Turn Mode. This groups changes by the conversation turn in which they were introduced, allowing you to see exactly what the agent did in previous steps:
Turn Diff List

4. Navigating the Commit Tree (Commit Mode)link

Press Tab again to switch to Commit Mode. This renders the repository's commit history as an interactive graph. You can navigate up and down the chain, or hop between branches using ←/→:
Commit List
Highlight any commit and press Enter to load and review its diff:
Commit Detail
---

Keyboard Shortcuts Referencelink

File List View (VCS & Turn Modes)link

KeyAction
Tab / → / ←Cycle modes (VCS → Turn → Commit)
↑ / ↓ (or j / k)Navigate file list
EnterOpen selected file's Detail View
EscExit Diff Viewer

File Detail Viewlink

KeyAction
↑ / ↓Scroll diff content
PgUp / PgDnScroll diff by page
j / k (or → / ←)Switch to next / previous file
n / N (or shift+n)Jump to next / previous diff hunk
cAdd/edit comment on the current line
dDelete comment on the current line
EscReturn to File List View

Commit Tree View (Commit Mode)link

KeyAction
↑ / ↓Navigate commit history
← / →Navigate to adjacent branches in the graph
EnterLoad diff for the selected commit
EscExit Diff Viewer

Exit Confirmation Screenlink

KeyAction
Shift+YExit and send comments to the agent
Shift+NExit and discard comments
EscReturn to File List View

See alsolink

  • Settings & Keybindings: Customize your TUI theme, alt-screen preferences, and keybindings.
  • Conversations: Learn how to manage, fork, and rewind conversation threads.
  • CLI Reference: Quick reference for all slash commands and default shortcuts.
AI Credits Command (/credits)
Permissions Command (/permissions)
On this Page
Diff Command (/diff)OverviewInteractive Diff Viewer PanelsStep-by-Step WalkthroughKeyboard Shortcuts ReferenceSee also