Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 0 additions & 57 deletions .github/workflows/gemini-cli-review.yml

This file was deleted.

50 changes: 0 additions & 50 deletions .github/workflows/gemini.yml

This file was deleted.

Binary file modified .gitignore
Binary file not shown.
10 changes: 9 additions & 1 deletion DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Development Guide

This guide covers local development and testing workflows for the Gemini Terminal add-on.
This guide covers local development and testing workflows for the Antigravity CLI add-on.

## Local Container Testing

Expand All @@ -10,6 +10,14 @@ This guide covers local development and testing workflows for the Gemini Termina
- **Git** repository cloned locally
- **NixOS development environment** (optional, for `nix develop`)

### Automated Unit Testing

Run the Python unit test suite to validate shell script syntax (`bash -n`), Dockerfile installer logic, MCP configuration schema, and alias wrappers:

```bash
python3 -m unittest discover -s tests
```

### Quick Start Testing

The fastest way to test changes without publishing new versions:
Expand Down
2 changes: 1 addition & 1 deletion DEVELOPMENT_STATUS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Gemini Terminal Add-on - Development Status
# Antigravity CLI Add-on - Development Status

## Project Overview
Refitting the Home Assistant add-on to support Google's Gemini CLI, including interactive session management, Home Assistant MCP integration, and automated context generation.
Expand Down
50 changes: 26 additions & 24 deletions DOCS.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Gemini Terminal Home Assistant Add-on Documentation
# Antigravity CLI Home Assistant Add-on Documentation

## Overview

Gemini Terminal provides a web-based terminal interface with the Google **Gemini CLI** pre-installed, allowing you to access Gemini's powerful AI capabilities directly from your Home Assistant dashboard. Gemini CLI is an AI coding assistant by Google that can help you with Home Assistant configuration, automation creation, debugging, and general coding tasks.
Antigravity CLI provides a web-based terminal interface pre-installed with Google's official **Antigravity CLI** (`agy`), allowing you to access powerful AI capabilities directly from your Home Assistant dashboard. Antigravity CLI is an AI coding assistant by Google that can help you with Home Assistant configuration, automation creation, debugging, and general coding tasks.

## Installation

Expand All @@ -12,7 +12,7 @@ Follow these steps to install the add-on:
2. Go to **Settings** -> **Add-ons** -> **Add-on Store**
3. Click the three dots (top right corner) and select **"Repositories"**
4. Add the URL of this repository: `https://github.com/oded996/gemini-cli-home-assistant-addons` and click **"Add"**
5. Find the **"Gemini Terminal"** add-on and click on it
5. Find the **"Antigravity CLI"** add-on and click on it
6. Click **"Install"**

## Configuration
Expand All @@ -21,65 +21,67 @@ The add-on works out of the box using OAuth authentication. However, you can als

## Usage

The Gemini CLI launches automatically when you open the terminal. You can interact with it using the following commands:
Antigravity CLI launches automatically when you open the terminal. You can interact with it using the following commands:

### Common Commands

- `gemini` - Start an interactive Gemini session
- `gemini --help` - See all available commands
- `gemini "your prompt"` - Ask Gemini a single question or provide a direct command
- `gemini -r latest` - Resume your most recent conversation
- `agy` (or `gemini`) - Start an interactive session
- `agy --help` - See all available commands
- `agy "your prompt"` - Ask a single question or provide a direct command
- `agy -r latest` - Resume your most recent conversation
- `ha-context --full` - Refresh the Home Assistant context (`GEMINI.md`) with full entity details

Your session data and configuration are stored in `/data/.config/gemini`, which persists between restarts.
Your session data and configuration are stored in `/data/.config/antigravity` (and `/data/.config/gemini`), which persists between restarts.

## Home Assistant-Specific Use Cases

Gemini Terminal is particularly useful for Home Assistant tasks. Because it has a built-in **MCP (Model Context Protocol)** server and access to a generated **GEMINI.md** context file, it knows your system intimately.
Antigravity CLI is particularly useful for Home Assistant tasks. Because it has a built-in **MCP (Model Context Protocol)** server and access to a generated **GEMINI.md** context file, it knows your system intimately.

### 1. Automation Creation and Debugging

```
# Ask about your home state
gemini "Which lights are currently on?"
agy "Which lights are currently on?"

# Create a new automation
gemini "create an automation that turns on the porch lights when the front door opens, but only after sunset"
agy "create an automation that turns on the porch lights when the front door opens, but only after sunset"
```

### 2. YAML Configuration Help

```
```bash
# Get help with syntax
gemini "what's wrong with this YAML? [paste YAML]"
agy "what's wrong with this YAML? [paste YAML]"

# Analyze your current config
gemini "Analyze my /config/configuration.yaml and suggest improvements"
agy "Analyze my /config/configuration.yaml and suggest improvements"
```

### 3. Entity Management

```
```bash
# Clean up entity names
gemini "suggest better names for these entities: [paste entity list]"
agy "suggest better names for these entities: [paste entity list]"

# Create a template sensor
gemini "create a template sensor that averages all my temperature sensors"
agy "create a template sensor that averages all my temperature sensors"
```

---

## Safety & Guardrails

Gemini Terminal is designed to be powerful but safe. It includes several built-in guardrails to prevent accidental or destructive changes:
Antigravity CLI is designed to be powerful but safe. It includes several built-in guardrails to prevent accidental or destructive changes:

### 1. Interactive Approvals
By default, the Gemini CLI will **never** modify a file or execute a shell command without your explicit permission. It will show you a **diff** of the proposed changes and ask for a confirmation (`y/n`).
By default, `agy` will **never** modify a file or execute a shell command without your explicit permission. It will show you a **diff** of the proposed changes and ask for a confirmation (`y/n`).

### 2. Plan Mode (Dry-Run)
If you want to explore solutions without any risk of modification, you can launch Gemini in **Plan Mode**:
If you want to explore solutions without any risk of modification, you can launch in **Plan Mode**:
```bash
gemini --approval-mode plan
agy --approval-mode plan
```
In this mode, Gemini can read your configuration and propose changes, but it is strictly forbidden from executing any tools that modify your system or files.
In this mode, `agy` can read your configuration and propose changes, but it is strictly forbidden from executing any tools that modify your system or files.

### 3. Home Assistant Backups
Because this add-on operates on your live `/config` directory, we always recommend ensuring you have a recent **Home Assistant backup** before performing major AI-driven refactoring of your YAML files.
Expand All @@ -95,7 +97,7 @@ Check the add-on logs for detailed information about any issues:

## Security Considerations

Gemini Terminal is designed with security in mind:
Antigravity CLI is designed with security in mind:

- The add-on runs in an isolated container.
- Your code and queries go directly to Google's API.
Expand Down
4 changes: 2 additions & 2 deletions GEMINI.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This file provides guidance to Gemini CLI when working with code in this reposit

## Project Overview

This repository contains Home Assistant add-ons, specifically the **Gemini Terminal** add-on which provides a web-based terminal interface with the Google **Gemini CLI** pre-installed. The add-on allows Home Assistant users to access Gemini AI capabilities directly from their dashboard.
This repository contains Home Assistant add-ons, specifically the **Antigravity CLI** add-on which provides a web-based terminal interface with Google's **Antigravity CLI** (`agy`) pre-installed. The add-on allows Home Assistant users to access AI capabilities directly from their dashboard.

## Development Environment

Expand All @@ -18,7 +18,7 @@ direnv allow
```

### Core Development Commands
- `build-addon` - Build the Gemini Terminal add-on with Podman.
- `build-addon` - Build the Antigravity CLI add-on with Podman.
- `run-addon` - Run add-on locally on port 7682 with volume mapping.
- `lint-dockerfile` - Lint Dockerfile using hadolint.
- `test-endpoint` - Test web endpoint availability (curl localhost:7682).
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Gemini Terminal for Home Assistant
# Antigravity CLI for Home Assistant

Bring the power of Google's **Gemini CLI** directly to your Home Assistant dashboard!
Bring the power of Google's **Antigravity CLI** (`agy`) directly to your Home Assistant dashboard!

Gemini Terminal provides an AI-driven, persistent web terminal pre-configured with the Home Assistant MCP (`ha-mcp`) server, giving Gemini native access to your smart home environment.
Antigravity CLI provides an AI-driven, persistent web terminal pre-configured with the Home Assistant MCP (`ha-mcp`) server, giving `agy` native access to your smart home environment.

---

## 🚀 Key Features

* **Google Gemini CLI Integration**: A full-featured web terminal with the official Gemini CLI pre-installed.
* **Native Home Assistant Control**: Thanks to the integrated `ha-mcp` server, Gemini can read states, call services, and interact with your entities natively.
* **Antigravity CLI Integration**: A full-featured web terminal pre-installed with Google's official `agy` binary (with backward-compatible support for `gemini` commands).
* **Native Home Assistant Control**: Thanks to the integrated `ha-mcp` server (`mcp_config.json`), Antigravity can read states, call services, and interact with your entities natively.
* **Session Persistence**: Built-in `tmux` support means you can navigate away or refresh without losing your terminal session or AI conversation.
* **Smart Environment Context**: Automatically creates a `GEMINI.md` file loaded with system info, architecture, and recent logs to ground Gemini in your specific setup.
* **Smart Environment Context**: Automatically creates a `GEMINI.md` file loaded with system info, architecture, and recent logs to ground Antigravity in your specific setup.
* **Seamless Authentication**: Configure your `GEMINI_API_KEY` straight from the Home Assistant add-on UI.
* **Direct Config Access**: Boots directly into your `/config` directory for immediate YAML editing and troubleshooting.

Expand All @@ -31,7 +31,7 @@ Click the button below to add this repository directly to your Home Assistant in
2. Click the **⋮** menu in the top right corner and select **Repositories**.
3. Add the following URL:
`https://github.com/oded996/gemini-cli-home-assistant-addons`
4. Find **Gemini Terminal** in the add-on store and click **Install**.
4. Find **Antigravity CLI** in the add-on store and click **Install**.

## ⚙️ Configuration & Usage

Expand All @@ -57,4 +57,4 @@ This project was built on the incredible work of others in the Home Assistant co
## 📜 License

This repository is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
*Note: The Gemini CLI tool itself is subject to Google's Terms of Service.*
*Note: The Antigravity CLI tool itself is subject to Google's Terms of Service.*
21 changes: 10 additions & 11 deletions config/scripts/gemini-session-picker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
show_banner() {
clear
echo "╔══════════════════════════════════════════════════════════════╗"
echo "║ 🤖 Gemini Terminal ║"
echo "║ 🤖 Antigravity CLI ║"
echo "║ Interactive Session Picker ║"
echo "╚══════════════════════════════════════════════════════════════╝"
echo ""
Expand Down Expand Up @@ -38,44 +38,43 @@ get_user_choice() {
}

launch_gemini_new() {
echo "🚀 Starting new Gemini session..."
echo "🚀 Starting new session..."
sleep 1
exec node "$(which gemini)"
exec agy
}

launch_gemini_continue() {
echo "⏩ Continuing most recent conversation..."
sleep 1
exec node "$(which gemini)" -c
exec agy -c
}

launch_gemini_resume() {
echo "📋 Opening conversation list for selection..."
sleep 1
exec node "$(which gemini)" -r
exec agy -r
}

launch_gemini_custom() {
echo ""
echo "Enter your Gemini command (e.g., 'gemini --help' or 'gemini -p \"hello\"'):"
echo "Enter your command (e.g., 'agy --help' or 'agy -p \"hello\"'):"
echo "Available flags: -c (continue), -r (resume), -p (print), --model, etc."
echo -n "> gemini "
echo -n "> agy "
read -r custom_args

if [ -z "$custom_args" ]; then
echo "No arguments provided. Starting default session..."
launch_gemini_new
else
echo "🚀 Running: gemini $custom_args"
echo "🚀 Running: agy $custom_args"
sleep 1
# Use eval to properly handle quoted arguments
eval "exec node \$(which gemini) $custom_args"
eval "exec agy $custom_args"
fi
}

launch_bash_shell() {
echo "🐚 Dropping to bash shell..."
echo "Tip: Run 'gemini' manually when ready, or 'gemini-logout' to clear credentials"
echo "Tip: Run 'agy' (or 'gemini') manually when ready, or 'gemini-logout' to clear credentials"
sleep 1
exec bash
}
Expand Down
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
shellHook = ''
echo "🏠 Home Assistant Add-on Development Environment"
echo "Available commands:"
echo " build-addon - Build the Gemini Terminal add-on"
echo " build-addon - Build the Antigravity CLI add-on"
echo " run-addon - Run the add-on locally"
echo " validate-addon - Validate add-on structure"
echo " lint-dockerfile - Lint the Dockerfile"
Expand Down
8 changes: 8 additions & 0 deletions gemini-terminal/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 3.0.0
- **🚀 Antigravity CLI Migration (`agy`)**
- Transitioned CLI engine from deprecated Gemini CLI to Google's official **Antigravity CLI** (`agy`).
- Added backward-compatible `/usr/local/bin/gemini` command wrapper.
- Migrated MCP server configuration to standalone `mcp_config.json`.
- Inlined `build.yaml` parameters into `Dockerfile` per Home Assistant Supervisor standards.
- Updated branding and add-on icons to official Antigravity branding.

## 2.6.4
- **🚀 Major Stability Refactor**
- Completely refactored the add-on foundation with stability improvements inspired by the **OpenCode** project (https://github.com/magnusoverli/opencode/).
Expand Down
Loading
Loading