claude-flow 1.0.18 → 1.0.20
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/package.json +1 -1
- package/src/cli/commands/help.ts +61 -0
- package/src/cli/simple-cli.js +47 -1
package/package.json
CHANGED
package/src/cli/commands/help.ts
CHANGED
|
@@ -177,6 +177,67 @@ const HELP_TOPICS: HelpTopic[] = [
|
|
|
177
177
|
],
|
|
178
178
|
related: ['agents', 'workflows', 'coordination']
|
|
179
179
|
},
|
|
180
|
+
{
|
|
181
|
+
name: 'claude',
|
|
182
|
+
description: 'Spawning Claude instances with specific configurations',
|
|
183
|
+
category: 'basic',
|
|
184
|
+
examples: [
|
|
185
|
+
{
|
|
186
|
+
description: 'Spawn Claude with web research capabilities',
|
|
187
|
+
command: 'claude-flow claude spawn "implement user authentication" --research --parallel',
|
|
188
|
+
explanation: 'Creates a Claude instance with WebFetchTool and BatchTool for parallel web research'
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
description: 'Spawn Claude without permission prompts',
|
|
192
|
+
command: 'claude-flow claude spawn "fix payment bug" --no-permissions',
|
|
193
|
+
explanation: 'Runs Claude with --dangerously-skip-permissions flag to avoid interruptions'
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
description: 'Spawn Claude with custom tools',
|
|
197
|
+
command: 'claude-flow claude spawn "analyze codebase" --tools "View,Edit,GrepTool,LS"',
|
|
198
|
+
explanation: 'Specifies exactly which tools Claude can use for the task'
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
description: 'Spawn Claude with test coverage target',
|
|
202
|
+
command: 'claude-flow claude spawn "write unit tests" --coverage 95 --commit feature',
|
|
203
|
+
explanation: 'Sets test coverage goal to 95% and commits after each feature'
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
description: 'Dry run to preview command',
|
|
207
|
+
command: 'claude-flow claude spawn "build API" --mode backend-only --dry-run',
|
|
208
|
+
explanation: 'Shows what would be executed without actually running Claude'
|
|
209
|
+
}
|
|
210
|
+
],
|
|
211
|
+
tutorial: [
|
|
212
|
+
'The claude spawn command launches Claude instances with specific configurations.',
|
|
213
|
+
'',
|
|
214
|
+
'Available Options:',
|
|
215
|
+
'• --tools, -t: Specify allowed tools (default: View,Edit,Replace,GlobTool,GrepTool,LS,Bash)',
|
|
216
|
+
'• --no-permissions: Skip permission prompts with --dangerously-skip-permissions',
|
|
217
|
+
'• --config, -c: Path to MCP configuration file',
|
|
218
|
+
'• --mode, -m: Development mode (full, backend-only, frontend-only, api-only)',
|
|
219
|
+
'• --parallel: Enable BatchTool and dispatch_agent for parallel execution',
|
|
220
|
+
'• --research: Enable WebFetchTool for web research capabilities',
|
|
221
|
+
'• --coverage: Test coverage target percentage (default: 80)',
|
|
222
|
+
'• --commit: Commit frequency (phase, feature, manual)',
|
|
223
|
+
'• --verbose, -v: Enable verbose output',
|
|
224
|
+
'• --dry-run, -d: Preview what would be executed',
|
|
225
|
+
'',
|
|
226
|
+
'Environment Variables Set:',
|
|
227
|
+
'• CLAUDE_INSTANCE_ID: Unique identifier for the Claude instance',
|
|
228
|
+
'• CLAUDE_FLOW_MODE: Development mode setting',
|
|
229
|
+
'• CLAUDE_FLOW_COVERAGE: Target test coverage percentage',
|
|
230
|
+
'• CLAUDE_FLOW_COMMIT: Commit frequency setting',
|
|
231
|
+
'',
|
|
232
|
+
'Common Use Cases:',
|
|
233
|
+
'• Full-stack development: --mode full --parallel',
|
|
234
|
+
'• API development: --mode backend-only --coverage 90',
|
|
235
|
+
'• Bug fixing: --no-permissions --verbose',
|
|
236
|
+
'• Research tasks: --research --parallel',
|
|
237
|
+
'• Test writing: --coverage 95 --commit feature'
|
|
238
|
+
],
|
|
239
|
+
related: ['agents', 'tasks', 'workflows']
|
|
240
|
+
},
|
|
180
241
|
{
|
|
181
242
|
name: 'workflows',
|
|
182
243
|
description: 'Building complex multi-step workflows',
|
package/src/cli/simple-cli.js
CHANGED
|
@@ -38,6 +38,8 @@ EXAMPLES:
|
|
|
38
38
|
claude-flow start # Start orchestrator
|
|
39
39
|
claude-flow agent spawn researcher --name "Bot" # Spawn research agent
|
|
40
40
|
claude-flow task create research "Analyze data" # Create task
|
|
41
|
+
claude-flow claude spawn "implement auth" --research # Spawn Claude with web research
|
|
42
|
+
claude-flow claude spawn "fix bug" --no-permissions # Spawn Claude without permission prompts
|
|
41
43
|
claude-flow config init # Initialize config
|
|
42
44
|
claude-flow status # Show system status
|
|
43
45
|
claude-flow workflow my-workflow.json # Execute workflow
|
|
@@ -274,7 +276,51 @@ async function main() {
|
|
|
274
276
|
console.log(`📊 Coverage: ${flags.coverage || 80}%`);
|
|
275
277
|
console.log(`💾 Commit: ${flags.commit || 'phase'}`);
|
|
276
278
|
console.log('');
|
|
277
|
-
|
|
279
|
+
|
|
280
|
+
// Build the actual claude command
|
|
281
|
+
const claudeArgs = [task];
|
|
282
|
+
claudeArgs.push('--allowedTools', tools);
|
|
283
|
+
|
|
284
|
+
if (flags.noPermissions) {
|
|
285
|
+
claudeArgs.push('--dangerously-skip-permissions');
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
if (flags.config) {
|
|
289
|
+
claudeArgs.push('--mcp-config', flags.config);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
if (flags.verbose) {
|
|
293
|
+
claudeArgs.push('--verbose');
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
// Execute the actual claude command
|
|
297
|
+
try {
|
|
298
|
+
const command = new Deno.Command('claude', {
|
|
299
|
+
args: claudeArgs,
|
|
300
|
+
env: {
|
|
301
|
+
...Deno.env.toObject(),
|
|
302
|
+
CLAUDE_INSTANCE_ID: instanceId,
|
|
303
|
+
CLAUDE_FLOW_MODE: flags.mode || 'full',
|
|
304
|
+
CLAUDE_FLOW_COVERAGE: (flags.coverage || 80).toString(),
|
|
305
|
+
CLAUDE_FLOW_COMMIT: flags.commit || 'phase',
|
|
306
|
+
},
|
|
307
|
+
stdin: 'inherit',
|
|
308
|
+
stdout: 'inherit',
|
|
309
|
+
stderr: 'inherit',
|
|
310
|
+
});
|
|
311
|
+
|
|
312
|
+
const child = command.spawn();
|
|
313
|
+
const status = await child.status;
|
|
314
|
+
|
|
315
|
+
if (status.success) {
|
|
316
|
+
printSuccess(`Claude instance ${instanceId} completed successfully`);
|
|
317
|
+
} else {
|
|
318
|
+
printError(`Claude instance ${instanceId} exited with code ${status.code}`);
|
|
319
|
+
}
|
|
320
|
+
} catch (err) {
|
|
321
|
+
printError(`Failed to spawn Claude: ${err.message}`);
|
|
322
|
+
console.log('Make sure you have the Claude CLI installed.');
|
|
323
|
+
}
|
|
278
324
|
}
|
|
279
325
|
break;
|
|
280
326
|
|