multi-agents-cli 1.0.4 → 1.0.6

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 +83 -12
  2. package/package.json +1 -1
package/init.js CHANGED
@@ -80,6 +80,24 @@ if (!fs.existsSync(RUNTIME_DIR)) {
80
80
 
81
81
  // ── Decision tree ─────────────────────────────────────────────────────────────
82
82
 
83
+ const FRAMEWORK_CONVENTIONS = {
84
+ client: {
85
+ 'Next.js': { root: 'client', typesDir: 'client/src/types', importAlias: '@/types' },
86
+ 'Angular': { root: 'client', typesDir: 'client/src/app/core/types', importAlias: null },
87
+ 'Nuxt': { root: 'client', typesDir: 'client/types', importAlias: '~/types' },
88
+ 'SvelteKit': { root: 'client', typesDir: 'client/src/lib/types', importAlias: '$lib/types' },
89
+ 'Vite+React': { root: 'client', typesDir: 'client/src/types', importAlias: null },
90
+ 'Remix': { root: 'client', typesDir: 'client/app/types', importAlias: null },
91
+ },
92
+ backend: {
93
+ 'Express': { root: 'backend', typesDir: 'backend/src/types', routesDir: 'backend/src/routes' },
94
+ 'NestJS': { root: 'backend', dtoDir: 'backend/src/dto', entitiesDir:'backend/src/entities' },
95
+ 'Fastify': { root: 'backend', typesDir: 'backend/src/types', routesDir: 'backend/src/routes' },
96
+ 'FastAPI': { root: 'backend', schemasDir: 'backend/app/schemas', modelsDir: 'backend/app/models' },
97
+ 'Django': { root: 'backend', schemasDir: 'backend/api/serializers', modelsDir: 'backend/api/models' },
98
+ },
99
+ };
100
+
83
101
  const CLIENT_FRAMEWORKS = [
84
102
  { label: 'Next.js', value: 'Next.js', language: 'TypeScript', integratedBackend: true },
85
103
  { label: 'Angular', value: 'Angular', language: 'TypeScript', integratedBackend: false },
@@ -94,6 +112,7 @@ const BACKEND_FRAMEWORKS = [
94
112
  { label: 'Express', value: 'Express', language: 'TypeScript' },
95
113
  { label: 'Fastify', value: 'Fastify', language: 'TypeScript' },
96
114
  { label: 'Django', value: 'Django', language: 'Python' },
115
+ { label: 'FastAPI', value: 'FastAPI', language: 'Python' },
97
116
  { label: 'Laravel', value: 'Laravel', language: 'PHP' },
98
117
  { label: 'Rails', value: 'Rails', language: 'Ruby' },
99
118
  ];
@@ -129,6 +148,7 @@ const ORM_OPTIONS = {
129
148
  'Express': ['Prisma', 'TypeORM', 'Drizzle', 'Sequelize'],
130
149
  'Fastify': ['Prisma', 'TypeORM', 'Drizzle'],
131
150
  'Django': ['Django ORM (built-in)', 'SQLAlchemy'],
151
+ 'FastAPI': ['SQLAlchemy', 'Tortoise ORM', 'Beanie (MongoDB)'],
132
152
  'Laravel': ['Eloquent (built-in)'],
133
153
  'Rails': ['Active Record (built-in)'],
134
154
  };
@@ -138,6 +158,7 @@ const AUTH_OPTIONS = {
138
158
  'Express': ['Passport.js', 'JWT-only', 'OAuth2'],
139
159
  'Fastify': ['fastify-jwt', 'Passport.js', 'OAuth2'],
140
160
  'Django': ['Django Auth (built-in)', 'DRF TokenAuth', 'OAuth2'],
161
+ 'FastAPI': ['JWT-only', 'OAuth2', 'FastAPI-Users'],
141
162
  'Laravel': ['Laravel Sanctum', 'Laravel Passport', 'JWT'],
142
163
  'Rails': ['Devise', 'JWT', 'OAuth2'],
143
164
  };
@@ -160,18 +181,31 @@ const IDE_CANDIDATES = [
160
181
  {
161
182
  cmd: 'webstorm',
162
183
  name: 'WebStorm',
163
- note: 'requires CLI launcher via Toolbox',
164
- mac: { app: 'WebStorm', args: [] },
165
- win: { paths: [], args: [] },
166
- linux: { paths: ['/opt/webstorm/bin/webstorm.sh'], args: [] },
184
+ mac: { app: 'WebStorm', toolboxApp: 'WebStorm', args: [] },
185
+ win: { paths: [
186
+ '{LOCALAPPDATA}\\JetBrains\\Toolbox\\scripts\\webstorm.cmd',
187
+ '{LOCALAPPDATA}\\Programs\\WebStorm\\bin\\webstorm64.exe',
188
+ ], args: [] },
189
+ linux: { paths: [
190
+ `${os.homedir()}/.local/bin/webstorm`,
191
+ '/opt/webstorm/bin/webstorm.sh',
192
+ '/snap/webstorm/current/bin/webstorm.sh',
193
+ ], args: [] },
167
194
  },
168
195
  {
169
196
  cmd: 'idea',
170
197
  name: 'IntelliJ IDEA',
171
- note: 'requires CLI launcher via Toolbox',
172
- mac: { app: 'IntelliJ IDEA', args: [] },
173
- win: { paths: [], args: [] },
174
- linux: { paths: ['/opt/idea/bin/idea.sh'], args: [] },
198
+ mac: { app: 'IntelliJ IDEA', toolboxApp: 'IntelliJ IDEA', args: [] },
199
+ win: { paths: [
200
+ '{LOCALAPPDATA}\\JetBrains\\Toolbox\\scripts\\idea.cmd',
201
+ '{LOCALAPPDATA}\\Programs\\IntelliJ IDEA Community Edition\\bin\\idea64.exe',
202
+ '{ProgramFiles}\\JetBrains\\IntelliJ IDEA\\bin\\idea64.exe',
203
+ ], args: [] },
204
+ linux: { paths: [
205
+ `${os.homedir()}/.local/bin/idea`,
206
+ '/opt/idea/bin/idea.sh',
207
+ '/snap/intellij-idea-community/current/bin/idea.sh',
208
+ ], args: [] },
175
209
  },
176
210
  {
177
211
  cmd: 'zed',
@@ -208,10 +242,11 @@ const buildIDEOptions = () => {
208
242
  let strategy = 'cli';
209
243
 
210
244
  if (platform === 'darwin' && ide.mac) {
211
- // Mac — check .app bundle in /Applications or ~/Applications
212
- const system = `/Applications/${ide.mac.app}.app`;
213
- const user = path.join(os.homedir(), 'Applications', `${ide.mac.app}.app`);
214
- detected = fs.existsSync(system) || fs.existsSync(user);
245
+ // Mac — check .app bundle in /Applications, ~/Applications, and JetBrains Toolbox
246
+ const system = `/Applications/${ide.mac.app}.app`;
247
+ const user = path.join(os.homedir(), 'Applications', `${ide.mac.app}.app`);
248
+ const toolbox = path.join(os.homedir(), 'Applications', 'JetBrains Toolbox', `${ide.mac.app}.app`);
249
+ detected = fs.existsSync(system) || fs.existsSync(user) || fs.existsSync(toolbox);
215
250
  if (detected) strategy = 'mac-app';
216
251
 
217
252
  } else if (platform === 'win32' && ide.win) {
@@ -913,6 +948,9 @@ If a dependency is not met:
913
948
  name: projectName.toLowerCase().replace(/\s+/g, '-'),
914
949
  version: '1.0.0',
915
950
  private: true,
951
+ dependencies: {
952
+ prompts: '^2.4.2',
953
+ },
916
954
  scripts: {
917
955
  launch: 'cd "$(git rev-parse --git-common-dir)/.." && node .workflow/launch.js',
918
956
  complete: 'cd "$(git rev-parse --git-common-dir)/.." && node .workflow/complete.js',
@@ -921,6 +959,16 @@ If a dependency is not met:
921
959
  fs.writeFileSync(path.join(ROOT, 'package.json'), JSON.stringify(userPackage, null, 2), 'utf8');
922
960
  console.log(` ${green('✓')} package.json generated`);
923
961
 
962
+ // ── Install dependencies ──────────────────────────────────────────────────────
963
+
964
+ try {
965
+ console.log(dim(' Installing dependencies...'));
966
+ execSync('npm install', { cwd: ROOT, stdio: 'pipe' });
967
+ console.log(` ${green('✓')} Dependencies installed`);
968
+ } catch {
969
+ console.log(yellow(' ⚠ npm install failed — run npm install manually before launching'));
970
+ }
971
+
924
972
  // ── Tracking ──────────────────────────────────────────────────────────────────
925
973
 
926
974
  const trackingPath = path.join(RUNTIME_DIR, '.tracking.json');
@@ -932,6 +980,29 @@ If a dependency is not met:
932
980
  console.log(dim(' ℹ .tracking.json already exists — preserved'));
933
981
  }
934
982
 
983
+ // ── Generate .paths.json ──────────────────────────────────────────────────────
984
+
985
+ const pathsMap = {};
986
+ const clientConventions = FRAMEWORK_CONVENTIONS.client[clientFw?.value] || {};
987
+ const backendConventions = FRAMEWORK_CONVENTIONS.backend[backendFwObj?.value] || {};
988
+
989
+ if (Object.keys(clientConventions).length) {
990
+ pathsMap.client = {};
991
+ Object.entries(clientConventions).forEach(([key, value]) => {
992
+ pathsMap.client[key] = { expected: value, current: null, status: 'pending' };
993
+ });
994
+ }
995
+
996
+ if (Object.keys(backendConventions).length) {
997
+ pathsMap.backend = {};
998
+ Object.entries(backendConventions).forEach(([key, value]) => {
999
+ pathsMap.backend[key] = { expected: value, current: null, status: 'pending' };
1000
+ });
1001
+ }
1002
+
1003
+ fs.writeFileSync(path.join(RUNTIME_DIR, '.paths.json'), JSON.stringify(pathsMap, null, 2), 'utf8');
1004
+ console.log(` ${green('✓')} .paths.json generated`);
1005
+
935
1006
  // ── Lock ─────────────────────────────────────────────────────────────────────
936
1007
 
937
1008
  fs.writeFileSync(LOCK_FILE, new Date().toISOString());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "multi-agents-cli",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
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",