Skip to main content

Python client library for the Antigravity Automation API — automate clicks, send commands, stream live AI outputs.

Project description

Antigravity Automation

antigravity-automation

The official Python SDK for the Antigravity Automation extension

🌐 Website  ·  📖 API Docs  ·  ⬇️ Install Extension  ·  ⭐ GitHub


Automate clicks, send commands, and stream live AI chat outputs from Python — all via the local REST API and WebSocket provided by the Antigravity Automation VS Code extension.

Install

pip install antigravity-automation

Quick Start

from antigravity_automation import AntigravityClient

client = AntigravityClient()

# Send a command to the AI chat
result = client.send_command("Refactor the auth module")
print(result)  # SendCommandResponse(status='queued', position=1, ...)

# Toggle auto-click automation
client.toggle_auto_run()

# Get usage stats
stats = client.get_stats()
print(f"Auto-Run clicks: {stats.autoRunClicks}")

WebSocket Stream

from antigravity_automation import AntigravityStream

stream = AntigravityStream()
stream.on_message(lambda msg: print(f"[{msg['title']}] {msg['content'][:80]}..."))
stream.on_connected(lambda: print("Connected!"))
stream.run()  # Blocking — runs asyncio event loop

API Reference

Method Endpoint Description
send_command(text) POST /send_command Send a prompt to the active AI chat
start_new_chat() POST /start-new-chat Start a new chat session
switch_chat(title) POST /switch_chat Switch to a conversation by title
toggle_auto_run() POST /toggle_auto_run Toggle auto-click Run button
toggle_auto_allow() POST /toggle_auto_allow Toggle auto-approve permissions
get_command() GET /get_command Poll for queued commands & state
get_stats() GET /stats Get cumulative usage statistics
update(title, content) POST /update Push chat content
track_action(action) POST /track_action Track a usage action

Configuration

client = AntigravityClient(
    base_url="http://localhost:5000",  # default
    timeout=10,                         # seconds, default
)

stream = AntigravityStream(
    url="ws://localhost:9812",   # default
    reconnect=True,              # auto-reconnect, default
    reconnect_delay=3.0,         # seconds, default
)

Local Development

pip install -e ".[dev]"          # Install in dev mode
python tests/test_import.py      # Run offline import tests
python tests/test_live.py        # Run live tests (bridge must be running)
python -m build                  # Build for PyPI
twine upload dist/*              # Publish to PyPI

Requirements

License

MIT — Built by JoeCodeCreations

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

antigravity_automation-1.5.0.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

antigravity_automation-1.5.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file antigravity_automation-1.5.0.tar.gz.

File metadata

  • Download URL: antigravity_automation-1.5.0.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for antigravity_automation-1.5.0.tar.gz
Algorithm Hash digest
SHA256 04ab5795065fbf343659707ca9cde43ae96b2db954aa8142de7e12cb1afbd85b
MD5 46e0c09ce71dbef899512be1bd68bfe9
BLAKE2b-256 c48e26c766b83c87831857e1cd060f70a69546113118c5a3c9fedbecc6be6ade

See more details on using hashes here.

File details

Details for the file antigravity_automation-1.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for antigravity_automation-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bbbbcd002e8893c475c5c819d02a58bed4ea16e3c5d3e826dd7a512e10e1fc34
MD5 e52bf09f1250fed0301348b47f19d6f9
BLAKE2b-256 0b0ed4dca41d8f2c12d7c73123c714f02c83fc3233026625f94f5e1d302868a2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page