multi-agents-cli 1.0.26 → 1.0.27

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.
Files changed (2) hide show
  1. package/init.js +14 -16
  2. package/package.json +1 -1
package/init.js CHANGED
@@ -88,25 +88,23 @@ if (isGlobalCLI) {
88
88
  const targetDir = path.resolve(process.cwd(), projectArg);
89
89
 
90
90
  if (fs.existsSync(targetDir)) {
91
- console.log(`\n${red(` ✗ Directory "${projectArg}" already exists.`)}`);
92
- console.log(dim(' Choose a different project name.\n'));
93
- process.exit(1);
94
- }
95
-
96
- fs.mkdirSync(targetDir, { recursive: true });
97
- process.chdir(targetDir);
91
+ process.chdir(targetDir);
92
+ } else {
93
+ fs.mkdirSync(targetDir, { recursive: true });
94
+ process.chdir(targetDir);
98
95
 
99
- // Initialize git
100
- try {
101
- execSync('git init -b main', { cwd: targetDir, stdio: 'pipe' });
102
- execSync('git commit --allow-empty -m "init: project created"', { cwd: targetDir, stdio: 'pipe' });
103
- } catch {
104
- // Fallback for older git versions that don't support -b flag
96
+ // Initialize git
105
97
  try {
106
- execSync('git init', { cwd: targetDir, stdio: 'pipe' });
107
- execSync('git checkout -b main', { cwd: targetDir, stdio: 'pipe' });
98
+ execSync('git init -b main', { cwd: targetDir, stdio: 'pipe' });
108
99
  execSync('git commit --allow-empty -m "init: project created"', { cwd: targetDir, stdio: 'pipe' });
109
- } catch { /* continue */ }
100
+ } catch {
101
+ // Fallback for older git versions that don't support -b flag
102
+ try {
103
+ execSync('git init', { cwd: targetDir, stdio: 'pipe' });
104
+ execSync('git checkout -b main', { cwd: targetDir, stdio: 'pipe' });
105
+ execSync('git commit --allow-empty -m "init: project created"', { cwd: targetDir, stdio: 'pipe' });
106
+ } catch { /* continue */ }
107
+ }
110
108
  }
111
109
  }
112
110
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "multi-agents-cli",
3
- "version": "1.0.26",
3
+ "version": "1.0.27",
4
4
  "description": "Multi-agent workflow orchestration for Claude Code — isolated git worktrees, structured state tracking, autonomous task chaining",
5
5
  "keywords": [
6
6
  "claude-code",