antigravity-flow 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# 🚀 Antigravity Workflow CLI
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/antigravity-flow)
|
|
4
|
+
|
|
3
5
|
**Enforce strict, agentic workflows in your development projects.**
|
|
4
6
|
|
|
5
7
|
Antigravity Flow (`ag-flow`) is a CLI tool originally built to prepare projects for **Google Antigravity**. It has since evolved into a **universal context generator** that standardizes development workflows for all AI-native IDEs, including **Cursor**, **Windsurf**, **Gemini Code Assist**, and **GitHub Copilot**.
|
|
@@ -28,6 +30,7 @@ It generates context-aware rules, workflows, and CI/CD pipelines tailored to you
|
|
|
28
30
|
- **CI/CD**: GitHub Actions pipelines.
|
|
29
31
|
- **Dockerfile**: Production-ready, multi-stage builds.
|
|
30
32
|
- **.gitignore**: Optimized rules for your stack.
|
|
33
|
+
- **Customizable**: Use `ag-flow templates` to eject and modify any internal template.
|
|
31
34
|
- **💡 Intelligent Discovery**: Auto-detects your tech stack to pre-fill prompts.
|
|
32
35
|
- **💾 Configuration Persistence**: Saves your choices to `.agent/antigravity.json`.
|
|
33
36
|
- **📦 Monorepo Support**: Turborepo, Nx, Lerna, pnpm/yarn workspaces.
|
|
@@ -40,6 +43,14 @@ npm install -g antigravity-flow
|
|
|
40
43
|
npx antigravity-flow init
|
|
41
44
|
```
|
|
42
45
|
|
|
46
|
+
````
|
|
47
|
+
|
|
48
|
+
## 🔄 Updating
|
|
49
|
+
To update to the latest version:
|
|
50
|
+
```bash
|
|
51
|
+
npm update -g antigravity-flow
|
|
52
|
+
````
|
|
53
|
+
|
|
43
54
|
## 🚀 Usage
|
|
44
55
|
|
|
45
56
|
Navigate to your project root and run:
|
|
@@ -60,6 +71,20 @@ ag-flow guide
|
|
|
60
71
|
ag-flow guide fr
|
|
61
72
|
```
|
|
62
73
|
|
|
74
|
+
### Template Customization (NEW)
|
|
75
|
+
|
|
76
|
+
You can view and customize any internal template (prompts, rules, Dockerfiles):
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
# List all available templates
|
|
80
|
+
ag-flow templates list
|
|
81
|
+
|
|
82
|
+
# Eject and edit a template (opens system editor)
|
|
83
|
+
ag-flow templates update docker/django.Dockerfile.ejs
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
The CLI will automatically prioritize your local templates in `.agent/templates/`.
|
|
87
|
+
|
|
63
88
|
### Interactive Prompts
|
|
64
89
|
|
|
65
90
|
The CLI will guide you through:
|
|
@@ -367,6 +367,7 @@ class InitCommand {
|
|
|
367
367
|
choices: [
|
|
368
368
|
{ name: 'Cursor (.cursor/rules)', value: types_1.IdeIntegration.CURSOR },
|
|
369
369
|
{ name: 'Windsurf (.windsurfrules)', value: types_1.IdeIntegration.WINDSURF },
|
|
370
|
+
{ name: 'Google Antigravity (Native .agent integration)', value: types_1.IdeIntegration.ANTIGRAVITY },
|
|
370
371
|
{ name: 'Gemini Code Assist (.gemini)', value: types_1.IdeIntegration.GEMINI },
|
|
371
372
|
{ name: 'GitHub Copilot', value: types_1.IdeIntegration.COPILOT },
|
|
372
373
|
],
|
|
@@ -437,8 +438,34 @@ class InitCommand {
|
|
|
437
438
|
if (ideIntegrations.includes(types_1.IdeIntegration.GEMINI)) {
|
|
438
439
|
await this.integrateGemini(projectDetails, rulesContent);
|
|
439
440
|
}
|
|
441
|
+
if (ideIntegrations.includes(types_1.IdeIntegration.ANTIGRAVITY)) {
|
|
442
|
+
await this.integrateAntigravity(projectDetails, rulesContent);
|
|
443
|
+
}
|
|
440
444
|
// Future: Copilot, Cody integrations
|
|
441
445
|
}
|
|
446
|
+
async integrateAntigravity(projectDetails, rulesContent) {
|
|
447
|
+
// Google Antigravity uses the standard .agent structure
|
|
448
|
+
// .agent/rules/coding-standards.md
|
|
449
|
+
// .agent/workflows/*.md
|
|
450
|
+
const agentRulesPath = path.join(projectDetails.rootPath, '.agent/rules/coding-standards.md');
|
|
451
|
+
const workflowsDir = path.join(projectDetails.rootPath, '.agent/workflows');
|
|
452
|
+
let statusMsg = 'Integrated with Google Antigravity:';
|
|
453
|
+
if (await this.fileSystem.exists(agentRulesPath)) {
|
|
454
|
+
statusMsg += '\n ✅ Rules linked (.agent/rules)';
|
|
455
|
+
}
|
|
456
|
+
else {
|
|
457
|
+
await this.fileSystem.createDirectory(path.dirname(agentRulesPath));
|
|
458
|
+
await this.fileSystem.writeFile(agentRulesPath, rulesContent);
|
|
459
|
+
statusMsg += '\n ✅ Rules created (.agent/rules)';
|
|
460
|
+
}
|
|
461
|
+
if (await this.fileSystem.exists(workflowsDir)) {
|
|
462
|
+
statusMsg += '\n ✅ Workflows linked (.agent/workflows)';
|
|
463
|
+
}
|
|
464
|
+
else {
|
|
465
|
+
statusMsg += '\n ⚠️ Workflows directory not found (should be generated by init)';
|
|
466
|
+
}
|
|
467
|
+
this.logger.success(statusMsg);
|
|
468
|
+
}
|
|
442
469
|
async integrateCursor(projectDetails, rulesContent, roles) {
|
|
443
470
|
// 1. Base Rules
|
|
444
471
|
const cursorPath = path.join(projectDetails.rootPath, '.cursor/rules/antigravity.mdc');
|
|
@@ -115,9 +115,20 @@ class TemplatesCommand {
|
|
|
115
115
|
const newContent = answer.content;
|
|
116
116
|
// 3. Save to custom location
|
|
117
117
|
if (newContent && newContent.trim() !== '') {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
118
|
+
try {
|
|
119
|
+
await fs.ensureDir(path.dirname(customPath));
|
|
120
|
+
await fs.writeFile(customPath, newContent);
|
|
121
|
+
this.logger.success(`Template saved to: ${customPath}`);
|
|
122
|
+
}
|
|
123
|
+
catch (error) {
|
|
124
|
+
if (error.code === 'EACCES' || error.code === 'EPERM') {
|
|
125
|
+
this.logger.error(`❌ Permission denied. Cannot write to: ${customPath}`);
|
|
126
|
+
this.logger.error('Please check your file permissions or run with elevated privileges.');
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
this.logger.error(`Failed to save template: ${error.message}`);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
121
132
|
}
|
|
122
133
|
else {
|
|
123
134
|
this.logger.warn('Empty content. Update cancelled.');
|
package/dist/src/core/types.js
CHANGED
|
@@ -295,6 +295,7 @@ var IdeIntegration;
|
|
|
295
295
|
IdeIntegration["CURSOR"] = "cursor";
|
|
296
296
|
IdeIntegration["WINDSURF"] = "windsurf";
|
|
297
297
|
IdeIntegration["GEMINI"] = "gemini";
|
|
298
|
+
IdeIntegration["ANTIGRAVITY"] = "antigravity";
|
|
298
299
|
IdeIntegration["COPILOT"] = "copilot";
|
|
299
300
|
IdeIntegration["CODY"] = "cody";
|
|
300
301
|
})(IdeIntegration || (exports.IdeIntegration = IdeIntegration = {}));
|
|
@@ -24,6 +24,10 @@ Commands:
|
|
|
24
24
|
Options:
|
|
25
25
|
--config <path> Run initialization from a configuration file (skip prompts)
|
|
26
26
|
|
|
27
|
+
templates Manage and customize templates.
|
|
28
|
+
- list : Show all available templates.
|
|
29
|
+
- update : Eject and edit a template (local override).
|
|
30
|
+
|
|
27
31
|
guide Show this help message.
|
|
28
32
|
|
|
29
33
|
Workflows Generated:
|
|
@@ -45,4 +49,4 @@ Configuration:
|
|
|
45
49
|
You can edit this file to manually adjust your project context.
|
|
46
50
|
|
|
47
51
|
Need more help?
|
|
48
|
-
Visit: https://github.com/antigravity
|
|
52
|
+
Visit: https://github.com/yetininoliviercoulibaly/antigravity-flow
|
|
@@ -23,6 +23,10 @@ Commandes :
|
|
|
23
23
|
Options :
|
|
24
24
|
--config <path> Lance l'initialisation depuis un fichier de config (sans prompt)
|
|
25
25
|
|
|
26
|
+
templates Gérer et personnaliser les templates.
|
|
27
|
+
- list : Affiche tous les templates disponibles.
|
|
28
|
+
- update : Éjecte et édite un template (surcharge locale).
|
|
29
|
+
|
|
26
30
|
guide Affiche ce message d'aide.
|
|
27
31
|
|
|
28
32
|
Workflows Générés :
|
|
@@ -44,4 +48,4 @@ Configuration :
|
|
|
44
48
|
Vous pouvez éditer ce fichier pour ajuster manuellement le contexte.
|
|
45
49
|
|
|
46
50
|
Besoin d'aide ?
|
|
47
|
-
Visitez : https://github.com/antigravity
|
|
51
|
+
Visitez : https://github.com/yetininoliviercoulibaly/antigravity-flow
|