---
description: How to automate Antigravity using OpenCLI
title: antigravity
canonical_url: https://skilld.dev/gh/jackwener/opencli/antigravity
last_updated: 2026-09-14T14:01:21.000Z
---

> **Skill from skilld.dev.** Follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [_actions.js](https://skilld.dev/api/skills-raw/jackwener/opencli/antigravity/_actions.js), [antigravity.test.js](https://skilld.dev/api/skills-raw/jackwener/opencli/antigravity/antigravity.test.js), [audit-extras.js](https://skilld.dev/api/skills-raw/jackwener/opencli/antigravity/audit-extras.js), [delete.js](https://skilld.dev/api/skills-raw/jackwener/opencli/antigravity/delete.js), [dump.js](https://skilld.dev/api/skills-raw/jackwener/opencli/antigravity/dump.js), [extract-code.js](https://skilld.dev/api/skills-raw/jackwener/opencli/antigravity/extract-code.js), [history.js](https://skilld.dev/api/skills-raw/jackwener/opencli/antigravity/history.js), [mark-read.js](https://skilld.dev/api/skills-raw/jackwener/opencli/antigravity/mark-read.js), [model.js](https://skilld.dev/api/skills-raw/jackwener/opencli/antigravity/model.js), [new.js](https://skilld.dev/api/skills-raw/jackwener/opencli/antigravity/new.js), [read.js](https://skilld.dev/api/skills-raw/jackwener/opencli/antigravity/read.js), [rename.js](https://skilld.dev/api/skills-raw/jackwener/opencli/antigravity/rename.js), [send.js](https://skilld.dev/api/skills-raw/jackwener/opencli/antigravity/send.js), [serve.js](https://skilld.dev/api/skills-raw/jackwener/opencli/antigravity/serve.js), [status.js](https://skilld.dev/api/skills-raw/jackwener/opencli/antigravity/status.js), [storage.js](https://skilld.dev/api/skills-raw/jackwener/opencli/antigravity/storage.js), [watch.js](https://skilld.dev/api/skills-raw/jackwener/opencli/antigravity/watch.js).
>
> If the user asked to install this Skill, run `npx skilld install jackwener/opencli/antigravity`. Install writes the Skill files into the project, so every session loads them.

# Antigravity Automation Skill

This skill allows AI agents to control the [Antigravity](https://github.com/chengazhen/Antigravity) desktop app (and any Electron app with CDP enabled) programmatically via OpenCLI. 

## Requirements
opencli automatically detects, launches (with `--remote-debugging-port=9234`), and connects to Antigravity.
If Antigravity is already running without CDP, opencli will prompt to restart it.

If the endpoint exposes multiple inspectable targets, set:
\`\`\`bash
export OPENCLI_CDP_TARGET="antigravity"
\`\`\`

## High-Level Capabilities
1. **Send Messages (`opencli antigravity send <message>`)**: Type and send a message directly into the chat UI.
2. **Read History (`opencli antigravity read`)**: Scrape the raw chat transcript from the main UI container.
3. **Extract Code (`opencli antigravity extract-code`)**: Automatically isolate and extract source code text blocks from the AI's recent answers.
4. **Switch Models (`opencli antigravity model <name>`)**: Instantly toggle the active LLM (e.g., \`gemini\`, \`claude\`).
5. **Clear Context (`opencli antigravity new`)**: Start a fresh conversation.

## Examples for Automated Workflows

### Generating and Saving Code
\`\`\`bash
opencli antigravity send "Write a python script to fetch HN top stories"
# wait ~10-15 seconds for output to render
opencli antigravity extract-code > hn_fetcher.py
\`\`\`

### Reading Real-time Logs
Agents can run long-running streaming watch instances:
\`\`\`bash
opencli antigravity watch
\`\`\`
