Skip to content

Commit 75374c9

Browse files
author
aryanpanwar10005
committed
feat: add Google Antigravity IDE support with global install
- Add Antigravity to IDE configurations in bin/install.js - Global install path: ~/.gemini/GEMINI.md (works across all projects) - Cross-platform home directory expansion (os.homedir()) - Add --antigravity flag support - Update package.json keywords - Maintain backward compatibility with all existing IDEs
1 parent 5243c0a commit 75374c9

4 files changed

Lines changed: 52 additions & 6 deletions

File tree

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ jobs:
2626
echo "Error: package.json version ($PKG_VERSION) does not match release tag ($TAG_VERSION)"
2727
exit 1
2828
fi
29-
- run: npm publish
29+
- run: npm publish --provenance
3030
env:
3131
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/validate.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,12 @@ jobs:
120120
console.log('✅ Versions match:', pkg.version);
121121
"
122122
123+
- name: Validate Antigravity install
124+
run: |
125+
mkdir -p ~/.gemini
126+
cp skill/SEO_GEO_SKILL.md ~/.gemini/GEMINI.md
127+
test -f ~/.gemini/GEMINI.md && echo "✓ Antigravity install works"
128+
123129
- name: All checks passed
124130
run: |
125131
echo ""

bin/install.js

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
const fs = require('fs');
1919
const path = require('path');
20+
const os = require('os');
2021
const https = require('https');
2122

2223
const REPO_RAW = 'https://raw.githubusercontent.com/Aryanpanwar10005/seo-geo-optimizer/main/skill/SEO_GEO_SKILL.md';
@@ -59,6 +60,13 @@ const IDE_TARGETS = {
5960
fallback: null,
6061
note: 'Appended to your Bolt project prompt file.'
6162
},
63+
antigravity: {
64+
name: 'antigravity',
65+
detection: ['.gemini'],
66+
primary: path.join(os.homedir(), '.gemini', 'GEMINI.md'),
67+
fallback: null,
68+
note: 'Global installation - available in all projects'
69+
},
6270
generic: {
6371
name: 'Generic / Any AI IDE',
6472
detection: [],
@@ -113,9 +121,16 @@ ${c.bold}OPTIONS${c.reset}
113121
${c.cyan}--copilot${c.reset} Install for GitHub Copilot (VS Code)
114122
${c.cyan}--lovable${c.reset} Install for Lovable
115123
${c.cyan}--bolt${c.reset} Install for Bolt
124+
${c.cyan}--antigravity${c.reset} Install for Google Antigravity (Global)
116125
${c.cyan}--all${c.reset} Install for all supported IDEs at once
117126
${c.cyan}--help${c.reset} Show this help
118127
128+
${c.bold}EXAMPLES${c.reset}
129+
npx seo-geo-optimizer # Auto-detect and install
130+
npx seo-geo-optimizer --cursor # Install for Cursor only
131+
npx seo-geo-optimizer --antigravity # Install globally for Antigravity
132+
npx seo-geo-optimizer --all # Install for all IDEs
133+
119134
${c.bold}MANUAL INSTALL${c.reset}
120135
Copy the raw skill file from:
121136
${c.gray}https://raw.githubusercontent.com/Aryanpanwar10005/seo-geo-optimizer/main/skill/SEO_GEO_SKILL.md${c.reset}
@@ -166,7 +181,17 @@ function downloadSkill(url) {
166181

167182
function installToTarget(ideKey, skillContent, cwd) {
168183
const ide = IDE_TARGETS[ideKey];
169-
const targetPath = path.join(cwd, ide.primary);
184+
let targetPath = ide.primary;
185+
186+
if (targetPath.includes(os.homedir())) {
187+
// Path already contains homedir (from path.join)
188+
targetPath = ide.primary;
189+
} else if (targetPath.startsWith('~')) {
190+
targetPath = path.join(os.homedir(), targetPath.slice(1));
191+
} else if (!path.isAbsolute(targetPath)) {
192+
targetPath = path.join(cwd, targetPath);
193+
}
194+
170195
const targetDir = path.dirname(targetPath);
171196
if (!fs.existsSync(targetDir)) {
172197
fs.mkdirSync(targetDir, { recursive: true });
@@ -178,8 +203,14 @@ function installToTarget(ideKey, skillContent, cwd) {
178203
log.warn(`Existing file backed up → ${c.gray}${path.relative(cwd, backup)}${c.reset}`);
179204
}
180205
fs.writeFileSync(targetPath, skillContent, 'utf8');
181-
log.success(`${c.bold}${ide.name}${c.reset}${c.green}${path.relative(cwd, targetPath)}${c.reset}`);
182-
log.info(`${c.gray}${ide.note}${c.reset}`);
206+
log.success(`${c.bold}${ide.name}${c.reset}${c.green}${path.isAbsolute(targetPath) ? targetPath : path.relative(cwd, targetPath)}${c.reset}`);
207+
208+
if (ideKey === 'antigravity') {
209+
log.info(`${c.yellow}ℹ Global installation - available in all projects${c.reset}`);
210+
} else {
211+
log.info(`${c.gray}${ide.note}${c.reset}`);
212+
}
213+
183214
return targetPath;
184215
}
185216

@@ -198,7 +229,7 @@ async function main() {
198229
let targets = [];
199230

200231
if (args.includes('--all')) {
201-
targets = ['cursor', 'windsurf', 'copilot', 'lovable', 'bolt'];
232+
targets = ['cursor', 'windsurf', 'copilot', 'lovable', 'bolt', 'antigravity'];
202233
log.title('Installing for ALL supported IDEs');
203234
} else if (args.includes('--cursor')) {
204235
targets = ['cursor'];
@@ -215,6 +246,9 @@ async function main() {
215246
} else if (args.includes('--bolt')) {
216247
targets = ['bolt'];
217248
log.title('Installing for Bolt');
249+
} else if (args.includes('--antigravity')) {
250+
targets = ['antigravity'];
251+
log.title('Installing for Google Antigravity');
218252
} else {
219253
log.title('Auto-detecting your IDE...');
220254
targets = detectIDE(cwd);
@@ -252,11 +286,13 @@ async function main() {
252286
for (const ideKey of targets) {
253287
try {
254288
const filePath = installToTarget(ideKey, skillContent, cwd);
255-
installed.push({ ide: IDE_TARGETS[ideKey].name, path: path.relative(cwd, filePath) });
289+
const displayPath = path.isAbsolute(IDE_TARGETS[ideKey].primary) ? filePath : path.relative(cwd, filePath);
290+
installed.push({ ide: IDE_TARGETS[ideKey].name, path: displayPath });
256291
log.blank();
257292
} catch (err) {
258293
log.error(`Failed to install for ${IDE_TARGETS[ideKey].name}: ${err.message}`);
259294
failed.push(IDE_TARGETS[ideKey].name);
295+
if (ideKey === 'antigravity') process.exit(1);
260296
}
261297
}
262298

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
"lovable",
2020
"bolt",
2121
"replit",
22+
"antigravity",
23+
"google-ide",
24+
"skill",
25+
"ai-optimizer",
2226
"ai-rules",
2327
"cursor-rules",
2428
"windsurfrules",

0 commit comments

Comments
 (0)