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



🚨 PREREQUISITE — Extension Required

This SDK connects to the Antigravity Automation VS Code extension. You MUST install the extension first — the SDK does not work without it.


Install Extension


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.6.0.tar.gz (8.7 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.6.0-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: antigravity_automation-1.6.0.tar.gz
  • Upload date:
  • Size: 8.7 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.6.0.tar.gz
Algorithm Hash digest
SHA256 d269a250785366693e23d3452e83178e36a6d19a43dc2f31db09c22adc026dca
MD5 fb2301464657dde3c30191aaec639f29
BLAKE2b-256 621de2f4305aa6acd8cadebf33255473683589b216b8446ac2892662b58b9d24

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for antigravity_automation-1.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 46f9895586dc83fbfae143da9293780402191fc9751808e54bd583d49705bd28
MD5 e25392a155c2d42aeba69eb37ed7b6b4
BLAKE2b-256 d2c0d61471c3af9041193a5e322f5ef211a6a2cbef99ef5d0d8b72c3d2143eb6

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