Agentic Coding with Google Antigravity CLI
Published by O'Reilly Media, Inc.
AI-enhanced command-line development
Course Outcomes
- Install and configure Google Antigravity CLI on macOS, Linux, or Windows, including PATH setup, silent keyring sign-in, browser fallback, SSH authentication, and enterprise credentials.
- Demonstrate core Antigravity CLI workflows with agy, ?, /usage, /config, /settings, /permissions, /resume, /rewind, /agents, /tasks, /skills, /mcp, /keybindings, and /statusline.
- Create and customize settings, keybindings, context files, rules, skills, plugins, hooks, and workspace configuration in the current Antigravity file locations.
- Integrate Antigravity CLI with local and remote MCP servers, including mcp_config.json, the serverUrl field for remote servers, and plugin-bundled MCP definitions.
- Apply Antigravity CLI and Antigravity 2.0 handoff patterns to real development work, including codebase exploration, refactoring, test generation, documentation, migration cleanup, and multi-agent project execution.
Course description
This course introduces learners to Google Antigravity CLI, the terminal-first TUI surface for Google Antigravity and the migration path for developers moving from Gemini CLI. As AI-assisted development shifts from single prompts to multi-agent workflows, Antigravity CLI brings the same core agent harness used by Antigravity 2.0 into a fast keyboard-first environment for coding, documentation, automation, and project work.
Throughout the course, learners will install and authenticate with the agy CLI, use core slash commands and path references, configure settings, manage permissions, and work safely with shell commands and terminal sandboxing. They will also migrate Gemini CLI extensions into Antigravity plugins, configure MCP servers, use skills, rules, hooks, and subagents, and understand when to stay in the CLI versus exporting work into Antigravity 2.0 for visual orchestration and artifact review.
This live event is for you because...
- You’re a software developer or engineer who wants to use Antigravity agents from the command line while keeping your existing terminal workflow.
- You work with large codebases and want to automate tasks such as code analysis, documentation, and debugging.
- You want to move from single-agent prompting to practical multi-agent workflows, background tasks, approvals, and artifact-driven review.
- You’re a technical lead, DevOps professional, or existing Gemini CLI user evaluating the migration to Antigravity CLI and Antigravity 2.0.
Prerequisites
- Familiarity with using the command line or terminal in a development environment
- Basic comfort installing and configuring command-line developer tools
- Experience working with code repositories and file structures
- General knowledge of software development workflows and tools such as Git, package managers, and code editors
- Access to a personal Google account or enterprise Google credentials for authentication; a GCP project may be used for enterprise onboarding
Course Preparation
- Install Google Antigravity CLI using the official installer before class, or be ready to install it during the setup segment on macOS, Linux, or Windows.
- Have a terminal or command-line interface ready (e.g., Terminal on macOS/Linux, PowerShell or Windows Terminal on Windows).
- Install Docker only if you want to run optional Docker-based MCP server examples; the Antigravity CLI terminal sandbox uses native OS isolation and does not require Docker.
- Have a personal Google account or enterprise Google credentials available for sign-in; API keys are not required for the standard CLI login flow.
- Clone or prepare a sample code repository to use during exercises involving @ path references, code analysis, refactoring, testing, and project-based workflows.
Recommended follow-up:
- Take Agentic Coding with Claude Code (live online course with Ken Kousen)
- Take Getting Started with LLM Agents Using LangChain (live online course with Lucas Soares)
- Take Reading and Maintaining Code with Generative AI (live online course with Venkat Subramaniam)
- Take AI-Assisted Test-Driven Development (live online course with Venkat Subramaniam)
- Take Generative AI for Software Testing (live online course with Gayathri Mohan)
Schedule
The time frames are only estimates and may vary according to how the class is progressing.
Section 1: Antigravity CLI, Antigravity 2.0, and Setup (45 minutes)
What changed from Gemini CLI to Antigravity CLI? (10 minutes)
- Overview of Antigravity CLI as the lightweight TUI surface for Google Antigravity
- Comparison with other CLI AI tools (Claude Code, OpenAI Codex CLI)
- Migration path from Gemini CLI extensions into Antigravity plugins and related customization files
- Architecture overview: CLI, shared agent harness, Antigravity 2.0 relationship, and conversation export
- Agent loop concepts: tool use, approvals, artifacts, and background work
Installation and Prerequisites (15 minutes)
- Supported platforms and official installer options for macOS, Linux, Windows PowerShell, and Windows CMD
- Installation methods:
- Official installer: curl -fsSL https://antigravity.google/cli/install.sh | bash
- PATH setup and the agy command
- Terminal sandbox setup with native OS isolation and command-level approval choices
- Troubleshooting common installation issues
Authentication and Account Setup (10 minutes)
- Silent keyring sign-in, browser-based Google sign-in, and remote SSH authorization
- Understanding Gemini CLI migration options, feature parity limits, and plugin import expectations
- Enterprise sign-in and GCP project connection during onboarding when needed
- Workspace account and enterprise policy considerations
- Privacy and terms of service implications
First Steps and Basic Interface (10 minutes)
- Launching Antigravity CLI with the agy command
- Understanding the terminal interface
- Basic prompts, @ path suggestions, and ! terminal commands
- Exit commands and session management
Break: 5 mins
Section 2: Core Commands, Context, and Approvals (60 minutes)
TUI Navigation and Slash Commands (20 minutes)
- ? and /usage - Understanding available commands
- /skills, /mcp, /tasks, and /agents - Managing custom workflows, servers, background work, and subagents
- /config and /settings - Customizing behavior, verbosity, permissions, and session preferences
- /logout and browser sign-in - Managing authentication
- /model, /statusline, and usage indicators - Selecting models and tracking session state
- Ctrl+D, Ctrl+C, and resume commands - Ending, interrupting, and returning to sessions
Files, Directories, and Prompt Input (20 minutes)
- Using @ to trigger path suggestions and add file or folder context
- Referencing individual files for explanation, edits, tests, and documentation work
- Referencing directories while respecting project structure and context limits
- Git-aware context, ignored files, and sensitive-file boundaries
- Understanding file reading limitations and best practices
- Working with large codebases and context windows
Shell Integration (12 minutes)
- ! prefix for terminal command execution inside the CLI
- Understanding command output handling
- Security considerations with shell execution, sandbox choices, and approvals
- Integration with existing development workflows
Context, Permissions, and Subagent Management (8 minutes)
- Key workflow commands:
- /permissions - Select request-review, always-proceed, or strict autonomy level
- /resume - Switch or resume conversations
- /agents - Monitor subagents, inspect detail views, and handle approvals
- Fast-path approval shortcuts such as Ctrl+J and Ctrl+K for subagent requests
Break: 5 mins
Section 3: Configuration and Customization (60 minutes)
Settings and Configuration Files (20 minutes)
- Global settings: ~/.gemini/antigravity-cli/settings.json
- Project and workspace-level settings
- Configuration precedence and override hierarchy
- Launch-time overrides such as --sandbox and --dangerously-skip-permissions
Context Files, Rules, and Skills (20 minutes)
- Workspace context via GEMINI.md and AGENTS.md, plus global context at ~/.gemini/GEMINI.md
- Creating effective rules, skills, and context files:
- Global CLI settings and staged customizations under ~/.gemini/antigravity-cli/
- Project-level context with GEMINI.md, AGENTS.md, .agents/skills, and .agents/mcp_config.json
- Project rules, workspace skills, component instructions, and plugin-provided customizations
- Best practices for context file organization
- How Antigravity discovers rules, skills, MCP servers, hooks, plugins, and project context
Keybindings, Status Line, and Terminal Ergonomics (10 minutes)
- Custom keybindings with /keybindings and ~/.gemini/antigravity-cli/keybindings.json
- Custom status line and terminal window title workflows
- Terminal compatibility, prompt editing shortcuts, paste behavior, and accessibility considerations
Sandboxing and Security (10 minutes)
- Understanding terminal sandbox mode and native OS isolation
- Sandbox configuration with enableTerminalSandbox in ~/.gemini/antigravity-cli/settings.json
- Security best practices for tool execution
- Permission levels, command allow/deny rules, approvals, and confirmation dialogs
Break: 5 mins
Section 4: Plugins, MCP, Subagents, and Advanced Customization (60 minutes)
Model Context Protocol (MCP) Integration (20 minutes)
- Understanding MCP architecture and benefits
- Configuring MCP servers in global and workspace mcp_config.json files
- Practical MCP server examples and migration details:
- GitHub integration for repository management
- Database connectivity servers
- Remote MCP servers using serverUrl instead of legacy url or httpUrl fields
- Docker-based MCP server deployment
- Troubleshooting MCP connections with /mcp and connector status panels
Plugins, Skills, Rules, and Hooks (20 minutes)
- Plugin structure: plugin.json, skills, agents, rules, MCP servers, and hooks
- Plugin staging under ~/.gemini/antigravity-cli/plugins/<plugin_name>/
- Importing Gemini CLI extensions with agy plugin import gemini
- Workspace skills in .agents/skills and global skills in Antigravity CLI's skills directory
- Hooks and rules as structured customization points for agent behavior
Subagents, Background Tasks, and Approvals (13 minutes)
- How the main agent delegates concurrent background work
- Using /agents to inspect running and completed subagents
- Reviewing subagent detail views, tool execution logs, and pending approvals
- Fast-path alerts and approval shortcuts for staying in flow
Session State, Rewind, and Antigravity 2.0 Handoff (7 minutes)
- Using /resume, /rewind, /undo, /clear, and /fork during iterative work
- Auto-save resume behavior when closing the CLI
- Exporting a CLI conversation into Antigravity 2.0 for visual orchestration
- When to stay in the CLI and when to move into the Antigravity 2.0 Agent Manager
Break: 5 mins
Section 5: Practical Migration and Agentic Coding Workflows (45 minutes)
Code Development Workflows (20 minutes)
- Codebase exploration with @ references, prompts, and agent plans
- Test generation, build execution, and sandbox-aware command approval
- Debugging assistance with terminal output and iterative fix verification
- Refactoring, modernization, documentation updates, and review loops
- Architecture analysis with subagents and artifact-based summaries
Gemini CLI Migration Lab (10 minutes)
- First-launch migration options and what does not migrate 1:1
- Running agy plugin import gemini and reviewing the import manifest
- Moving workspace skills from .gemini/skills to .agents/skills when needed
- Migrating MCP server definitions from settings.json to mcp_config.json
- Checking context files, rules, hooks, and plugin loading after migration
Antigravity 2.0 Workflow Handoff (10 minutes)
- Exporting or continuing CLI work in Antigravity 2.0
- Using Agent Manager concepts: projects, workspaces, artifacts, and browser support
- Reviewing implementation plans, walkthroughs, screenshots, and other artifacts
- Understanding scheduled tasks as a follow-up workflow outside the CLI
- Choosing the right surface: CLI for speed, Antigravity 2.0 for visual orchestration
Team and Enterprise Patterns (5 minutes)
- Shared settings, permissions, plugins, MCP servers, skills, and rules across teams
- Enterprise authentication, GCP project connection, and organization policy considerations
- Workflow standardization through plugins, hooks, and project conventions
- Security, compliance, telemetry, and approval-review considerations
Q&A: 15 mins
Your Instructor
Ken Kousen
Ken Kousen is the author of the Kotlin Cookbook (O'Reilly), Modern Java Recipes (O'Reilly), Gradle Recipes for Android (O’Reilly), and Making Java Groovy (Manning), as well as O’Reilly video courses in Android, Groovy, Gradle, advanced Java, and Spring. A JavaOne Rock Star, he’s a regular speaker on the No Fluff Just Stuff conference tour and has spoken at conferences all over the world. Through his company, Kousen I.T., Inc., he’s taught software development training courses to thousands of students.