Skip to content
Merged
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
6 changes: 3 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ This repo **is** a CLI tool manager, so the word "upgrade" is overloaded:
## Index of scoped AGENTS.md

- [cli_audit/AGENTS.md](./cli_audit/AGENTS.md) — Python package (21 modules)
- [scripts/AGENTS.md](./scripts/AGENTS.md) — Installation scripts (Bash, 34 scripts)
- [scripts/AGENTS.md](./scripts/AGENTS.md) — Installation scripts (Bash, 41 scripts)
- [tests/AGENTS.md](./tests/AGENTS.md) — Test suite (pytest, 14 test files)

## Commands (verified 2026-04-16)
Expand Down Expand Up @@ -137,8 +137,8 @@ This repo **is** a CLI tool manager, so the word "upgrade" is overloaded:
**AI CLI Preparation v2.0** — Tool version auditing and installation management for AI coding agents.

- **Modules:** 21 Python modules under `cli_audit/` (see [`cli_audit/AGENTS.md`](./cli_audit/AGENTS.md))
- **Catalog:** 107 JSON tool definitions under `catalog/`
- **Installers:** 34 Bash scripts under `scripts/` (see [`scripts/AGENTS.md`](./scripts/AGENTS.md))
- **Catalog:** 108 JSON tool definitions under `catalog/`
- **Installers:** 41 Bash scripts under `scripts/` (see [`scripts/AGENTS.md`](./scripts/AGENTS.md))
- **Phase 1:** Detection & auditing (complete)
- **Phase 2:** Installation & upgrade management (complete)
- **Entry point:** `audit.py` → `cli_audit` package
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and the project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.
## [Unreleased]

### Added
- `agy` catalog entry (`catalog/agy.json` + `scripts/install_agy.sh`): the Google Antigravity CLI, installed with the official installer from antigravity.google. When `~/.local/bin` is already on `PATH`, the installer passes `--skip-path` so `~/.bashrc` and `~/.profile` get no extra PATH line (if Google changes the line it patches, it warns and runs the unpatched installer, which adds that line); updates run `agy update`.
- `pi` catalog entry: the pi coding agent, installed from npm as `@earendil-works/pi-coding-agent` (the earlier `@mariozechner/pi-coding-agent` package is deprecated); upstream version from GitHub `earendil-works/pi`.
- `jules` catalog entry: the Google Jules CLI (`@google/jules`), Google's asynchronous coding agent, with bash completion from `jules completion bash`.
- `herdr` catalog entry (`catalog/herdr.json`): terminal multiplexer for coding agents, installed as a raw linux binary from GitHub releases (x86_64, aarch64) with bash completion.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ make test-parallel # Parallel via pytest-xdist

## Installation scripts

All 107 cataloged tools can be installed, upgraded, uninstalled, or reconciled via generic Make targets:
All 108 cataloged tools can be installed, upgraded, uninstalled, or reconciled via generic Make targets:

```bash
# Generic pattern targets - work for ANY cataloged tool
Expand Down Expand Up @@ -543,7 +543,7 @@ When ambiguous, the audit may report a generic bucket (e.g., `~/.local/bin`). Th

### Actions: install, upgrade, uninstall, reconcile

All pattern targets (`install-%`, `upgrade-%`, `uninstall-%`, `reconcile-%`) work for any of the 107 cataloged tools. They use a three-step fallback: dedicated script, then generic installer, then error.
All pattern targets (`install-%`, `upgrade-%`, `uninstall-%`, `reconcile-%`) work for any of the 108 cataloged tools. They use a three-step fallback: dedicated script, then generic installer, then error.

```bash
# Upgrade any tool
Expand Down
12 changes: 6 additions & 6 deletions catalog/COVERAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

This file documents which tools have catalog entries and how each one is installed.

## Catalog entries (107)
## Catalog entries (108)

Counted from `catalog/*.json` on 2026-09-22. Every tool the audit tracks has a catalog entry; its `install_method` selects the installer (`scripts/installers/<method>.sh`). `dedicated_script` runs the script named in the entry's `script` field. `auto` goes through the reconciliation system (`reconcile_tool` in `scripts/lib/reconcile.sh`).
Counted from `catalog/*.json` on 2026-11-28. Every tool the audit tracks has a catalog entry; its `install_method` selects the installer (`scripts/installers/<method>.sh`). `dedicated_script` runs the script named in the entry's `script` field. `auto` goes through the reconciliation system (`reconcile_tool` in `scripts/lib/reconcile.sh`).

| install_method | Count | Tools |
|---|---|---|
| `github_release_binary` | 38 | ast-grep, curlie, dasel, direnv, dive, fx, fzf, gh, gh-aw, gh-aw-firewall, git-absorb, git-branchless, git-lfs, gitleaks, glab, golangci-lint, google-workspace-cli, gosec, herdr, jq, just, kubectl, mlr, ninja, opengrep, qsv, rga, sd, shellcheck, shfmt, symfony, tfsec, trivy, vhs, watchexec, xsv, yq, zellij |
| `dedicated_script` | 18 | blesh, byobu, claude, composer, docker, gem, go, node, parallel, pip, python, ruby, rust, tmux, tree, uv, wslu, yarn |
| `dedicated_script` | 19 | agy, blesh, byobu, claude, composer, docker, gem, go, node, parallel, pip, python, ruby, rust, tmux, tree, uv, wslu, yarn |
| `auto` | 13 | actionlint, bat, delta, difftastic, dust, fd, gup, hyperfine, jj, pnpm, ripgrep, scc, tokei |
| `uv_tool` | 12 | ansible-core, bandit, black, flake8, gam, git-filter-repo, httpie, isort, pre-commit, ruff, semgrep, trustmux |
| `package_manager` | 10 | bwrap, ctags, entr, git, php, pipx, poetry, prename, rename.ul, sponge |
Expand All @@ -28,8 +28,8 @@ A sweep on 2026-07-22 (commit 9b6c053) audited the entries present in that
commit for a bash-completion generator: each generator was executed and its
output validated against `complete -…` / `compgen ` / `COMPREPLY`, then
checked to confirm it registers the entry's own `binary_name`. codex, pip and
pipx were not installed then; see the end of this section. herdr, jules, pi
and vault were checked when they were added. Five entries are not audited:
pipx were not installed then; see the end of this section. agy, herdr, jules,
pi and vault were checked when they were added. Five entries are not audited:
blesh, bw, bwrap, byobu, trustmux.

**42 entries declare `bash_completion`** — 41 `command`, 1 `source_path` (rbenv).
Expand Down Expand Up @@ -57,7 +57,7 @@ The completion file is named after `binary_name`, so a script that registers a

### No bash completion available

actionlint, ansible-core, aws, bandit, claude, ctags, curlie, difftastic,
actionlint, agy, ansible-core, aws, bandit, claude, ctags, curlie, difftastic,
direnv, dust, entr, eslint, flake8, gam, gem, gemini, gh-aw-firewall, git,
git-branchless, git-filter-repo, go, google-workspace-cli, gosec, httpie,
hyperfine, isort, jq, ninja, opengrep, php, pi, pre-commit, prename, prettier,
Expand Down
4 changes: 2 additions & 2 deletions catalog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Install tools via system package managers (apt, brew, dnf, pacman).
2. The tool will automatically be available via `make install-<tool>`, `make upgrade-<tool>`, `make uninstall-<tool>`, and `make reconcile-<tool>`
3. No need to create a custom install script!

Currently **107 tools** are cataloged.
Currently **108 tools** are cataloged.

## Environment Variables

Expand All @@ -96,6 +96,6 @@ make upgrade

## Architecture

All 107 tools have catalog entries. The generic installer (`scripts/install_tool.sh`) reads a tool's catalog JSON and delegates to the appropriate method-specific installer under `scripts/installers/`. Tools with complex installation needs (python, node, docker, rust, etc.) use `install_method: "dedicated_script"` to route to their existing bespoke scripts.
All 108 tools have catalog entries. The generic installer (`scripts/install_tool.sh`) reads a tool's catalog JSON and delegates to the appropriate method-specific installer under `scripts/installers/`. Tools with complex installation needs (python, node, docker, rust, etc.) use `install_method: "dedicated_script"` to route to their existing bespoke scripts.

See [ADR-007](../docs/adr/ADR-007-generic-tool-installation-architecture.md) for the full architectural decision record.
17 changes: 17 additions & 0 deletions catalog/agy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "agy",
"category": "ai",
"install_method": "dedicated_script",
"description": "Google Antigravity CLI - AI coding agent that runs in your terminal",
"homepage": "https://antigravity.google/docs/cli/install",
"binary_name": "agy",
"script": "install_agy.sh",
"skip_upstream": true,
"version_command": "agy --version 2>/dev/null | grep -oE '[0-9]+\\.[0-9]+\\.[0-9]+' | head -1",
Comment thread
CybotTM marked this conversation as resolved.
Resolved
"guide": {
"display_name": "Google Antigravity CLI",
"install_action": "upgrade",
"order": 406
},
"notes": "Official installer: curl -fsSL https://antigravity.google/cli/install.sh | bash (binary in ~/.local/bin/agy, SHA512 checked against the release manifest). Updates itself in the background; 'agy update' updates on demand. First run signs in with a Google account."
}
4 changes: 2 additions & 2 deletions docs/API_REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class ToolCatalog:
```python
from cli_audit import ToolCatalog

# Load catalog (107 tools)
# Load catalog (108 tools)
catalog = ToolCatalog()
entries = catalog.load_all()

Expand All @@ -140,7 +140,7 @@ if catalog.has("fzf"):
fzf = catalog.get("fzf")

# List all tools
all_tools = catalog.list_all() # Returns list of 107 tool names
all_tools = catalog.list_all() # Returns list of 108 tool names
```

#### `cli_audit.collectors` - Upstream Version Collection
Expand Down
2 changes: 1 addition & 1 deletion docs/CATALOG_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The catalog system allows tool definitions to be managed as JSON files instead o
- **Clear Separation**: Data (JSON) vs Logic (Python)

**Location**: `catalog/` directory at project root
**Current Size**: 107 JSON tool definitions
**Current Size**: 108 JSON tool definitions

## Quick Start

Expand Down
4 changes: 2 additions & 2 deletions docs/INDEX.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

AI CLI Preparation is a specialized environment audit tool designed to ensure AI coding agents (like Claude Code) have access to all necessary developer tools. This documentation provides comprehensive technical details for developers, contributors, and integrators.

**Architecture:** Modular design with 21 specialized Python modules and 107 JSON tool catalog entries, evolved from a 3,387-line monolith to a maintainable, extensible system.
**Architecture:** Modular design with 21 specialized Python modules and 108 JSON tool catalog entries, evolved from a 3,387-line monolith to a maintainable, extensible system.

**Project Status:**
- **Phase 1 (Detection & Auditing):** ✅ Complete - Modular refactoring complete
Expand All @@ -37,7 +37,7 @@ AI CLI Preparation is a specialized environment audit tool designed to ensure AI

2. **[CATALOG_GUIDE.md](CATALOG_GUIDE.md)** - JSON Catalog System ⭐ **NEW**
- Tool definition schema and structure
- 107 JSON catalog entries
- 108 JSON catalog entries
- Creating and managing catalog entries
- ToolCatalog API and usage patterns
- Community contribution workflows
Expand Down
8 changes: 8 additions & 0 deletions docs/TOOL_ECOSYSTEM.md
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,14 @@ CLI_AUDIT_JSON=1 uv run python audit.py | jq '.[] | select(.category == "securit
- **Install:** `npm install -g @google/gemini-cli`
- **Upgrade:** `npm update -g @google/gemini-cli`

### agy
- **Purpose:** Google Antigravity CLI - AI coding agent that runs in your terminal
- **Executable:** `agy`
- **Upstream:** Official installer (https://antigravity.google/cli/install.sh); no release feed, the CLI updates itself
- **Use Case:** Terminal coding agent backed by Google models
- **Install:** `make install-agy` (runs the official installer)
- **Upgrade:** `agy update`

### jules
- **Purpose:** Google Jules CLI - terminal client for Jules, Google's asynchronous coding agent
- **Executable:** `jules`
Expand Down
5 changes: 3 additions & 2 deletions scripts/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

## Overview

34 Bash scripts for installing developer tools with multiple actions:
41 Bash scripts for installing developer tools with multiple actions:
- **install**: Fresh installation (default action)
- **update**: Upgrade to latest version
- **uninstall**: Remove installation
Expand All @@ -25,6 +25,7 @@
- `install_tool.sh`: Main orchestrator - reads catalog, delegates to installers
- `install_group.sh`: Install tool groups
- `install_claude.sh`: Claude Code CLI (native installer)
- `install_agy.sh`: Google Antigravity CLI (official installer; `agy update` for updates)
- `install_ansible.sh`, `install_brew.sh`, `install_composer.sh`
- `install_docker.sh`, `install_gem.sh`, `install_parallel.sh`, `install_yarn.sh`
- `install_tmux.sh`, `install_tree.sh` (single-binary utilities)
Expand Down Expand Up @@ -128,7 +129,7 @@ make scripts-perms # Ensure all scripts are executable
./scripts/install_node.sh reconcile
```

**Via Make (works for all 107 cataloged tools):**
**Via Make (works for all 108 cataloged tools):**
```bash
make install-python # Install Python toolchain (dedicated script)
make upgrade-python # Upgrade Python toolchain
Expand Down
193 changes: 193 additions & 0 deletions scripts/install_agy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: Netresearch DTT GmbH
# Dedicated installer for the Google Antigravity CLI (agy)
# Uses the official installer; updates go through the CLI's own updater
set -euo pipefail

DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ACTION="${1:-install}"
INSTALLER_URL="https://antigravity.google/cli/install.sh"
BIN_DIR="$HOME/.local/bin"
AGY_BIN="$BIN_DIR/agy"
# curl may only use https, including on redirects
CURL_HTTPS_ONLY=(--proto '=https')

# The agy to act on: the first agy on PATH, which is the copy a plain `agy`
# runs and the audit reports, else ~/.local/bin/agy (where the official
# installer puts it). Virtualenv and conda bins are environments, not
# installations; the patterns follow detect_all_installations in
# lib/capability.sh.
find_agy() {
local candidate
while IFS= read -r candidate; do
case "$candidate" in

Check failure on line 24 in scripts/install_agy.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Add a default case (*) to handle unexpected values.

See more on https://sonarcloud.io/project/issues?id=netresearch_coding_agent_cli_toolset&issues=AaIhZeOtQKu3y-8RI1Tc&open=AaIhZeOtQKu3y-8RI1Tc&pullRequest=202
*/venv/bin/*|*/.venv/bin/*|*/venvs/*/bin/*|*/.venvs/*/bin/*|*/virtualenvs/*/bin/*|*/.virtualenvs/*/bin/*) continue ;;
*/envs/*/bin/*|*/conda/*/bin/*|*/miniconda*/bin/*|*/anaconda*/bin/*) continue ;;
*/env/bin/*) continue ;;
esac
printf '%s\n' "$candidate"
return 0
done < <(type -P -a agy 2>/dev/null || true)
if [ -x "$AGY_BIN" ]; then

Check failure on line 32 in scripts/install_agy.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use '[[' instead of '[' for conditional tests. The '[[' construct is safer and more feature-rich.

See more on https://sonarcloud.io/project/issues?id=netresearch_coding_agent_cli_toolset&issues=AaIhUQWXXWQgD9NAJoNM&open=AaIhUQWXXWQgD9NAJoNM&pullRequest=202
printf '%s\n' "$AGY_BIN"
fi
}

get_current_version() {
local bin
bin="$(find_agy)"
[ -n "$bin" ] || return 0

Check failure on line 40 in scripts/install_agy.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use '[[' instead of '[' for conditional tests. The '[[' construct is safer and more feature-rich.

See more on https://sonarcloud.io/project/issues?id=netresearch_coding_agent_cli_toolset&issues=AaIhVZLaA8dDtxJnl2PN&open=AaIhVZLaA8dDtxJnl2PN&pullRequest=202
# macOS has no timeout(1)
if command -v timeout >/dev/null 2>&1; then
timeout 2 "$bin" --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1 || true
else
"$bin" --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1 || true
fi
}

# True when a PATH entry is ~/.local/bin, also written with a trailing slash
# or through a symlinked parent
bin_dir_on_path() {
local entry resolved_bin="" resolved
local -a entries
[ -d "$BIN_DIR" ] && resolved_bin="$(cd "$BIN_DIR" && pwd -P)"

Check failure on line 54 in scripts/install_agy.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use '[[' instead of '[' for conditional tests. The '[[' construct is safer and more feature-rich.

See more on https://sonarcloud.io/project/issues?id=netresearch_coding_agent_cli_toolset&issues=AaIhVZLaA8dDtxJnl2PO&open=AaIhVZLaA8dDtxJnl2PO&pullRequest=202
IFS=: read -r -a entries <<<"$PATH"
for entry in "${entries[@]}"; do
# Relative entries (., bin) depend on the current directory
case "$entry" in /*) ;; *) continue ;; esac
[ "${entry%/}" = "$BIN_DIR" ] && return 0

Check failure on line 59 in scripts/install_agy.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use '[[' instead of '[' for conditional tests. The '[[' construct is safer and more feature-rich.

See more on https://sonarcloud.io/project/issues?id=netresearch_coding_agent_cli_toolset&issues=AaIhVZLaA8dDtxJnl2PQ&open=AaIhVZLaA8dDtxJnl2PQ&pullRequest=202
if [ -n "$resolved_bin" ] && [ -d "$entry" ]; then

Check failure on line 60 in scripts/install_agy.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use '[[' instead of '[' for conditional tests. The '[[' construct is safer and more feature-rich.

See more on https://sonarcloud.io/project/issues?id=netresearch_coding_agent_cli_toolset&issues=AaIhVZLaA8dDtxJnl2PS&open=AaIhVZLaA8dDtxJnl2PS&pullRequest=202

Check failure on line 60 in scripts/install_agy.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use '[[' instead of '[' for conditional tests. The '[[' construct is safer and more feature-rich.

See more on https://sonarcloud.io/project/issues?id=netresearch_coding_agent_cli_toolset&issues=AaIhVZLaA8dDtxJnl2PR&open=AaIhVZLaA8dDtxJnl2PR&pullRequest=202
resolved="$(cd "$entry" && pwd -P)" || continue
[ "$resolved" = "$resolved_bin" ] && return 0

Check failure on line 62 in scripts/install_agy.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use '[[' instead of '[' for conditional tests. The '[[' construct is safer and more feature-rich.

See more on https://sonarcloud.io/project/issues?id=netresearch_coding_agent_cli_toolset&issues=AaIhVZLaA8dDtxJnl2PT&open=AaIhVZLaA8dDtxJnl2PT&pullRequest=202
fi
done
return 1
}

warn_path_line() {
echo "[agy] Warning: $1; the installer may add a PATH line to ~/.bashrc and ~/.profile" >&2
}

# Run the official installer. It downloads the binary, checks its SHA512
# against the release manifest and then runs `agy install`, which appends a
# PATH line to ~/.bashrc and ~/.profile. When ~/.local/bin is already on PATH
# that line only moves the directory to the front, so pass --skip-path.
install_native() {
if ! command -v curl >/dev/null 2>&1; then
echo "[agy] curl is required for the official installer" >&2
return 1
fi
local work_dir installer_script
work_dir="$(mktemp -d "${TMPDIR:-/tmp}/cli-audit-agy.XXXXXX")" || return 1
installer_script="$work_dir/install.sh"

if ! curl "${CURL_HTTPS_ONLY[@]}" -fsSL "$INSTALLER_URL" -o "$installer_script"; then
echo "[agy] Failed to download $INSTALLER_URL" >&2
rm -rf "$work_dir"
return 1
fi

# A dangling ~/.local/bin/agy makes the installer's cp refuse to write
if [ -L "$AGY_BIN" ] && [ ! -e "$AGY_BIN" ]; then

Check failure on line 92 in scripts/install_agy.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use '[[' instead of '[' for conditional tests. The '[[' construct is safer and more feature-rich.

See more on https://sonarcloud.io/project/issues?id=netresearch_coding_agent_cli_toolset&issues=AaIhWblllR5ynwTSmTsN&open=AaIhWblllR5ynwTSmTsN&pullRequest=202

Check failure on line 92 in scripts/install_agy.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use '[[' instead of '[' for conditional tests. The '[[' construct is safer and more feature-rich.

See more on https://sonarcloud.io/project/issues?id=netresearch_coding_agent_cli_toolset&issues=AaIhWblllR5ynwTSmTsM&open=AaIhWblllR5ynwTSmTsM&pullRequest=202
rm -f "$AGY_BIN"
fi

if bin_dir_on_path; then
# The anchor is the line that hands over to `agy install`; if Google
# changes it, install without the patch rather than fail
if ! grep -qF '"$BINARY_PATH" install || true' "$installer_script"; then
warn_path_line "installer layout changed"
# sed without -i: BSD and GNU sed disagree on its argument
elif ! { sed 's/"\$BINARY_PATH" install || true/"\$BINARY_PATH" install --skip-path || true/' \
"$installer_script" >"$installer_script.patched" &&
mv "$installer_script.patched" "$installer_script"; }; then
warn_path_line "could not patch the installer"
fi
fi

local rc=0
bash "$installer_script" || rc=$?
rm -rf "$work_dir"
return "$rc"
}

refresh_agy_snapshot() {
if [ -f "$DIR/lib/install_strategy.sh" ]; then

Check failure on line 116 in scripts/install_agy.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use '[[' instead of '[' for conditional tests. The '[[' construct is safer and more feature-rich.

See more on https://sonarcloud.io/project/issues?id=netresearch_coding_agent_cli_toolset&issues=AaIhUQWXXWQgD9NAJoNO&open=AaIhUQWXXWQgD9NAJoNO&pullRequest=202
. "$DIR/lib/install_strategy.sh"
# The audit looks on PATH; let it see a fresh ~/.local/bin/agy
PATH="$BIN_DIR:$PATH" refresh_snapshot "agy" 2>/dev/null || true
fi
}

report() {
local before="$1" after path
hash -r 2>/dev/null || true
after="$(get_current_version)"
path="$(find_agy)"
printf "[%s] before: %s\n" "agy" "${before:-<none>}"
printf "[%s] after: %s\n" "agy" "${after:-<none>}"
if [ -n "$path" ]; then printf "[%s] path: %s\n" "agy" "$path"; fi

Check failure on line 130 in scripts/install_agy.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use '[[' instead of '[' for conditional tests. The '[[' construct is safer and more feature-rich.

See more on https://sonarcloud.io/project/issues?id=netresearch_coding_agent_cli_toolset&issues=AaIhUQWXXWQgD9NAJoNN&open=AaIhUQWXXWQgD9NAJoNN&pullRequest=202
}

install_agy() {
local before existing
before="$(get_current_version)"
existing="$(find_agy)"

if [ -n "$existing" ]; then

Check failure on line 138 in scripts/install_agy.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use '[[' instead of '[' for conditional tests. The '[[' construct is safer and more feature-rich.

See more on https://sonarcloud.io/project/issues?id=netresearch_coding_agent_cli_toolset&issues=AaIhVZLaA8dDtxJnl2PU&open=AaIhVZLaA8dDtxJnl2PU&pullRequest=202
echo "[agy] Already installed at $existing; it updates itself (run: agy update)" >&2
elif ! install_native; then
echo "[agy] Error: installation failed" >&2
echo "[agy] Install manually: curl -fsSL $INSTALLER_URL | bash" >&2
return 1
fi

report "$before"
refresh_agy_snapshot
}

upgrade_agy() {
local before existing
existing="$(find_agy)"
if [ -z "$existing" ]; then

Check failure on line 153 in scripts/install_agy.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use '[[' instead of '[' for conditional tests. The '[[' construct is safer and more feature-rich.

See more on https://sonarcloud.io/project/issues?id=netresearch_coding_agent_cli_toolset&issues=AaIhVZLaA8dDtxJnl2PV&open=AaIhVZLaA8dDtxJnl2PV&pullRequest=202
echo "[agy] Not installed, running install..." >&2
install_agy
return $?
fi
before="$(get_current_version)"
if ! "$existing" update </dev/null; then
echo "[agy] Error: '$existing update' failed" >&2
return 1
fi
report "$before"
refresh_agy_snapshot
}

uninstall_agy() {
if [ ! -e "$AGY_BIN" ] && [ ! -L "$AGY_BIN" ]; then

Check failure on line 168 in scripts/install_agy.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use '[[' instead of '[' for conditional tests. The '[[' construct is safer and more feature-rich.

See more on https://sonarcloud.io/project/issues?id=netresearch_coding_agent_cli_toolset&issues=AaIhVZLaA8dDtxJnl2PW&open=AaIhVZLaA8dDtxJnl2PW&pullRequest=202

Check failure on line 168 in scripts/install_agy.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use '[[' instead of '[' for conditional tests. The '[[' construct is safer and more feature-rich.

See more on https://sonarcloud.io/project/issues?id=netresearch_coding_agent_cli_toolset&issues=AaIhVZLaA8dDtxJnl2PX&open=AaIhVZLaA8dDtxJnl2PX&pullRequest=202
local other
other="$(command -v agy 2>/dev/null || true)"
if [ -n "$other" ]; then

Check failure on line 171 in scripts/install_agy.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use '[[' instead of '[' for conditional tests. The '[[' construct is safer and more feature-rich.

See more on https://sonarcloud.io/project/issues?id=netresearch_coding_agent_cli_toolset&issues=AaIhWblllR5ynwTSmTsO&open=AaIhWblllR5ynwTSmTsO&pullRequest=202
echo "[agy] Not installed at $AGY_BIN; $other was installed another way, remove it by hand" >&2
else
echo "[agy] Not installed at $AGY_BIN" >&2
fi
return 0
fi
rm -f "$AGY_BIN"
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
hash -r 2>/dev/null || true
echo "[agy] Removed $AGY_BIN" >&2
echo "[agy] Left in place: settings and sign-in in ~/.config/antigravity, and any" >&2
echo "[agy] 'Added by Antigravity CLI installer' PATH line in ~/.bashrc and ~/.profile" >&2
}

if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
case "$ACTION" in
install) install_agy ;;
update|upgrade) upgrade_agy ;;
uninstall) uninstall_agy ;;
reconcile) install_agy ;;
*) echo "Usage: $0 {install|update|upgrade|uninstall|reconcile}" ; exit 2 ;;
esac
fi
Loading
Loading