-
Notifications
You must be signed in to change notification settings - Fork 1
feat(ai-tools): migrate Gemini CLI → Antigravity CLI + OpenCode #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -86,7 +86,7 @@ For cloud environments (RunPod, Hetzner, Lambda Labs, etc): | |
| - [AI Assistants](#ai-assistants) | ||
| - [Claude Code](#claude-code-primary-ai-assistant) | ||
| - [Codex CLI](#codex-cli-openai) | ||
| - [Gemini CLI](#gemini-cli-google) | ||
| - [Antigravity CLI + OpenCode](#antigravity-cli-google--opencode) | ||
| - [Terminal & Shell](#terminal--shell) | ||
| - [Ghostty](#ghostty-terminal-emulator) | ||
| - [Powerlevel10k Prompt](#powerlevel10k-prompt) | ||
|
|
@@ -273,22 +273,22 @@ claude-tools context --list # Show active plugins and available prof | |
|
|
||
| The configuration follows the same research discipline as Claude Code but adapted for Codex's execution model. | ||
|
|
||
| ### Gemini CLI (Google) | ||
| ### Antigravity CLI (Google) + OpenCode | ||
|
|
||
| [Gemini CLI](https://github.com/google-gemini/gemini-cli) can sync with Claude Code configurations: | ||
| Gemini CLI was retired by Google on **2026-06-18**; [Antigravity CLI](https://antigravity.google/docs/cli-features) (`agy`) is its official successor. [OpenCode](https://opencode.ai) is installed alongside as a model-agnostic OSS option. Both are installed by the `ai-tools` component. | ||
|
|
||
| Antigravity CLI can sync with Claude Code skills: | ||
|
|
||
| ```bash | ||
| ./scripts/sync_claude_to_gemini.sh # Syncs skills/agents/permissions | ||
| ./scripts/sync_claude_to_antigravity.sh # Symlinks Claude skills into agy | ||
| ``` | ||
|
|
||
| **What it does:** | ||
|
|
||
| - Symlinks Claude Code skills to `~/.gemini/skills/` | ||
| - Converts Claude agents to Gemini skill format | ||
| - Syncs permissions from `.claude/settings.json` to Gemini policies | ||
| - Creates `GEMINI.md` pointer to CLAUDE.md | ||
| - Symlinks Claude Code skills to `~/.gemini/antigravity-cli/skills/` | ||
| - Project instructions come from `AGENTS.md` (Antigravity reads it natively) | ||
|
|
||
| **Note:** Gemini CLI uses a different skills format. The sync script adapts Claude's configuration but some features may not translate directly. | ||
| **Note:** Antigravity CLI is closed-source and brand-new; its skills/permissions schema differs from Claude's. The skills sync is adapted but untested end-to-end — permission sync is not yet ported (see the script header). | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Documentation contradicts current script behavior on permission sync. This line says permission sync is not ported, but 🤖 Prompt for AI Agents |
||
|
|
||
| ## Terminal & Shell | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -63,7 +63,7 @@ fi | |
| : "${AUTO_AGENT_APPROVAL_FILE:=$HOME/.claude/flags/auto-agent-approved-until}" | ||
| : "${AUTO_AGENT_STATE_DIR:=$HOME/.claude/state}" | ||
| : "${AUTO_AGENT_LOG_DIR:=$HOME/.claude/logs/auto-commit}" | ||
| : "${AUTO_COMMIT_BACKEND_ORDER:=codex,gemini}" | ||
| : "${AUTO_COMMIT_BACKEND_ORDER:=codex,opencode}" | ||
| : "${AUTO_COMMIT_ENABLE_CLAUDE_FALLBACK:=0}" | ||
| : "${AUTO_COMMIT_DRY_RUN:=0}" | ||
| : "${AUTO_AGENT_EXCLUDE_REGEX:=^\\.claude/worktrees/}" | ||
|
|
@@ -246,10 +246,9 @@ run_backend() { | |
| command -v codex >/dev/null 2>&1 || return 1 | ||
| run_with_timeout 240 codex -a never -s workspace-write exec --cd "$REPO_ROOT" --skip-git-repo-check "$prompt" >> "$log_file" 2>&1 | ||
| ;; | ||
| gemini) | ||
| command -v gemini >/dev/null 2>&1 || return 1 | ||
| run_with_timeout 240 gemini \ | ||
| -p "$prompt" --approval-mode yolo --output-format text >> "$log_file" 2>&1 | ||
| opencode) | ||
| command -v opencode >/dev/null 2>&1 || return 1 | ||
| run_with_timeout 240 opencode run "$prompt" >> "$log_file" 2>&1 | ||
| ;; | ||
|
Comment on lines
+249
to
252
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Check opencode CLI for working directory flags
if command -v opencode &>/dev/null; then
echo "=== opencode help output ==="
opencode --help 2>&1 | head -50
echo ""
echo "=== opencode run help ==="
opencode run --help 2>&1 | head -30
else
echo "opencode not installed"
fiRepository: yulonglin/dotfiles Length of output: 85 🌐 Web query:
💡 Result: The OpenCode CLI does not use a --cd flag to specify the working directory. Instead, it provides the following flags to set the working directory [1][2]: --cwd: Sets the current working directory (often with the short alias -c) [1][2]. --dir: Specifies the working directory to start the TUI in [3][4]. In some versions or documentation, the flag --cwd is explicitly listed with the short alias -c (e.g., opencode -c /path/to/project) [1][2][5]. Additionally, you can often simply pass the path as an argument directly when starting the command, such as opencode /path/to/project [6]. Please check your specific version's help documentation by running opencode --help to confirm which flag is available in your installation [1][2]. Citations:
🏁 Script executed: #!/bin/bash
# Check the context around lines 249-252 and the function signature
cat -n claude/hooks/auto_commit_worker.sh | sed -n '240,260p'Repository: yulonglin/dotfiles Length of output: 1085 🏁 Script executed: #!/bin/bash
# Look at the run_backend function signature and how REPO_ROOT is used
cat -n claude/hooks/auto_commit_worker.sh | sed -n '35,70p'Repository: yulonglin/dotfiles Length of output: 1522 🏁 Script executed: #!/bin/bash
# Check how codex backend uses --cd and the full context
cat -n claude/hooks/auto_commit_worker.sh | sed -n '240,260p'Repository: yulonglin/dotfiles Length of output: 1085 🌐 Web query:
💡 Result: In the OpenCode CLI, the Citations:
Pass working directory to the The Additionally, OpenCode has a known issue where it may prefer the environment's Update line 251 to: 🤖 Prompt for AI Agents |
||
| claude) | ||
| [[ "${AUTO_COMMIT_ENABLE_CLAUDE_FALLBACK:-0}" == "1" ]] || return 1 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,7 +33,7 @@ INSTALL_REGISTRY=( | |
| "core|Core packages, CLI tools, gh, SOPS/age, uv|all|true" | ||
| "zsh|ZSH + oh-my-zsh + powerlevel10k theme|all|true" | ||
| "tmux|Terminal multiplexer|all|true" | ||
| "ai-tools|Claude Code, Gemini CLI, Codex CLI|all|true" | ||
| "ai-tools|Claude Code, Codex CLI, OpenCode, Antigravity CLI|all|true" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Inconsistent tool list between install and update component descriptions. Line 36 ( 📝 Suggested fix to align descriptions- "ai-update|Daily auto-update: Claude, Codex, OpenCode|all|true"
+ "ai-update|Daily auto-update: Claude, Codex, OpenCode, Antigravity|all|true"Also applies to: 67-67 🤖 Prompt for AI Agents |
||
| "extras|hyperfine, gitui, code2prompt, terminal-notifier|all|true" | ||
| "cleanup|Automatic cleanup (macOS only)|all|true" | ||
| "experimental|ty type checker, zerobrew|all|true" | ||
|
|
@@ -64,7 +64,7 @@ DEPLOY_REGISTRY=( | |
| "dep-audit|Weekly dependency audit (supply chain defense)|all|true" | ||
| "cleanup|Auto-cleanup Downloads/Screenshots (macOS)|all|true" | ||
| "claude-cleanup|Remove idle Claude sessions after 24h|all|true" | ||
| "ai-update|Daily auto-update: Claude, Gemini, Codex|all|true" | ||
| "ai-update|Daily auto-update: Claude, Codex, OpenCode|all|true" | ||
| "mcp-sync|Daily shared MCP sync for Claude and Codex|all|true" | ||
| "brew-update|Weekly package upgrade + cleanup|all|true" | ||
| "claude-tools|Build claude-tools Rust binary|all|true" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,7 @@ | |
| # ═══════════════════════════════════════════════════════════════════════════════ | ||
| # AI CLI Tools Auto-Update | ||
| # ═══════════════════════════════════════════════════════════════════════════════ | ||
| # Updates Claude Code, Gemini CLI, and Codex CLI using the correct method | ||
| # Updates Claude Code, Codex CLI, and OpenCode using the correct method | ||
| # per tool (brew on macOS, bun on Linux). Designed to run from launchd/cron. | ||
| # | ||
| # Usage: | ||
|
|
@@ -37,7 +37,7 @@ while [[ $# -gt 0 ]]; do | |
| -h|--help) | ||
| echo "Usage: update-ai-tools [--dry-run]" | ||
| echo "" | ||
| echo "Updates Claude Code, Gemini CLI, and Codex CLI." | ||
| echo "Updates Claude Code, Antigravity CLI, Codex CLI, and OpenCode." | ||
| echo "Uses brew on macOS and bun on Linux." | ||
| echo "" | ||
| echo "Options:" | ||
|
|
@@ -147,6 +147,34 @@ update_claude() { | |
| claude update 2>&1 || log_err "Claude Code update failed" | ||
| } | ||
|
|
||
| # ─── Update Antigravity CLI ───────────────────────────────────────────────── | ||
|
|
||
| # Antigravity CLI (`agy`, Google's Gemini CLI successor) is a macOS cask and a | ||
| # manual install on Linux (no bun/npm package) — so it can't use update_tool. | ||
| update_antigravity() { | ||
| if ! command -v agy &>/dev/null; then | ||
| log_skip "agy not installed, skipping" | ||
| return 0 | ||
| fi | ||
|
|
||
| # No brew (i.e. Linux manual install) → nothing to auto-update. | ||
| if ! is_macos || ! command -v brew &>/dev/null; then | ||
| log_skip "agy: no brew (Linux manual install) — update manually, skipping" | ||
| return 0 | ||
| fi | ||
|
|
||
| if [[ "$DRY_RUN" == "true" ]]; then | ||
| log "[DRY RUN] Would run: brew upgrade --cask antigravity-cli" | ||
| return 0 | ||
| fi | ||
|
|
||
| log "Updating Antigravity CLI..." | ||
| # NOTE: if the cask declares `auto_updates true`, brew skips it unless --greedy. | ||
| # Verify on a real Mac whether --greedy is needed for `agy` to actually move. | ||
| NONINTERACTIVE=1 HOMEBREW_NO_AUTO_UPDATE=1 brew upgrade --cask antigravity-cli 2>&1 \ | ||
|
Comment on lines
+172
to
+174
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Check antigravity-cli cask auto_updates setting
if ! command -v brew &>/dev/null; then
echo "brew not available - check requires macOS"
exit 0
fi
echo "Fetching antigravity-cli cask metadata..."
brew info --cask antigravity-cli
echo ""
echo "Look for 'auto_updates' in the output above."
echo "If set to 'true', line 174 should use:"
echo " brew upgrade --cask --greedy antigravity-cli"Repository: yulonglin/dotfiles Length of output: 104 🏁 Script executed: cat -n custom_bins/update-ai-tools | sed -n '160,180p'Repository: yulonglin/dotfiles Length of output: 1027 🌐 Web query:
💡 Result: The Homebrew cask for antigravity-cli explicitly includes the auto_updates true directive in its configuration [1]. This enables automatic updates for the application when managing it via Homebrew, allowing it to integrate with standard Homebrew Cask update workflows [1][2]. The official Homebrew Cask definition for antigravity-cli is maintained in the Homebrew/homebrew-cask repository [1]. Because it is defined as a cask, users can install it using the command brew install --cask antigravity-cli [3][4][5]. The inclusion of auto_updates true is standard practice for casks that provide their own internal update mechanisms, which in this case leverages a JSON-based manifest to track and apply updates [1]. Citations:
Add The antigravity-cli cask declares Update to: 🤖 Prompt for AI Agents |
||
| || log_err "Antigravity CLI brew upgrade failed" | ||
| } | ||
|
|
||
| # ─── Main ──────────────────────────────────────────────────────────────────── | ||
|
|
||
| acquire_lock | ||
|
|
@@ -159,8 +187,9 @@ log "PATH: $PATH" | |
| set +e | ||
|
|
||
| update_claude | ||
| update_tool "gemini" "gemini-cli" "@google/gemini-cli" | ||
| update_tool "codex" "codex" "@openai/codex" | ||
| update_antigravity | ||
| update_tool "codex" "codex" "@openai/codex" | ||
| update_tool "opencode" "opencode" "opencode-ai" | ||
|
|
||
| set -e | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the retirement tense/date wording.
As of June 17, 2026, "was retired on 2026-06-18" is premature. Use future-tense phrasing (e.g., "access ends on June 18, 2026") until that date.
🤖 Prompt for AI Agents