Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
dbb2220
new agy packages
Daniel-42-z May 21, 2026
f082bcc
agy base app bin path fix
Daniel-42-z May 21, 2026
d80049a
flake update
Daniel-42-z May 21, 2026
db9ab2b
mesa support
Daniel-42-z May 21, 2026
d874cab
cli bin name
Daniel-42-z May 21, 2026
3894fc2
nix shell for version update scripts
Daniel-42-z May 21, 2026
f70597e
ide nix file formatting
Daniel-42-z May 21, 2026
6c2e567
icons
Daniel-42-z May 21, 2026
7f9d5b2
chore: auto-update Antigravity packages
Daniel-42-z May 21, 2026
bc136fb
deduplicated code
Daniel-42-z May 21, 2026
78fe4e7
version check scripts update json
Daniel-42-z May 22, 2026
6652e7d
version.json
Daniel-42-z May 22, 2026
4df0fa9
code formatting
Daniel-42-z May 22, 2026
ef82cff
fixed antigravity ide bin path
Daniel-42-z May 22, 2026
11b78fd
fix ide no fhs flag
Daniel-42-z May 22, 2026
3829205
fix duplicate binary argument in launcher.sh
Daniel-42-z May 22, 2026
72c73ed
remove all hardcoded electron flags
Daniel-42-z May 22, 2026
4a05333
update readme.md and claude.md
Daniel-42-z May 23, 2026
44e6310
made antigravity app not IDE the default
Daniel-42-z May 23, 2026
bc031ff
address ide freeze problem in readme
Daniel-42-z May 23, 2026
33c9849
update github actions for new scripts
Daniel-42-z May 24, 2026
3962c5d
chore: update antigravity to 2.0.3-6242596486512640 (#1)
github-actions[bot] May 24, 2026
7a0bca4
chore: update antigravity to 2.0.3-6242596486512640 (#2)
github-actions[bot] May 27, 2026
f261d4f
chore: update antigravity to 2.0.3-6242596486512640 (#3)
github-actions[bot] May 28, 2026
92dad01
chore: update antigravity to 2.0.3-6242596486512640 (#4)
github-actions[bot] Jun 2, 2026
d545624
chore: update antigravity to 2.0.4-6381998290370560 (#5)
github-actions[bot] Jun 3, 2026
473c0c3
chore: update antigravity to 2.0.4-6381998290370560 (#6)
github-actions[bot] Jun 4, 2026
4fac743
chore: update antigravity to 2.0.4-6381998290370560 (#7)
github-actions[bot] Jun 10, 2026
9c5e4b8
chore: update antigravity to 2.0.4-6381998290370560 (#8)
github-actions[bot] Jun 13, 2026
5f5581d
chore: update antigravity to 2.0.4-6381998290370560 (#9)
github-actions[bot] Jun 17, 2026
0254aab
chore: update antigravity to 2.0.4-6381998290370560 (#10)
github-actions[bot] Jun 19, 2026
a70a5d4
chore: update antigravity to 2.1.1-6123990880747520 (#11)
github-actions[bot] Jun 23, 2026
e8883d2
chore: update antigravity to 2.1.1-6123990880747520 (#12)
github-actions[bot] Jun 24, 2026
62380d6
chore: update antigravity to 2.1.1-6123990880747520 (#13)
github-actions[bot] Jun 25, 2026
50f693a
chore: update antigravity to 2.1.1-6123990880747520 (#14)
github-actions[bot] Jun 27, 2026
5601724
chore: update antigravity to 2.1.1-6123990880747520 (#15)
github-actions[bot] Jun 30, 2026
0b4dbb5
chore: update antigravity to 2.1.1-6123990880747520 (#16)
github-actions[bot] Jul 2, 2026
1c95d46
chore: update antigravity to 2.1.1-6123990880747520 (#17)
github-actions[bot] Jul 3, 2026
eea04c2
chore: update antigravity to 2.1.1-6123990880747520 (#18)
github-actions[bot] Jul 8, 2026
ba4ce47
chore: update antigravity to 2.1.1-6123990880747520 (#19)
github-actions[bot] Jul 10, 2026
33448c1
chore: update antigravity to 2.1.1-6123990880747520 (#20)
github-actions[bot] Jul 14, 2026
ae2bea3
chore: update antigravity to 2.1.1-6123990880747520 (#21)
github-actions[bot] Jul 16, 2026
4bbf2f5
chore: update antigravity to 2.1.1-6123990880747520 (#22)
github-actions[bot] Jul 18, 2026
dff73d5
chore: update antigravity to 2.1.1-6123990880747520 (#23)
github-actions[bot] Jul 21, 2026
ac546ec
chore: update antigravity to 2.1.1-6123990880747520 (#24)
github-actions[bot] Jul 24, 2026
6e25339
chore: update antigravity to 2.1.1-6123990880747520 (#25)
github-actions[bot] Jul 25, 2026
69c1a71
chore: update antigravity to 2.1.1-6123990880747520 (#26)
github-actions[bot] Jul 28, 2026
7cf1c94
chore: update antigravity to 2.1.1-6123990880747520 (#27)
github-actions[bot] Jul 31, 2026
3dd2d05
chore: update antigravity to 2.1.1-6123990880747520 (#28)
github-actions[bot] Aug 3, 2026
11435a4
chore: update antigravity to 2.1.1-6123990880747520 (#29)
github-actions[bot] Aug 7, 2026
1584de4
chore: update antigravity to 2.1.1-6123990880747520 (#30)
github-actions[bot] Aug 11, 2026
4de6397
chore: update antigravity to 2.5.4-6665745933926400 (#31)
github-actions[bot] Aug 13, 2026
abe9107
chore: update antigravity to 2.5.5-4923483625488384 (#32)
github-actions[bot] Aug 14, 2026
cbb3e20
Sync with upstream state
Daniel-42-z Aug 17, 2026
9e5d8c8
chore: update antigravity (app 2.8.1-6512087774658560, ide 2.5.5-4923…
github-actions[bot] Aug 18, 2026
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
6 changes: 6 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[*.nix]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
35 changes: 26 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
branches:
- master
paths:
- "package.nix"
- "artifacts/versions.json"
# Allow manual trigger
workflow_dispatch:

Expand Down Expand Up @@ -39,10 +39,19 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Get current version from flake.nix
CURRENT_VERSION=$(grep -oP 'version = "\K[^"]+' flake.nix | head -1)
extract_version() { jq -r ".\"$1\".\"x86_64-linux\".url" artifacts/versions.json | grep -oP '[0-9]+\.[0-9]+\.[0-9]+-[0-9]+'; }

# The 2.0 app is the flagship/default package, so the release is tagged by its version.
APP_VERSION=$(extract_version "Antigravity 2.0")
IDE_VERSION=$(extract_version "Antigravity IDE")
CLI_VERSION=$(extract_version "Antigravity CLI")
CURRENT_VERSION="$APP_VERSION"

echo "current_version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
echo "Current version: $CURRENT_VERSION"
echo "app_version=$APP_VERSION" >> $GITHUB_OUTPUT
echo "ide_version=$IDE_VERSION" >> $GITHUB_OUTPUT
echo "cli_version=$CLI_VERSION" >> $GITHUB_OUTPUT
echo "Versions — app: $APP_VERSION, ide: $IDE_VERSION, cli: $CLI_VERSION"

# Check if release already exists for this version
if gh release view "v$CURRENT_VERSION" >/dev/null 2>&1; then
Expand All @@ -58,6 +67,9 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ steps.release_check.outputs.current_version }}
APP_VERSION: ${{ steps.release_check.outputs.app_version }}
IDE_VERSION: ${{ steps.release_check.outputs.ide_version }}
CLI_VERSION: ${{ steps.release_check.outputs.cli_version }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
Expand All @@ -66,7 +78,13 @@ jobs:

gh release create "v$VERSION" \
--title "Google Antigravity v$VERSION" \
--notes "Auto-updated Google Antigravity to version $VERSION.
--notes "Auto-updated Google Antigravity packages.

| Component | Version |
| --- | --- |
| Antigravity 2.0 app (\`default\`) | $APP_VERSION |
| Antigravity IDE | $IDE_VERSION |
| Antigravity CLI (\`agy\`) | $CLI_VERSION |

## Installation

Expand All @@ -78,11 +96,10 @@ jobs:

See: https://antigravity.google/releases

## Features
## Notes

- 🤖 Agentic IDE: Next-generation AI-powered development
- 🚀 Auto-updating: Updates daily at 07:00 UTC
- 📦 Multi-platform: Linux & macOS (x86_64, aarch64)
- 🔧 FHS Environment: Maximum compatibility"
- 🔧 FHS + no-FHS variants for the GUI apps
- ✅ Hashes verified by build before release"

echo "✓ Created release v$VERSION"
54 changes: 31 additions & 23 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,7 @@ jobs:
- name: Setup Nix cache
uses: DeterminateSystems/magic-nix-cache-action@main

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install Playwright
run: |
# Install locally (not globally) so node can find the module
npm install playwright-chromium
npx playwright install chromium

- name: Configure Git
run: |
Expand All @@ -55,15 +46,21 @@ jobs:
if ./scripts/update-version.sh 2>&1 | tee update_output.txt; then
echo "update_success=true" >> $GITHUB_OUTPUT

# Extract new version if updated
if grep -q "Update complete" update_output.txt; then
# Extract version carefully - only the semver-build pattern
NEW_VERSION=$(grep -oP 'version = "\K[0-9]+\.[0-9]+\.[0-9]+-[0-9]+' flake.nix | head -1)
echo "Detected new version: $NEW_VERSION"
echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
echo "has_changes=true" >> $GITHUB_OUTPUT
else
# Check if versions.json was modified
if git diff --quiet artifacts/versions.json; then
echo "has_changes=false" >> $GITHUB_OUTPUT
else
extract_version() { jq -r ".\"$1\".\"x86_64-linux\".url" artifacts/versions.json | grep -oP '[0-9]+\.[0-9]+\.[0-9]+-[0-9]+'; }
APP_VERSION=$(extract_version "Antigravity 2.0")
IDE_VERSION=$(extract_version "Antigravity IDE")
CLI_VERSION=$(extract_version "Antigravity CLI")
# The 2.0 app is the flagship/default; track its version for the branch + release tag.
echo "Detected versions — app: $APP_VERSION, ide: $IDE_VERSION, cli: $CLI_VERSION"
echo "new_version=$APP_VERSION" >> $GITHUB_OUTPUT
echo "app_version=$APP_VERSION" >> $GITHUB_OUTPUT
echo "ide_version=$IDE_VERSION" >> $GITHUB_OUTPUT
echo "cli_version=$CLI_VERSION" >> $GITHUB_OUTPUT
echo "has_changes=true" >> $GITHUB_OUTPUT
fi
else
echo "update_success=false" >> $GITHUB_OUTPUT
Expand All @@ -72,22 +69,33 @@ jobs:
exit 1
fi

- name: Verify packages build
if: steps.update.outputs.has_changes == 'true'
run: |
echo "Running flake check..."
nix flake check
echo "Building updated packages (verifies the new hashes before opening a PR)..."
nix build .#default .#google-antigravity-ide .#google-antigravity-cli --no-link --print-build-logs

- name: Create Pull Request
if: steps.update.outputs.has_changes == 'true'
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "chore: update antigravity to ${{ steps.update.outputs.new_version }}"
title: "chore: update antigravity to ${{ steps.update.outputs.new_version }}"
commit-message: "chore: update antigravity (app ${{ steps.update.outputs.app_version }}, ide ${{ steps.update.outputs.ide_version }}, cli ${{ steps.update.outputs.cli_version }})"
title: "chore: update antigravity (app ${{ steps.update.outputs.app_version }}, ide ${{ steps.update.outputs.ide_version }}, cli ${{ steps.update.outputs.cli_version }})"
body: |
## Google Antigravity Update

This PR updates Google Antigravity to version **${{ steps.update.outputs.new_version }}**.
This PR updates the Google Antigravity Nix flake packages.

Detected versions:
- **Antigravity 2.0 app** (`default`): `${{ steps.update.outputs.app_version }}`
- **Antigravity IDE**: `${{ steps.update.outputs.ide_version }}`
- **Antigravity CLI** (`agy`): `${{ steps.update.outputs.cli_version }}`

### Changes
- Updated version in `flake.nix`
- Updated version and hash in `package.nix`
- Ran `nix flake update`
- Updated versions and hashes in `artifacts/versions.json`

### Testing
- ✅ Built successfully
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ Thumbs.db
update_output.txt
node_modules/
package-lock.json

*.tar.gz
107 changes: 42 additions & 65 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,44 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co

## Project Overview

**antigravity-nix** is an auto-updating Nix Flake that packages Google Antigravity (a proprietary agentic IDE) for NixOS systems. It uses browser automation to detect new versions and automatically creates PRs with updates daily at 07:00 UTC.
**antigravity-nix** is an auto-updating Nix Flake that packages Google Antigravity (a proprietary agentic AI platform) for NixOS and Darwin systems. It uses API endpoints to detect new versions of the Base App, IDE, and CLI tools, automatically creating PRs with updates daily at 07:00 UTC.

**Key Challenge**: Antigravity is a binary distribution that requires a standard Linux filesystem layout, which conflicts with NixOS's unique structure. This is solved using `buildFHSEnv` to create an isolated FHS environment.
**Key Challenge**: The Antigravity GUI distributions are binaries that require a standard Linux filesystem layout, which conflicts with NixOS's unique structure. This is solved using `buildFHSEnv` or `autoPatchelfHook` in a multi-component architecture.

## Architecture

### Two-Stage Build Process
### Component-Based Packaging

1. **antigravity-unwrapped** (package.nix:53-77): Extracts the upstream tarball into `/nix/store` without modification
2. **FHS Environment** (package.nix:80-135): Wraps the binary in a container with standard Linux paths and all required libraries
The flake now supports three discrete packages under the `pkgs/` directory:
1. `google-antigravity` (`pkgs/google-antigravity2.nix`): The default package, for the Antigravity 2.0 Base App.
2. `google-antigravity-ide` (`pkgs/google-antigravity-ide.nix`): The Antigravity IDE.
3. `google-antigravity-cli` (`pkgs/cli.nix`): The lightweight `agy` terminal CLI.

The GUI packages share the heavy-lifting extraction and FHS-wrapping logic via `pkgs/package.nix`.

### Chrome Integration Strategy

Antigravity requires Chrome to be available. The package creates a Chrome wrapper (package.nix:44-50) that:
Antigravity GUI apps require Chrome to be available. The `package.nix` wrapper:
- Forces use of the user's existing Chrome profile (`~/.config/google-chrome`)
- Ensures any Chrome extensions the user has installed are available to Antigravity
- Sets `CHROME_BIN` and `CHROME_PATH` environment variables (package.nix:128-129)
- Sets `CHROME_BIN` and `CHROME_PATH` environment variables

### Version Detection Architecture

The update workflow uses **browser automation** (not curl) because Antigravity's download page is JavaScript-rendered:
The update workflow uses API requests (via `curl` and `jq`) to Google Cloud Run endpoints to fetch the latest builds:

- `scripts/scrape-version.js`: Playwright-based scraper that loads the page with a real browser
- `scripts/check-version.sh`: Quick version comparison (current vs. latest)
- `scripts/update-version.sh`: Full update process (version + hash + build test)
- `scripts/check-version.sh`: Quick API queries to determine if any component has an update
- `scripts/update-version.sh`: Full update process (version + hash verification via `nix-prefetch-url`)
- `artifacts/versions.json`: The source-of-truth JSON dictionary holding resolved URLs and SRI hashes for every component and platform

**Important**: The scraper requires `playwright-chromium` to be installed and browsers to be downloaded (`npx playwright install chromium`).
**Important**: Web scraping via Playwright has been completely removed in favor of direct API interaction.

## Common Commands

### Building and Testing

```bash
# Build the package
# Build the default package (Base App)
nix build .#default

# Test run without installing
Expand All @@ -46,28 +50,23 @@ nix run .#default
# Build and check flake
nix flake check

# Update flake lock
nix flake update
# Build the CLI
nix build .#google-antigravity-cli
```

### Version Management

```bash
# Enter the dev shell with necessary tools (jq, curl, gh)
nix develop

# Check for new version (no changes)
./scripts/check-version.sh

# Update to latest version (modifies files, builds, commits)
# Update to latest version (modifies versions.json, builds, commits)
./scripts/update-version.sh

# Manually test version scraping
node scripts/scrape-version.js
```

**Prerequisites for version scripts**:
- Node.js 20+
- `npm install -g playwright-chromium`
- `npx playwright install chromium`

### GitHub Workflows

**Manual triggers via `gh` CLI**:
Expand All @@ -76,9 +75,6 @@ node scripts/scrape-version.js
# Manually trigger update workflow
gh workflow run update.yml

# Trigger with specific inputs
gh workflow run cleanup-branches.yml -f dry_run=true

# View workflow runs
gh run list --workflow=update.yml
gh run view <run-id>
Expand All @@ -88,17 +84,17 @@ gh run view <run-id>

### Hash Updates

When updating versions, the hash must be updated in two steps (scripts/update-version.sh:96-121):
When updating versions in `artifacts/versions.json`, hashes must be converted to SRI format:

1. Download with `nix-prefetch-url` to get base hash
1. Download with `nix-prefetch-url` to get the base hash
2. Convert to SRI format with `nix hash to-sri`
3. Update `package.nix` with the SRI hash (`sha256-...`)
3. Update `artifacts/versions.json` with the SRI hash (`sha256-...` or `sha512-...`)

**Never** use fake/placeholder hashes - the build will fail and CI won't catch it until runtime.
**Never** use fake/placeholder hashes. The `update.yml` workflow runs `nix flake check` + `nix build` on the updated packages before opening a PR (and `scripts/test.mjs` does the same locally), so a wrong hash fails CI rather than reaching users.

### FHS Environment Dependencies

The `targetPkgs` list (package.nix:83-123) includes all libraries Antigravity needs. If adding new dependencies:
The `targetPkgs` list in `pkgs/package.nix` includes all libraries the GUI apps need. If adding new dependencies:

- Include both the library and its transitive dependencies
- Add X11 libraries with `xorg.` prefix
Expand All @@ -109,26 +105,14 @@ The `targetPkgs` list (package.nix:83-123) includes all libraries Antigravity ne

The three workflows work together:

1. **update.yml**: Runs daily at 07:00 UTC, creates PRs, enables auto-merge
2. **release.yml**: Triggers on `package.nix` changes to main, creates GitHub releases
1. **update.yml**: Runs daily at 07:00 UTC; on a version change it runs `nix flake check` + `nix build` to verify the new hashes, then creates a PR and enables auto-merge
2. **release.yml**: Triggers on `artifacts/versions.json` changes to main, creates GitHub releases
3. **cleanup-branches.yml**: Deletes merged `auto-update/*` branches

**Release workflow** (release.yml) only runs when:
- `package.nix` is modified
- Version in `flake.nix` changed compared to previous commit
- `artifacts/versions.json` is modified
- Release tag doesn't already exist

### Version String Format

Antigravity uses the format: `MAJOR.MINOR.PATCH-BUILD_NUMBER`

Example: `1.11.2-6251250307170304`

This appears in three files:
- `flake.nix` line 58: metadata for consumers
- `package.nix` line 36: used in derivation
- Both must be updated together

## Testing Checklist

Before committing changes to packaging:
Expand All @@ -146,8 +130,11 @@ nix flake metadata
# 4. Check for evaluation errors
nix flake check

# 5. Test on actual system (if modifying FHS env)
nix run .#default # Launch full GUI
# 5. Test CLI
nix run .#google-antigravity-cli -- --version

# 6. Full integration test (builds all 5 packages + smoke-checks the binaries)
node scripts/test.mjs
```

## Common Issues
Expand All @@ -157,26 +144,16 @@ nix run .#default # Launch full GUI
The FHS wrapper sets `CHROME_BIN`/`CHROME_PATH` to a wrapper script, not the actual Chrome binary. If Antigravity can't find Chrome:

1. Verify `google-chrome` is in system packages
2. Check the wrapper script path in package.nix:44-50
2. Check the wrapper script path in `pkgs/package.nix`
3. Test: `CHROME_BIN=/path/to/wrapper /path/to/wrapper --version`

### Version scraping fails

The scraper requires JavaScript rendering. Common failures:

- **"playwright not found"**: Run `npm install -g playwright-chromium`
- **"executable not found"**: Run `npx playwright install chromium`
- **Timeout errors**: Increase timeout in scrape-version.js:23 (currently 30s)
- **No version found**: The page structure changed - update selectors in scrape-version.js:30-53

### Workflow doesn't create PR

Check GitHub Actions logs. Common causes:

1. Version hasn't changed (intentional - exits cleanly)
2. Playwright not installed (CI installs it, but check workflow output)
3. Build failed (hash mismatch or missing dependencies)
4. Permissions issue (workflow needs `contents: write`)
2. Build failed (hash mismatch or missing dependencies)
3. Permissions issue (workflow needs `contents: write`)

## Updating This Package

Expand All @@ -192,12 +169,12 @@ git push

### For Packaging Changes

When modifying `package.nix` or `flake.nix`:
When modifying `pkgs/*.nix` or `flake.nix`:

1. Test locally with multiple build approaches
1. Test locally with multiple build approaches (FHS and no-FHS)
2. Verify the FHS environment includes all necessary libraries
3. Test with `nix run .#default` on a clean NixOS VM if possible
4. Check that the desktop entry works (`antigravity` command from launcher)
4. Check that the desktop entry works (`antigravity-ide` or `antigravity` command)

### For Workflow Changes

Expand Down
Loading