mindforge-cc 1.0.2 → 1.0.4

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/CHANGELOG.md CHANGED
@@ -3,6 +3,16 @@
3
3
  All notable changes to MindForge are documented here.
4
4
  Format follows [Keep a Changelog](https://keepachangelog.com).
5
5
 
6
+ ## [1.0.4] — v1.0.4 Antigravity Install Fix — 2026-03-22
7
+
8
+ ### Fixed
9
+ - Antigravity local install now correctly copies commands and CLAUDE.md into `agents/`.
10
+
11
+ ## [1.0.3] — v1.0.3 Antigravity Agents Folder — 2026-03-22
12
+
13
+ ### Changed
14
+ - Local Antigravity installs now target `agents/` by default (legacy `.agent/` detected and supported).
15
+
6
16
  ## [1.0.2] — v1.0.2 CLI Bin Fix — 2026-03-22
7
17
 
8
18
  ### Fixed
package/README.md CHANGED
@@ -40,6 +40,13 @@ npx mindforge-cc@latest --claude --local
40
40
  npx mindforge-cc@latest --antigravity --global
41
41
  ```
42
42
 
43
+ Local installs use `agents/` by default. Legacy `.agent/` is supported for existing projects.
44
+
45
+ Optional: add bin utilities on local install
46
+ ```bash
47
+ npx mindforge-cc@latest --claude --local --with-utils
48
+ ```
49
+
43
50
  ### Both runtimes
44
51
  ```bash
45
52
  npx mindforge-cc@latest --all --global
package/bin/install.js CHANGED
@@ -15,7 +15,7 @@
15
15
  * Runtime flags: --claude | --antigravity | --all
16
16
  * Scope flags: --global (-g) | --local (-l)
17
17
  * Action flags: --install (default) | --update | --uninstall | --check
18
- * Control flags: --skip-wizard | --dry-run | --verbose | --force
18
+ * Control flags: --skip-wizard | --dry-run | --verbose | --force | --with-utils
19
19
  */
20
20
 
21
21
  'use strict';
@@ -53,7 +53,7 @@ const NON_INTERACTIVE_FLAGS = [
53
53
  '--claude', '--antigravity', '--all',
54
54
  '--global', '-g', '--local', '-l',
55
55
  '--uninstall', '--update', '--check',
56
- '--skip-wizard', '--dry-run',
56
+ '--skip-wizard', '--dry-run', '--with-utils',
57
57
  ];
58
58
 
59
59
  const IS_NON_INTERACTIVE =
@@ -85,7 +85,7 @@ function printHelp() {
85
85
 
86
86
  RUNTIMES (pick one or use --all)
87
87
  --claude Claude Code (~/.claude or .claude/)
88
- --antigravity Antigravity (~/.gemini/antigravity or .agent/)
88
+ --antigravity Antigravity (~/.gemini/antigravity or agents/; .agent/ legacy)
89
89
  --all Both runtimes
90
90
 
91
91
  SCOPE
@@ -102,6 +102,7 @@ function printHelp() {
102
102
  --dry-run Show what would happen without making changes
103
103
  --force Override existing installation without backup
104
104
  --skip-wizard Skip interactive wizard even in TTY
105
+ --with-utils Install local bin/ utilities (optional)
105
106
  --verbose Detailed output
106
107
  --version, -v Print version
107
108
  --help, -h Print this help
@@ -20,7 +20,7 @@ const RUNTIMES = {
20
20
  },
21
21
  antigravity: {
22
22
  globalDir: path.join(os.homedir(), '.gemini', 'antigravity'),
23
- localDir: '.agents',
23
+ localDir: 'agents',
24
24
  commandsSubdir: 'mindforge',
25
25
  entryFile: 'CLAUDE.md',
26
26
  },
@@ -79,6 +79,24 @@ const SENSITIVE_EXCLUDE = [
79
79
 
80
80
  const norm = p => path.normalize(p);
81
81
 
82
+ function resolveBaseDir(runtime, scope) {
83
+ const cfg = RUNTIMES[runtime];
84
+ if (scope === 'global') return norm(cfg.globalDir);
85
+
86
+ if (runtime === 'antigravity') {
87
+ const agentsDir = norm(path.join(process.cwd(), 'agents'));
88
+ const legacyAgentDir = norm(path.join(process.cwd(), '.agent'));
89
+ if (fsu.exists(agentsDir)) return agentsDir;
90
+ if (fsu.exists(legacyAgentDir)) {
91
+ console.log(` ℹ️ Detected legacy .agent/ — installing there for compatibility`);
92
+ return legacyAgentDir;
93
+ }
94
+ return agentsDir;
95
+ }
96
+
97
+ return norm(path.join(process.cwd(), cfg.localDir));
98
+ }
99
+
82
100
  // ── CLAUDE.md safe copy ───────────────────────────────────────────────────────
83
101
  function safeCopyClaude(src, dst, options = {}) {
84
102
  const { force = false, verbose = false } = options;
@@ -129,9 +147,9 @@ function verifyInstall(baseDir, cmdsDir, runtime, scope) {
129
147
 
130
148
  // ── Install single runtime ────────────────────────────────────────────────────
131
149
  async function install(runtime, scope, options = {}) {
132
- const { dryRun = false, force = false, verbose = false } = options;
150
+ const { dryRun = false, force = false, verbose = false, withUtils = false } = options;
133
151
  const cfg = RUNTIMES[runtime];
134
- const baseDir = norm(scope === 'global' ? cfg.globalDir : path.join(process.cwd(), cfg.localDir));
152
+ const baseDir = resolveBaseDir(runtime, scope);
135
153
  const cmdsDir = norm(path.join(baseDir, cfg.commandsSubdir));
136
154
  const selfInstall = isSelfInstall();
137
155
 
@@ -150,7 +168,7 @@ async function install(runtime, scope, options = {}) {
150
168
  // ── 1. Install CLAUDE.md ────────────────────────────────────────────────────
151
169
  const claudeSrc = runtime === 'claude'
152
170
  ? src('.claude', 'CLAUDE.md')
153
- : src('.agents', 'CLAUDE.md');
171
+ : src('.agent', 'CLAUDE.md');
154
172
 
155
173
  if (fsu.exists(claudeSrc)) {
156
174
  safeCopyClaude(claudeSrc, path.join(baseDir, 'CLAUDE.md'), { force, verbose });
@@ -160,7 +178,7 @@ async function install(runtime, scope, options = {}) {
160
178
  // ── 2. Install commands ─────────────────────────────────────────────────────
161
179
  const cmdSrc = runtime === 'claude'
162
180
  ? src('.claude', 'commands', 'mindforge')
163
- : src('.agents', 'mindforge');
181
+ : src('.agent', 'mindforge');
164
182
 
165
183
  if (fsu.exists(cmdSrc)) {
166
184
  fsu.ensureDir(cmdsDir);
@@ -199,13 +217,18 @@ async function install(runtime, scope, options = {}) {
199
217
  console.log(` ✅ MINDFORGE.md (project constitution)`);
200
218
  }
201
219
 
202
- // bin/ utilities (validate-config, wizard)
203
- const binDst = path.join(process.cwd(), 'bin');
204
- const binSrc = src('bin');
205
- if (fsu.exists(binSrc) && !fsu.exists(binDst)) {
206
- fsu.copyDir(binSrc, binDst, { excludePatterns: SENSITIVE_EXCLUDE });
207
- console.log(` ✅ bin/ (utilities)`);
220
+ // bin/ utilities (optional)
221
+ if (withUtils) {
222
+ const binDst = path.join(process.cwd(), 'bin');
223
+ const binSrc = src('bin');
224
+ if (fsu.exists(binSrc) && !fsu.exists(binDst)) {
225
+ fsu.copyDir(binSrc, binDst, { excludePatterns: SENSITIVE_EXCLUDE });
226
+ console.log(` ✅ bin/ (utilities)`);
227
+ } else if (fsu.exists(binDst)) {
228
+ console.log(` ⏭️ bin/ already exists — preserved`);
229
+ }
208
230
  }
231
+
209
232
  }
210
233
 
211
234
  // ── 4. Verify installation ──────────────────────────────────────────────────
@@ -217,7 +240,7 @@ async function install(runtime, scope, options = {}) {
217
240
  async function uninstall(runtime, scope, options = {}) {
218
241
  const { dryRun = false } = options;
219
242
  const cfg = RUNTIMES[runtime];
220
- const baseDir = norm(scope === 'global' ? cfg.globalDir : path.join(process.cwd(), cfg.localDir));
243
+ const baseDir = resolveBaseDir(runtime, scope);
221
244
  const cmdsDir = norm(path.join(baseDir, cfg.commandsSubdir));
222
245
  const claudeMd = norm(path.join(baseDir, 'CLAUDE.md'));
223
246
 
@@ -255,10 +278,11 @@ async function run(args) {
255
278
  const dryRun = args.includes('--dry-run');
256
279
  const force = args.includes('--force');
257
280
  const verbose = args.includes('--verbose');
281
+ const withUtils = args.includes('--with-utils');
258
282
  const isUninstall = args.includes('--uninstall');
259
283
  const isUpdate = args.includes('--update');
260
284
  const isCheck = args.includes('--check');
261
- const options = { dryRun, force, verbose };
285
+ const options = { dryRun, force, verbose, withUtils };
262
286
 
263
287
  console.log(`\n⚡ MindForge v${VERSION} — Enterprise Agentic Framework\n`);
264
288
 
@@ -26,7 +26,13 @@ async function detect() {
26
26
 
27
27
  const runtimes = [];
28
28
  if (fs.existsSync(path.join(home, '.claude')) || fs.existsSync(path.join(cwd, '.claude'))) runtimes.push('claude');
29
- if (fs.existsSync(path.join(home, '.gemini', 'antigravity')) || fs.existsSync(path.join(cwd, '.agent'))) runtimes.push('antigravity');
29
+ if (
30
+ fs.existsSync(path.join(home, '.gemini', 'antigravity')) ||
31
+ fs.existsSync(path.join(cwd, '.agent')) ||
32
+ fs.existsSync(path.join(cwd, 'agents'))
33
+ ) {
34
+ runtimes.push('antigravity');
35
+ }
30
36
 
31
37
  let projectType = 'unknown';
32
38
  const pkgPath = path.join(cwd, 'package.json');
@@ -48,6 +48,16 @@ function askChoice(rl, q, choices, defaultIdx = 0) {
48
48
  });
49
49
  }
50
50
 
51
+ function askYesNo(rl, q, defaultYes = false) {
52
+ const def = defaultYes ? 'y' : 'n';
53
+ return new Promise((resolve) => {
54
+ rl.question(`${q} [${def}]: `, (answer) => {
55
+ const val = (answer.trim() || def).toLowerCase();
56
+ resolve(val === 'y' || val === 'yes');
57
+ });
58
+ });
59
+ }
60
+
51
61
  function askMultiChoice(rl, q, choices) {
52
62
  console.log(`\n${q}`);
53
63
  choices.forEach((choice, i) => console.log(` ${i + 1}) ${choice}`));
@@ -149,11 +159,11 @@ async function configureFeatures(rl) {
149
159
  return { config, credGuidance };
150
160
  }
151
161
 
152
- async function install(runtimes, scope) {
162
+ async function install(runtimes, scope, options = {}) {
153
163
  const installer = require('../installer-core');
154
164
  if (!installer || typeof installer.install !== 'function') return;
155
165
  for (const runtime of runtimes) {
156
- await installer.install(runtime, scope);
166
+ await installer.install(runtime, scope, options);
157
167
  }
158
168
  }
159
169
 
@@ -222,9 +232,10 @@ async function main() {
222
232
  const runtimes = await selectRuntime(rl, env.runtimes);
223
233
  const scope = await selectScope(rl);
224
234
  const { config, credGuidance } = await configureFeatures(rl);
235
+ const withUtils = await askYesNo(rl, 'Install optional bin/ utilities?', false);
225
236
  rl.close();
226
237
 
227
- await install(runtimes, scope);
238
+ await install(runtimes, scope, { withUtils });
228
239
  await generator.writeIntegrationsConfig(config);
229
240
  printNextSteps(runtimes, scope, credGuidance);
230
241
  } catch (err) {
@@ -15,6 +15,11 @@ npx mindforge-cc@latest --claude --global
15
15
  npx mindforge-cc@latest --claude --local
16
16
  ```
17
17
 
18
+ Optional utilities:
19
+ ```bash
20
+ npx mindforge-cc@latest --claude --local --with-utils
21
+ ```
22
+
18
23
  ### Antigravity
19
24
  ```bash
20
25
  npx mindforge-cc@latest --antigravity --global
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mindforge-cc",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "MindForge - Enterprise Agentic Framework for Claude Code and Antigravity",
5
5
  "bin": {
6
6
  "mindforge-cc": "bin/install.js"