feat(CLI): Add Antigravity IDE support via --target antigravity flag#332
feat(CLI): Add Antigravity IDE support via --target antigravity flag#332affaan-m merged 3 commits intoaffaan-m:mainfrom
--target antigravity flag#332Conversation
This Pull Request introduces `--target antigravity` support within the installation script to bridge Everything Claude Code configurations smoothly onto the Antigravity IDE ecosystem.
### Key Changes
- Modified `install.sh` to parse and act on the new `--target antigravity` CLI arg.
- **Flattened Rules Conversion**: Logic automatically copies Language-agnostic (Common/Globs) rules as well as specific language stack rules into `common-*.md` and `{lang}-*.md` structures within `.agent/rules/`.
- **Workflow & Agent Aggregation**: Commands safely fall in `.agent/workflows/`, and `agents/` alongside `skills/` components are merged into `.agent/skills/`.
- Contains overwrite warnings to ensure local customized rules aren't completely overridden without consent.
- Minor updates to `README.md` to properly document the flag addition.
📝 WalkthroughWalkthroughAdds Antigravity as a new installation target and documents Antigravity integration; install.sh now creates a Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
install.sh (1)
191-194: Overwrite warning only coversrules/but notworkflows/orskills/.Users may have local customizations in
.agent/workflows/or.agent/skills/that would also be overwritten. Consider warning about the entire.agent/directory for consistency with the claude target behavior.💡 Suggested improvement
- if [[ -d "$DEST_DIR/rules" ]] && [[ "$(ls -A "$DEST_DIR/rules" 2>/dev/null)" ]]; then - echo "Note: $DEST_DIR/rules/ already exists. Existing files will be overwritten." + if [[ -d "$DEST_DIR" ]] && [[ "$(ls -A "$DEST_DIR" 2>/dev/null)" ]]; then + echo "Note: $DEST_DIR/ already exists. Existing files will be overwritten." echo " Back up any local customizations before proceeding." fi🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@install.sh` around lines 191 - 194, The current overwrite warning only checks DEST_DIR/rules and misses DEST_DIR/workflows and DEST_DIR/skills (or the entire .agent directory); update the check in install.sh to detect non-empty "$DEST_DIR/workflows" and "$DEST_DIR/skills" (or simply test "$DEST_DIR" or "$DEST_DIR/.agent" as a whole) and emit a consolidated warning message that mentions rules, workflows, and skills (or ".agent/") will be overwritten and advises backing up local customizations; ensure you reference the same DEST_DIR variable and preserve the existing exit/no-exit behavior and formatting used around the current echo statements.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@install.sh`:
- Line 55: The usage string printed by the install.sh script is outdated: find
the echo call that currently reads echo "Usage: $0 [--target <claude|cursor>]
<language> [<language> ...]" and update the <target> choices to include
antigravity (e.g. change <claude|cursor> to <claude|cursor|antigravity>) so the
help text matches the expanded target validation implemented elsewhere in the
script.
---
Nitpick comments:
In `@install.sh`:
- Around line 191-194: The current overwrite warning only checks DEST_DIR/rules
and misses DEST_DIR/workflows and DEST_DIR/skills (or the entire .agent
directory); update the check in install.sh to detect non-empty
"$DEST_DIR/workflows" and "$DEST_DIR/skills" (or simply test "$DEST_DIR" or
"$DEST_DIR/.agent" as a whole) and emit a consolidated warning message that
mentions rules, workflows, and skills (or ".agent/") will be overwritten and
advises backing up local customizations; ensure you reference the same DEST_DIR
variable and preserve the existing exit/no-exit behavior and formatting used
around the current echo statements.
There was a problem hiding this comment.
2 issues found across 2 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="README.md">
<violation number="1" location="README.md:754">
P3: Typo: "flatten rules" should be "flattened rules" — `flatten` is a verb, but here it's used as an adjective modifying `rules`. The PR description itself uses "Flattened Rules Conversion".</violation>
</file>
<file name="install.sh">
<violation number="1" location="install.sh:60">
P2: The usage synopsis on line 55 still reads `--target <claude|cursor>` but `antigravity` is now a valid target. Line 41's error message (`"Error: --target requires a value (claude or cursor)"`) has the same omission. All three user-facing help/error strings should list `antigravity`.</violation>
</file>
Since this is your first cubic review, here's how it works:
- cubic automatically reviews your code and comments on bugs and improvements
- Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
- Add one-off context when rerunning by tagging
@cubic-dev-aiwith guidance or docs links (includingllms.txt) - Ask questions if you need clarification on any suggestion
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
1 issue found across 1 file (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="install.sh">
<violation number="1" location="install.sh:55">
P2: The `--target` error message on line 41 was not updated to include `antigravity`. When a user omits the target value (`./install.sh --target`), the error still says `"claude or cursor"`, which is inconsistent with the updated usage text and the validation on line 48.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
install.sh (1)
39-43:⚠️ Potential issue | 🟡 MinorInclude
antigravityin the--targetmissing-value error text.The message on Line 41 is now out of sync with supported targets and can mislead users.
Proposed fix
- echo "Error: --target requires a value (claude or cursor)" >&2 + echo "Error: --target requires a value (claude, cursor, or antigravity)" >&2🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@install.sh` around lines 39 - 43, Update the missing-value error text in the install.sh --target check: in the if block that tests if [[ "${1:-}" == "--target" ]] (and specifically the echo call that currently says "Error: --target requires a value (claude or cursor)"), change the message to include the antigravity target (e.g., "Error: --target requires a value (claude, cursor, or antigravity)") so the supported targets list is accurate.
🧹 Nitpick comments (1)
install.sh (1)
234-243: Add collision warnings when mergingagents/andskills/into.agent/skills/.Two recursive copies into the same destination can silently overwrite files with identical relative paths. A pre-copy collision warning would make this safer.
Suggested hardening
# --- Skills and Agents --- + if [[ -d "$SCRIPT_DIR/agents" && -d "$SCRIPT_DIR/skills" ]]; then + while IFS= read -r rel; do + if [[ -e "$SCRIPT_DIR/skills/$rel" ]]; then + echo "Warning: '$rel' exists in both agents/ and skills/; latter copy may overwrite." >&2 + fi + done < <(cd "$SCRIPT_DIR/agents" && find . -type f) + fi + mkdir -p "$DEST_DIR/skills" if [[ -d "$SCRIPT_DIR/agents" ]]; then echo "Installing agents -> $DEST_DIR/skills/" cp -r "$SCRIPT_DIR/agents/." "$DEST_DIR/skills/" fi🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@install.sh` around lines 234 - 243, Currently the script blindly copies "$SCRIPT_DIR/agents/." and "$SCRIPT_DIR/skills/." into "$DEST_DIR/skills/" which can silently overwrite files with identical relative paths; before running the two cp -r commands, compute the set of relative paths under "$SCRIPT_DIR/agents" and "$SCRIPT_DIR/skills", detect intersections, and if any collisions exist emit a clear warning (listing the colliding relative paths) and fail or prompt for confirmation; update the block that references "$SCRIPT_DIR/agents", "$SCRIPT_DIR/skills", and "$DEST_DIR/skills" to perform this pre-copy collision check and only proceed with the copies after handling the warning.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@install.sh`:
- Around line 227-232: The install script copies the commands directory verbatim
into the workflows destination, leaving Claude-specific paths and docs (e.g.,
references in commands/pm2.md and commands/tdd.md to “.claude/…” and
“CLAUDE.md”), which makes installed workflows incorrect; update the copy step in
install.sh (the block using SCRIPT_DIR, DEST_DIR and the commands folder) to
perform a content rewrite instead of a raw cp: when copying files from
"$SCRIPT_DIR/commands" into "$DEST_DIR/workflows" scan each file and replace or
remove Claude-specific references (strings like ".claude/" and "CLAUDE.md") with
neutral equivalents (or local workflow docs), so the installed files in
DEST_DIR/workflows no longer point to Claude assets while preserving other
content and file permissions.
---
Outside diff comments:
In `@install.sh`:
- Around line 39-43: Update the missing-value error text in the install.sh
--target check: in the if block that tests if [[ "${1:-}" == "--target" ]] (and
specifically the echo call that currently says "Error: --target requires a value
(claude or cursor)"), change the message to include the antigravity target
(e.g., "Error: --target requires a value (claude, cursor, or antigravity)") so
the supported targets list is accurate.
---
Nitpick comments:
In `@install.sh`:
- Around line 234-243: Currently the script blindly copies
"$SCRIPT_DIR/agents/." and "$SCRIPT_DIR/skills/." into "$DEST_DIR/skills/" which
can silently overwrite files with identical relative paths; before running the
two cp -r commands, compute the set of relative paths under "$SCRIPT_DIR/agents"
and "$SCRIPT_DIR/skills", detect intersections, and if any collisions exist emit
a clear warning (listing the colliding relative paths) and fail or prompt for
confirmation; update the block that references "$SCRIPT_DIR/agents",
"$SCRIPT_DIR/skills", and "$DEST_DIR/skills" to perform this pre-copy collision
check and only proceed with the copies after handling the warning.
| # --- Workflows (Commands) --- | ||
| if [[ -d "$SCRIPT_DIR/commands" ]]; then | ||
| echo "Installing commands -> $DEST_DIR/workflows/" | ||
| mkdir -p "$DEST_DIR/workflows" | ||
| cp -r "$SCRIPT_DIR/commands/." "$DEST_DIR/workflows/" | ||
| fi |
There was a problem hiding this comment.
Antigravity workflows are copied with Claude-specific paths/instructions.
This block copies commands/ verbatim into .agent/workflows/, but command content includes Claude-only references (e.g., commands/pm2.md:200-240, commands/tdd.md:318-335 pointing to .claude/... and CLAUDE.md). That makes installed Antigravity workflows semantically wrong.
Possible direction (rewrite during copy)
if [[ -d "$SCRIPT_DIR/commands" ]]; then
echo "Installing commands -> $DEST_DIR/workflows/"
mkdir -p "$DEST_DIR/workflows"
- cp -r "$SCRIPT_DIR/commands/." "$DEST_DIR/workflows/"
+ while IFS= read -r -d '' wf; do
+ out="$DEST_DIR/workflows/$(basename "$wf")"
+ sed \
+ -e 's#\.claude/#.agent/#g' \
+ -e 's#CLAUDE\.md#AGENT.md#g' \
+ "$wf" > "$out"
+ done < <(find "$SCRIPT_DIR/commands" -type f -name '*.md' -print0)
fi📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| # --- Workflows (Commands) --- | |
| if [[ -d "$SCRIPT_DIR/commands" ]]; then | |
| echo "Installing commands -> $DEST_DIR/workflows/" | |
| mkdir -p "$DEST_DIR/workflows" | |
| cp -r "$SCRIPT_DIR/commands/." "$DEST_DIR/workflows/" | |
| fi | |
| # --- Workflows (Commands) --- | |
| if [[ -d "$SCRIPT_DIR/commands" ]]; then | |
| echo "Installing commands -> $DEST_DIR/workflows/" | |
| mkdir -p "$DEST_DIR/workflows" | |
| while IFS= read -r -d '' wf; do | |
| out="$DEST_DIR/workflows/$(basename "$wf")" | |
| sed \ | |
| -e 's#\.claude/#.agent/#g' \ | |
| -e 's#CLAUDE\.md#AGENT.md#g' \ | |
| "$wf" > "$out" | |
| done < <(find "$SCRIPT_DIR/commands" -type f -name '*.md' -print0) | |
| fi |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@install.sh` around lines 227 - 232, The install script copies the commands
directory verbatim into the workflows destination, leaving Claude-specific paths
and docs (e.g., references in commands/pm2.md and commands/tdd.md to “.claude/…”
and “CLAUDE.md”), which makes installed workflows incorrect; update the copy
step in install.sh (the block using SCRIPT_DIR, DEST_DIR and the commands
folder) to perform a content rewrite instead of a raw cp: when copying files
from "$SCRIPT_DIR/commands" into "$DEST_DIR/workflows" scan each file and
replace or remove Claude-specific references (strings like ".claude/" and
"CLAUDE.md") with neutral equivalents (or local workflow docs), so the installed
files in DEST_DIR/workflows no longer point to Claude assets while preserving
other content and file permissions.
affaan-m
left a comment
There was a problem hiding this comment.
Automated review: this PR has merge conflicts. Please rebase or resolve.
affaan-m
left a comment
There was a problem hiding this comment.
Automated review: this PR has merge conflicts. Please rebase or resolve.
affaan-m
left a comment
There was a problem hiding this comment.
Automated review: this PR has merge conflicts. Please rebase or resolve.
affaan-m
left a comment
There was a problem hiding this comment.
Automated review: this PR has merge conflicts. Please rebase or resolve.
affaan-m
left a comment
There was a problem hiding this comment.
Automated review: this PR has merge conflicts. Please rebase or resolve.
|
Hey @dawngnd! This PR has a merge conflict with main. Could you please rebase when you get a chance? Thanks! |
affaan-m
left a comment
There was a problem hiding this comment.
Automated review: this PR has merge conflicts. Please rebase or resolve.
affaan-m
left a comment
There was a problem hiding this comment.
Automated review: this PR has merge conflicts. Please rebase or resolve.
affaan-m
left a comment
There was a problem hiding this comment.
Automated review: this PR has merge conflicts. Please rebase or resolve.
This Pull Request introduces
--target antigravitysupport within the installation script to bridge Everything Claude Code configurations smoothly onto the Antigravity IDE ecosystem.Key Changes
install.shto parse and act on the new--target antigravityCLI arg.common-*.mdand{lang}-*.mdstructures within.agent/rules/..agent/workflows/, andagents/alongsideskills/components are merged into.agent/skills/.README.mdto properly document the flag addition.Description
Type of Change
fix:Bug fixfeat:New featurerefactor:Code refactoringdocs:Documentationtest:Testschore:Maintenance/toolingci:CI/CD changesChecklist
node tests/run-all.js)Summary by cubic
Adds Antigravity IDE support via the new --target antigravity flag. Installs ECC configs into .agent with flattened rule filenames and consolidates workflows/skills for Antigravity.
New Features
Migration
Written for commit 85c5c29. Summary will update on new commits.
Summary by CodeRabbit
New Features
Documentation