Skip to content

Add first-class Antigravity CLI profile support - #45

Merged
burakdede merged 9 commits into
mainfrom
antigravity-cli-support
Jul 17, 2026
Merged

Add first-class Antigravity CLI profile support#45
burakdede merged 9 commits into
mainfrom
antigravity-cli-support

Conversation

@burakdede

Copy link
Copy Markdown
Owner

Summary

Adds first-class Antigravity CLI support to aisw around the upstream model Antigravity actually exposes today: a shared live keyring-backed OAuth session plus the documented ~/.gemini/antigravity-cli/ and ~/.gemini/config/ state roots.

This brings Antigravity onto the same practical management surface as the other agents:

  • add antigravity <profile>
  • add antigravity <profile> --from-live
  • use antigravity <profile>
  • list / status
  • backup restore
  • rename / remove
  • context ... --antigravity

What Changed

  • adds Antigravity auth/state capture and restore logic in src/auth/antigravity.rs
  • wires Antigravity into add/use/status/list/context/backup/remove/rename flows
  • persists Antigravity profile, active-profile, and context mappings in config round-trips
  • adds Antigravity-specific status/list JSON metadata and keeps existing envelopes additive-only
  • documents the supported model clearly: shared live switching, not a made-up isolated auth root

Acceptance Criteria Audit

Issue: Closes #44

Covered by implementation and tests:

  • aisw add antigravity <profile> works with interactive Antigravity login
  • aisw add antigravity <profile> --from-live imports the current live Antigravity session
  • aisw use antigravity <profile> restores the managed credential and Antigravity config roots transactionally
  • aisw status and aisw status --json report Antigravity profile state clearly
  • aisw list --json includes Antigravity profiles and active state
  • backup/restore works for Antigravity profiles
  • rename/remove flows work for Antigravity profiles
  • context create/use supports --antigravity
  • rollback tests cover partial live-write failure
  • docs explain the Antigravity-specific auth/state model and unsupported assumptions

Verification

Targeted additions now cover:

  • auth internals and config persistence
  • add/from-live flows
  • use + rollback behavior
  • status human/json behavior
  • secure-backend behavior
  • context switching
  • lifecycle, backup/restore, rename, and remove

Both follow-up coverage commits passed the full repo hook, including fmt, clippy, release build, unit tests, integration tests, JSON/gui contracts, lifecycle suites, and secure-backend suites.

@burakdede
burakdede merged commit 9fd166f into main Jul 17, 2026
5 checks passed
burakdede added a commit that referenced this pull request Aug 1, 2026
Antigravity has been a supported tool since #45 but was absent from the
README and most of the doc site. It is now documented everywhere the
other three tools are.

Corrected claims that did not match the binary:
- `oauth_account.json` -> `oauth-account.json`
- Backup ids shown as `20260325T114502Z-claude-work`; the real format is
  `2026-03-25T11-45-02.123Z-0000`, and backups nest as <id>/<tool>/<profile>/
- `jq '.[] | select(.token_warning != null)'` — no such field exists
- `jq '... select(.profile == "claude/work") | sort_by(.created_at)'` —
  backup entries have no `created_at` and `profile` is just the name
- `aisw list codex --json | jq '.profiles[].name'` — output is grouped by
  tool, so this iterated null
- Quickstart listed `--from-live` under "Interactive OAuth", which is the
  opposite of what it does

Filled gaps in the reference: missing `--json` on use/remove/rename/
backup restore, missing filter flags on list/status/backup list, missing
`--antigravity` on context create/set/unset, and the global flags.

Documented previously unwritten behavior: exit codes (0/1/2) and the
JSON failure envelope, `~/.aisw/workspaces.json`, `use --all` skip-vs-fail
semantics, duplicate-account detection, API-key charset validation, and
that `uninstall --remove-data` also purges keyring entries.

Site generator: `sync-docs.mjs` hardcodes the SEO descriptions and hero
tagline that override doc frontmatter, so those were stale too.

Verified: every documented command resolves to a real subcommand, 35
documented workflows execute end to end, and all 16 jq pipelines run
clean against real output. Site builds (15 pages), SEO check passes.
burakdede added a commit that referenced this pull request Aug 1, 2026
Antigravity has been a supported tool since #45 but was absent from the
README and most of the doc site. It is now documented everywhere the
other three tools are.

Corrected claims that did not match the binary:
- `oauth_account.json` -> `oauth-account.json`
- Backup ids shown as `20260325T114502Z-claude-work`; the real format is
  `2026-03-25T11-45-02.123Z-0000`, and backups nest as <id>/<tool>/<profile>/
- `jq '.[] | select(.token_warning != null)'` — no such field exists
- `jq '... select(.profile == "claude/work") | sort_by(.created_at)'` —
  backup entries have no `created_at` and `profile` is just the name
- `aisw list codex --json | jq '.profiles[].name'` — output is grouped by
  tool, so this iterated null
- Quickstart listed `--from-live` under "Interactive OAuth", which is the
  opposite of what it does

Filled gaps in the reference: missing `--json` on use/remove/rename/
backup restore, missing filter flags on list/status/backup list, missing
`--antigravity` on context create/set/unset, and the global flags.

Documented previously unwritten behavior: exit codes (0/1/2) and the
JSON failure envelope, `~/.aisw/workspaces.json`, `use --all` skip-vs-fail
semantics, duplicate-account detection, API-key charset validation, and
that `uninstall --remove-data` also purges keyring entries.

Site generator: `sync-docs.mjs` hardcodes the SEO descriptions and hero
tagline that override doc frontmatter, so those were stale too.

Verified: every documented command resolves to a real subcommand, 35
documented workflows execute end to end, and all 16 jq pipelines run
clean against real output. Site builds (15 pages), SEO check passes.
burakdede added a commit that referenced this pull request Aug 1, 2026
…le (#50)

Antigravity has been a supported tool since #45 but was absent from the
README and most of the doc site. It is now documented everywhere the
other three tools are.

Corrected claims that did not match the binary:
- `oauth_account.json` -> `oauth-account.json`
- Backup ids shown as `20260325T114502Z-claude-work`; the real format is
  `2026-03-25T11-45-02.123Z-0000`, and backups nest as <id>/<tool>/<profile>/
- `jq '.[] | select(.token_warning != null)'` — no such field exists
- `jq '... select(.profile == "claude/work") | sort_by(.created_at)'` —
  backup entries have no `created_at` and `profile` is just the name
- `aisw list codex --json | jq '.profiles[].name'` — output is grouped by
  tool, so this iterated null
- Quickstart listed `--from-live` under "Interactive OAuth", which is the
  opposite of what it does

Filled gaps in the reference: missing `--json` on use/remove/rename/
backup restore, missing filter flags on list/status/backup list, missing
`--antigravity` on context create/set/unset, and the global flags.

Documented previously unwritten behavior: exit codes (0/1/2) and the
JSON failure envelope, `~/.aisw/workspaces.json`, `use --all` skip-vs-fail
semantics, duplicate-account detection, API-key charset validation, and
that `uninstall --remove-data` also purges keyring entries.

Site generator: `sync-docs.mjs` hardcodes the SEO descriptions and hero
tagline that override doc frontmatter, so those were stale too.

Verified: every documented command resolves to a real subcommand, 35
documented workflows execute end to end, and all 16 jq pipelines run
clean against real output. Site builds (15 pages), SEO check passes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feature] Add first-class Antigravity CLI profile support

1 participant