Antigravity CLI Add-on integrates a powerful AI agent directly into your Home Assistant environment. With deep access to the Home Assistant Supervisor API and your domotics, this terminal acts as your central command for writing code, executing tasks, and managing your smart home.
What makes this add-on special is its zero-friction mobile experience. You can start coding a complex project on your PC, grab your phone, and seamlessly continue vibecoding on the couch with a custom mobile-first UI.
- 📱 Built for Mobile Vibecoding: A distraction-free UI wrapper around
ttydcompletely tailored for touch screens. Say goodbye to wonky scrolling, weird keyboard overlays, or unreadable text. - 🗂️ Dynamic Multi-Session Tabs: Want to work on your Python scripts and your Lovelace dashboards at the same time? Click the
+button in the top tab bar to dynamically spawn new AI sessions. You can switch between them instantly without losing context, and close (x) the ones you don't need to instantly free up memory. - 🤖 MCP Domotics Integration: Automatically connects the AI agent to your home using Model Context Protocol (MCP). It can talk directly to Home Assistant and Zigbee2MQTT to control your lights, read sensors, and execute scripts using natural language.
- 🔄 Seamless Device Transitions: Powered by
dtach, your terminal sessions remain persistent. You can start a process on your PC, switch to your tablet, and open it on your phone without losing your command history or interrupting running tasks. - ⌨️ Mobile-Optimized Macros & Controls: Features a built-in virtual keypad specifically designed for terminal usage on mobile:
- High-Precision D-Pad: Vectorized SVG arrow keys that render perfectly centered on any iOS or Android device.
- Terminal Essentials: Dedicated
EscandTabkeys. - Macro Actions: Instantly execute common commands like
/resume,/new(new chat) and/quota(check usage) with a single tap. - Elegant Shortcut Badges: Bottom footer includes styled virtual key badges for
Ctrl+C,Ctrl+V, andCtrl+Zthat adapt cleanly to your screen. On mobile, the right-click menu is suppressed natively to prevent the browser's context menu from interrupting your workflow. - Smart Login Button: A dedicated login button appears in the bottom navigation bar when authentication is required, bypassing the need to copy text from the terminal.
- 🖼️ Direct Image Uploads: Need to give the AI visual context? Tap the "Upload Image" button on your phone, select a photo, and it is instantly uploaded to an ephemeral secure container directory (
/tmp/uploads) and the path is automatically typed into your terminal prompt. - 🔒 Deep & Secure Integration: Automatically bridges the AI with your Home Assistant Supervisor Token in a secure sandbox.
- 🎨 Beautiful Aesthetics: Complete with a dynamic mesh-gradient footer that feels right at home on modern devices.
When using the Dynamic Multi-Session Tabs, you will have multiple AI agents running simultaneously.
Avoid catastrophic file conflicts by following this golden rule: Do not ask two different sessions to edit the exact same file (e.g., automations.yaml) at the same time.
The AI does not natively use file locks. If Session 1 and Session 2 write to the same file simultaneously, they will create a race condition and overwrite each other's work.
Best Practice: Use different tabs for entirely different files or projects (e.g., Tab 1 for configuration.yaml, Tab 2 for python_scripts/).
Tip: If you absolutely need concurrency safety, you can instruct the agent in your prompt to "check if .filename.lock exists before editing, and create it while working", acting as a human-enforced semaphore.
Use at your own risk. The authors of this add-on are not responsible for any damage, data loss, or system instability caused by the AI agents. Vibecoding with multiple autonomous agents concurrently is inherently dangerous if they are not properly isolated. It can lead to catastrophic file corruption or system misconfigurations if multiple agents attempt to modify the same configurations simultaneously without locking. You are fully responsible for the actions the AI takes on your system.
Since this is a custom Home Assistant Add-on, you need to add this repository to your Supervisor.
- Open your Home Assistant web interface.
- Navigate to Settings > Add-ons > Add-on Store (bottom right button).
- Click the three dots (⋮) in the top right corner and select Repositories.
- Paste the URL of this GitHub repository and click Add.
- Close the Repositories modal.
- Scroll down to find the newly added Antigravity CLI section, or search for it.
- Click on the Antigravity CLI add-on and click Install.
- Go to the Configuration tab to enter your integration credentials (see the Configuration Guide below).
- Once installed, toggle on Show in sidebar for easy access.
- Click Start.
- Check the Log tab to ensure the add-on started correctly.
- Click on the Antigravity icon in your sidebar to open the terminal.
To allow the AI to interact with your smart home, you must configure the following fields in the Add-on's Configuration tab before starting it:
ha_token: (Required) Your Long-Lived Access Token.- How to get it: Go to your Home Assistant Profile (bottom left corner) > Security > Long-Lived Access Tokens > Create Token.
- Example:
eyJhbGciOiJIUzI1NiIsInR5cCI6Ikp...
These fields are used to connect the AI directly to your Zigbee network.
mqtt_host: The IP address or hostname of your MQTT Broker.- Example:
core-mosquitto(if you use the official HA Add-on) or192.168.1.100.
- Example:
mqtt_port: The port of your MQTT Broker.- Example:
1883
- Example:
mqtt_user: Your MQTT username.- Example:
homeassistant
- Example:
mqtt_pass: Your MQTT password.- Example:
my_secure_password
- Example:
This add-on is designed with security in mind:
- No Path Traversal: Image uploads are strictly sanitized (
os.path.basename) and securely stored in an ephemeral, non-persistent/tmp/uploadsdirectory. - Auto-Purging: The upload directory is automatically wiped every time the add-on restarts to prevent storage bloat and ensure privacy.
- Sandboxed Execution: Runs fully inside the Home Assistant Docker supervisor ecosystem.
For detailed information about the internal architecture, UI design, and development workflows, please see the Antigravity Wiki.
