@synergenius/flow-weaver 0.21.7 → 0.21.11

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 (51) hide show
  1. package/README.md +59 -57
  2. package/dist/cli/commands/context.js +2 -2
  3. package/dist/cli/commands/create.js +2 -2
  4. package/dist/cli/commands/docs.js +5 -5
  5. package/dist/cli/commands/export.d.ts +4 -4
  6. package/dist/cli/commands/export.js +4 -4
  7. package/dist/cli/commands/init-personas.js +11 -11
  8. package/dist/cli/commands/init.js +5 -5
  9. package/dist/cli/commands/market.js +6 -6
  10. package/dist/cli/commands/openapi.d.ts +3 -3
  11. package/dist/cli/commands/openapi.js +3 -3
  12. package/dist/cli/commands/run.d.ts +5 -5
  13. package/dist/cli/commands/run.js +5 -5
  14. package/dist/cli/commands/serve.d.ts +5 -5
  15. package/dist/cli/commands/serve.js +5 -5
  16. package/dist/cli/commands/templates.js +2 -2
  17. package/dist/cli/flow-weaver.mjs +61 -61
  18. package/dist/cli/index.js +10 -10
  19. package/dist/cli/templates/workflows/aggregator.js +1 -1
  20. package/dist/cli/templates/workflows/ai-agent.js +1 -1
  21. package/dist/cli/templates/workflows/ai-chat.js +1 -1
  22. package/dist/cli/templates/workflows/ai-rag.js +1 -1
  23. package/dist/cli/templates/workflows/ai-react.js +1 -1
  24. package/dist/cli/templates/workflows/conditional.js +1 -1
  25. package/dist/cli/templates/workflows/error-handler.js +1 -1
  26. package/dist/cli/templates/workflows/foreach.js +1 -1
  27. package/dist/cli/templates/workflows/sequential.js +2 -2
  28. package/dist/cli/templates/workflows/webhook.js +1 -1
  29. package/dist/doc-metadata/extractors/cli-commands.js +24 -24
  30. package/dist/doc-metadata/types.d.ts +1 -1
  31. package/dist/generated-version.d.ts +1 -1
  32. package/dist/generated-version.js +1 -1
  33. package/dist/marketplace/registry.d.ts +1 -1
  34. package/dist/marketplace/registry.js +2 -2
  35. package/dist/marketplace/validator.js +2 -2
  36. package/dist/mcp/server.js +1 -1
  37. package/docs/reference/advanced-annotations.md +4 -4
  38. package/docs/reference/built-in-nodes.md +2 -2
  39. package/docs/reference/cli-reference.md +142 -140
  40. package/docs/reference/compilation.md +12 -12
  41. package/docs/reference/concepts.md +29 -29
  42. package/docs/reference/debugging.md +34 -34
  43. package/docs/reference/deployment.md +27 -27
  44. package/docs/reference/export-interface.md +1 -1
  45. package/docs/reference/iterative-development.md +6 -6
  46. package/docs/reference/marketplace.md +20 -20
  47. package/docs/reference/node-conversion.md +1 -1
  48. package/docs/reference/patterns.md +7 -7
  49. package/docs/reference/scaffold.md +22 -22
  50. package/docs/reference/tutorial.md +29 -29
  51. package/package.json +3 -2
package/README.md CHANGED
@@ -63,11 +63,13 @@ The converter extracts the steps and decision points from your markdown and prod
63
63
 
64
64
  ```bash
65
65
  npm install @synergenius/flow-weaver
66
- npx flow-weaver init my-project
66
+ npx fw init my-project
67
67
  cd my-project
68
- npx flow-weaver run workflows/example.ts --params '{"input": "value"}'
68
+ npx fw run workflows/example.ts --params '{"input": "value"}'
69
69
  ```
70
70
 
71
+ `fw` is the CLI command. `flow-weaver` also works as an alias.
72
+
71
73
  ## How It Works
72
74
 
73
75
  **Generate.** Let AI build it for you, design visually in the Studio, or write annotated TypeScript by hand. All three stay in sync.
@@ -119,8 +121,8 @@ export async function dataPipeline(
119
121
  ```
120
122
 
121
123
  ```bash
122
- npx flow-weaver compile data-pipeline.ts # generates executable code in-place
123
- npx flow-weaver run data-pipeline.ts --params '{"rawData": "Hello World"}'
124
+ npx fw compile data-pipeline.ts # generates executable code in-place
125
+ npx fw run data-pipeline.ts --params '{"rawData": "Hello World"}'
124
126
  ```
125
127
 
126
128
  The compiler fills in the function body while preserving your code outside the generated markers.
@@ -130,7 +132,7 @@ The compiler fills in the function body while preserving your code outside the g
130
132
  Flow Weaver includes an MCP server with 48 tools for Claude Code, Cursor, OpenClaw, or any MCP-compatible agent:
131
133
 
132
134
  ```bash
133
- npx flow-weaver mcp-server # auto-registers with Claude Code
135
+ npx fw mcp-server # auto-registers with Claude Code
134
136
  ```
135
137
 
136
138
  | Capability | MCP Tools |
@@ -152,8 +154,8 @@ Design first, implement later. Describe the workflow shape (nodes, ports, execut
152
154
  ```bash
153
155
  # Via MCP: fw_create_model with nodes, inputs/outputs, and execution path
154
156
  # Via CLI:
155
- npx flow-weaver status my-workflow.ts # shows stub vs implemented progress
156
- npx flow-weaver implement my-workflow.ts processData # scaffolds a node body
157
+ npx fw status my-workflow.ts # shows stub vs implemented progress
158
+ npx fw implement my-workflow.ts processData # scaffolds a node body
157
159
  ```
158
160
 
159
161
  The graph is valid before any node has a real implementation. Fill in node bodies incrementally, check `status` to track progress. The architect defines the shape, developers fill in the logic.
@@ -163,10 +165,10 @@ The graph is valid before any node has a real implementation. Fill in node bodie
163
165
  Built-in templates for AI agent workflows:
164
166
 
165
167
  ```bash
166
- npx flow-weaver create workflow ai-agent my-agent.ts --provider openai --model gpt-4o
167
- npx flow-weaver create workflow ai-react react-agent.ts
168
- npx flow-weaver create workflow ai-rag rag-pipeline.ts
169
- npx flow-weaver create workflow ai-agent-durable durable-agent.ts
168
+ npx fw create workflow ai-agent my-agent.ts --provider openai --model gpt-4o
169
+ npx fw create workflow ai-react react-agent.ts
170
+ npx fw create workflow ai-rag rag-pipeline.ts
171
+ npx fw create workflow ai-agent-durable durable-agent.ts
170
172
  ```
171
173
 
172
174
  **12 workflow templates:**
@@ -257,22 +259,22 @@ npm install @synergenius/flow-weaver-pack-lambda @synergenius/flow-weaver-pack-v
257
259
 
258
260
  ```bash
259
261
  # Plain TypeScript (default)
260
- flow-weaver compile workflow.ts
262
+ fw compile workflow.ts
261
263
 
262
264
  # Inngest durable functions (per-node step.run, retries, cron)
263
- flow-weaver compile workflow.ts --target inngest --retries 3 --cron "0 9 * * *"
265
+ fw compile workflow.ts --target inngest --retries 3 --cron "0 9 * * *"
264
266
 
265
267
  # Serverless exports
266
- flow-weaver export workflow.ts --target lambda --output deploy/
267
- flow-weaver export workflow.ts --target vercel --output deploy/
268
- flow-weaver export workflow.ts --target cloudflare --output deploy/
268
+ fw export workflow.ts --target lambda --output deploy/
269
+ fw export workflow.ts --target vercel --output deploy/
270
+ fw export workflow.ts --target cloudflare --output deploy/
269
271
 
270
272
  # CI/CD pipelines
271
- flow-weaver export workflow.ts --target github-actions --output .github/workflows/
272
- flow-weaver export workflow.ts --target gitlab-ci --output .
273
+ fw export workflow.ts --target github-actions --output .github/workflows/
274
+ fw export workflow.ts --target gitlab-ci --output .
273
275
 
274
276
  # HTTP server with OpenAPI docs
275
- flow-weaver serve ./workflows --port 3000 --swagger
277
+ fw serve ./workflows --port 3000 --swagger
276
278
  ```
277
279
 
278
280
  Both the default TypeScript target and Inngest target parallelize independent nodes with `Promise.all()`. Inngest additionally wraps each node in `step.run()` for individual durability and generates typed Zod event schemas.
@@ -282,8 +284,8 @@ Both the default TypeScript target and Inngest target parallelize independent no
282
284
  Generate SVG or interactive HTML diagrams from any workflow:
283
285
 
284
286
  ```bash
285
- flow-weaver diagram workflow.ts -o workflow.svg --theme dark
286
- flow-weaver diagram workflow.ts -o workflow.html --format html
287
+ fw diagram workflow.ts -o workflow.svg --theme dark
288
+ fw diagram workflow.ts -o workflow.html --format html
287
289
  ```
288
290
 
289
291
  Customize node appearance with annotations:
@@ -341,56 +343,56 @@ const code = generateCode(ast);
341
343
 
342
344
  ```bash
343
345
  # Core
344
- flow-weaver compile <file> # Compile to TypeScript or Inngest
345
- flow-weaver validate <file> # Validate without compiling
346
- flow-weaver run <file> # Execute a workflow
347
- flow-weaver dev <file> # Watch + compile + run
348
- flow-weaver strip <file> # Remove generated code sections
349
- flow-weaver describe <file> # Structure output (json/text/mermaid)
350
- flow-weaver diagram <file> # Generate SVG or interactive HTML diagram
351
- flow-weaver diff <f1> <f2> # Semantic workflow comparison
346
+ fw compile <file> # Compile to TypeScript or Inngest
347
+ fw validate <file> # Validate without compiling
348
+ fw run <file> # Execute a workflow
349
+ fw dev <file> # Watch + compile + run
350
+ fw strip <file> # Remove generated code sections
351
+ fw describe <file> # Structure output (json/text/mermaid)
352
+ fw diagram <file> # Generate SVG or interactive HTML diagram
353
+ fw diff <f1> <f2> # Semantic workflow comparison
352
354
 
353
355
  # Model-driven
354
- flow-weaver status <file> # Show stub vs implemented progress
355
- flow-weaver implement <file> <node> # Scaffold a node body from its stub
356
+ fw status <file> # Show stub vs implemented progress
357
+ fw implement <file> <node> # Scaffold a node body from its stub
356
358
 
357
359
  # Scaffolding
358
- flow-weaver init [directory] # Create new project
359
- flow-weaver create workflow <t> <f> # Scaffold from template
360
- flow-weaver create node <name> <f> # Scaffold node type
361
- flow-weaver templates # List available templates
362
- flow-weaver doctor # Check project compatibility
363
- flow-weaver grammar # Output annotation grammar (EBNF/railroad)
360
+ fw init [directory] # Create new project
361
+ fw create workflow <t> <f> # Scaffold from template
362
+ fw create node <name> <f> # Scaffold node type
363
+ fw templates # List available templates
364
+ fw doctor # Check project compatibility
365
+ fw grammar # Output annotation grammar (EBNF/railroad)
364
366
 
365
367
  # Deploy
366
- flow-weaver serve [directory] # HTTP server with Swagger UI
367
- flow-weaver export <file> # Export to Lambda/Vercel/Cloudflare/Inngest/GitHub Actions/GitLab CI (via packs)
368
- flow-weaver openapi <directory> # Generate OpenAPI spec
368
+ fw serve [directory] # HTTP server with Swagger UI
369
+ fw export <file> # Export to Lambda/Vercel/Cloudflare/Inngest/GitHub Actions/GitLab CI (via packs)
370
+ fw openapi <directory> # Generate OpenAPI spec
369
371
 
370
372
  # Patterns
371
- flow-weaver pattern list <path> # List reusable patterns
372
- flow-weaver pattern apply <p> <t> # Apply pattern to workflow
373
- flow-weaver pattern extract <src> # Extract pattern from nodes
373
+ fw pattern list <path> # List reusable patterns
374
+ fw pattern apply <p> <t> # Apply pattern to workflow
375
+ fw pattern extract <src> # Extract pattern from nodes
374
376
 
375
377
  # Docs
376
- flow-weaver docs # List documentation topics
377
- flow-weaver docs read <topic> # Read a topic
378
- flow-weaver docs search <query> # Search documentation
378
+ fw docs # List documentation topics
379
+ fw docs read <topic> # Read a topic
380
+ fw docs search <query> # Search documentation
379
381
 
380
382
  # Marketplace
381
- flow-weaver market search [query] # Search npm for packages
382
- flow-weaver market install <pkg> # Install a package
383
- flow-weaver market list # List installed packages
384
- flow-weaver market init <name> # Scaffold a marketplace package
385
- flow-weaver market pack # Validate and generate manifest
386
- flow-weaver market publish # Publish to npm
383
+ fw market search [query] # Search npm for packages
384
+ fw market install <pkg> # Install a package
385
+ fw market list # List installed packages
386
+ fw market init <name> # Scaffold a marketplace package
387
+ fw market pack # Validate and generate manifest
388
+ fw market publish # Publish to npm
387
389
 
388
390
  # Editor / IDE
389
- flow-weaver mcp-server # Start MCP server for Claude Code
390
- flow-weaver listen # Stream editor events
391
- flow-weaver changelog # Generate changelog from git history
392
- flow-weaver migrate <glob> # Run migration transforms on workflow files
393
- flow-weaver plugin init <name> # Scaffold an external plugin
391
+ fw mcp-server # Start MCP server for Claude Code
392
+ fw listen # Stream editor events
393
+ fw changelog # Generate changelog from git history
394
+ fw migrate <glob> # Run migration transforms on workflow files
395
+ fw plugin init <name> # Scaffold an external plugin
394
396
  ```
395
397
 
396
398
  ## Built-in Nodes
@@ -15,7 +15,7 @@ export async function contextCommand(preset, options) {
15
15
  logger.log(` ${name.padEnd(maxName + 2)} ${topics.join(', ')}`);
16
16
  }
17
17
  logger.newline();
18
- logger.log(' Usage: flow-weaver context [preset] [options]');
18
+ logger.log(' Usage: fw context [preset] [options]');
19
19
  logger.newline();
20
20
  return;
21
21
  }
@@ -48,6 +48,6 @@ export async function contextCommand(preset, options) {
48
48
  }
49
49
  // Stats to stderr (doesn't pollute piped stdout)
50
50
  const stats = `${result.topicCount} topics, ${result.lineCount} lines (${result.profile} profile)`;
51
- process.stderr.write(`flow-weaver context: ${stats}\n`);
51
+ process.stderr.write(`fw context: ${stats}\n`);
52
52
  }
53
53
  //# sourceMappingURL=context.js.map
@@ -42,7 +42,7 @@ export async function createWorkflowCommand(template, file, options = {}) {
42
42
  const templateDef = getWorkflowTemplate(template);
43
43
  if (!templateDef) {
44
44
  logger.error(`Unknown workflow template: ${template}`);
45
- logger.info("Run 'flow-weaver templates' to see available templates");
45
+ logger.info("Run 'fw templates' to see available templates");
46
46
  process.exit(1);
47
47
  }
48
48
  // Resolve to absolute path
@@ -104,7 +104,7 @@ export async function createNodeCommand(name, file, options = {}) {
104
104
  const templateDef = getNodeTemplate(template);
105
105
  if (!templateDef) {
106
106
  logger.error(`Unknown node template: ${template}`);
107
- logger.info("Run 'flow-weaver templates' to see available templates");
107
+ logger.info("Run 'fw templates' to see available templates");
108
108
  process.exit(1);
109
109
  }
110
110
  // Resolve to absolute path
@@ -17,15 +17,15 @@ export async function docsListCommand(options) {
17
17
  logger.log(` ${topic.slug.padEnd(maxSlug + 2)} ${topic.description}`);
18
18
  }
19
19
  logger.newline();
20
- logger.log(' Usage: flow-weaver docs <topic>');
21
- logger.log(' Search: flow-weaver docs search <query>');
20
+ logger.log(' Usage: fw docs <topic>');
21
+ logger.log(' Search: fw docs search <query>');
22
22
  logger.newline();
23
23
  }
24
24
  export async function docsReadCommand(topic, options) {
25
25
  if (options.json) {
26
26
  const structured = readTopicStructured(topic);
27
27
  if (!structured) {
28
- logger.error(`Unknown topic: "${topic}". Run "flow-weaver docs" to see available topics.`);
28
+ logger.error(`Unknown topic: "${topic}". Run "fw docs" to see available topics.`);
29
29
  process.exit(1);
30
30
  }
31
31
  process.stdout.write(JSON.stringify(structured, null, 2) + '\n');
@@ -33,7 +33,7 @@ export async function docsReadCommand(topic, options) {
33
33
  }
34
34
  const doc = readTopic(topic, options.compact);
35
35
  if (!doc) {
36
- logger.error(`Unknown topic: "${topic}". Run "flow-weaver docs" to see available topics.`);
36
+ logger.error(`Unknown topic: "${topic}". Run "fw docs" to see available topics.`);
37
37
  process.exit(1);
38
38
  }
39
39
  process.stdout.write(doc.content + '\n');
@@ -71,7 +71,7 @@ export async function docsSearchCommand(query, options) {
71
71
  break;
72
72
  }
73
73
  logger.log(` ${results.length} matching section(s) across ${new Set(results.map((r) => r.slug)).size} topic(s).`);
74
- logger.log(' Read a topic: flow-weaver docs <topic>');
74
+ logger.log(' Read a topic: fw docs <topic>');
75
75
  logger.newline();
76
76
  }
77
77
  //# sourceMappingURL=docs.js.map
@@ -32,16 +32,16 @@ export interface ExportOptions {
32
32
  * @example
33
33
  * ```bash
34
34
  * # Export for a target (install the corresponding pack first)
35
- * flow-weaver export workflow.ts --target <target> --output dist/
35
+ * fw export workflow.ts --target <target> --output dist/
36
36
  *
37
37
  * # Export specific workflow from multi-workflow file
38
- * flow-weaver export multi-workflow.ts --target <target> --output api/ --workflow calculate
38
+ * fw export multi-workflow.ts --target <target> --output api/ --workflow calculate
39
39
  *
40
40
  * # Export all workflows as a single service
41
- * flow-weaver export workflows.ts --target <target> --output dist/ --multi
41
+ * fw export workflows.ts --target <target> --output dist/ --multi
42
42
  *
43
43
  * # Export with API documentation routes
44
- * flow-weaver export workflow.ts --target <target> --output dist/ --docs
44
+ * fw export workflow.ts --target <target> --output dist/ --docs
45
45
  * ```
46
46
  */
47
47
  export declare function exportCommand(input: string, options: ExportOptions): Promise<void>;
@@ -12,16 +12,16 @@ import { logger } from '../utils/logger.js';
12
12
  * @example
13
13
  * ```bash
14
14
  * # Export for a target (install the corresponding pack first)
15
- * flow-weaver export workflow.ts --target <target> --output dist/
15
+ * fw export workflow.ts --target <target> --output dist/
16
16
  *
17
17
  * # Export specific workflow from multi-workflow file
18
- * flow-weaver export multi-workflow.ts --target <target> --output api/ --workflow calculate
18
+ * fw export multi-workflow.ts --target <target> --output api/ --workflow calculate
19
19
  *
20
20
  * # Export all workflows as a single service
21
- * flow-weaver export workflows.ts --target <target> --output dist/ --multi
21
+ * fw export workflows.ts --target <target> --output dist/ --multi
22
22
  *
23
23
  * # Export with API documentation routes
24
- * flow-weaver export workflow.ts --target <target> --output dist/ --docs
24
+ * fw export workflow.ts --target <target> --output dist/ --docs
25
25
  * ```
26
26
  */
27
27
  export async function exportCommand(input, options) {
@@ -174,13 +174,13 @@ export function generateReadme(projectName, persona, _template) {
174
174
  lines.push('A Flow Weaver workflow project.', '', '## Development', '', '```sh', 'npm run dev # Compile and run', 'npm run compile # Compile only', 'npm run validate # Check for errors', '```', '', '## AI-Assisted Editing', '', 'With your AI editor connected, you can describe changes in plain language:', '', '- "Add error handling to the pipeline"', '- "Replace the mock LLM with OpenAI"', '- "Add a validation step before processing"', '');
175
175
  }
176
176
  else if (persona === 'lowcode') {
177
- lines.push('A Flow Weaver workflow project.', '', '## Development', '', '```sh', 'npm run dev # Compile and run', 'npm run compile # Compile only', 'npm run validate # Check for errors', '```', '', '## Templates', '', 'Browse and add more workflows:', '', '```sh', 'flow-weaver templates # List all templates', 'flow-weaver create workflow <template> <file> # Add a workflow', 'flow-weaver describe src/*.ts --format ascii # See workflow structure', '```', '');
177
+ lines.push('A Flow Weaver workflow project.', '', '## Development', '', '```sh', 'npm run dev # Compile and run', 'npm run compile # Compile only', 'npm run validate # Check for errors', '```', '', '## Templates', '', 'Browse and add more workflows:', '', '```sh', 'fw templates # List all templates', 'fw create workflow <template> <file> # Add a workflow', 'fw describe src/*.ts --format ascii # See workflow structure', '```', '');
178
178
  }
179
179
  else {
180
180
  // expert: minimal
181
181
  lines.push('A Flow Weaver workflow project.', '', '## Commands', '', '```sh', 'npm run dev # Compile and run', 'npm run compile # Compile only', 'npm run validate # Check for errors', '```', '');
182
182
  }
183
- lines.push('## Learn more', '', '- `flow-weaver docs` to browse reference documentation', '- `flow-weaver mcp-setup` to connect AI editors', '');
183
+ lines.push('## Learn more', '', '- `fw docs` to browse reference documentation', '- `fw mcp-setup` to connect AI editors', '');
184
184
  return lines.join('\n');
185
185
  }
186
186
  // ── Example workflow for lowcode persona ──────────────────────────────────────
@@ -234,7 +234,7 @@ export function ${fnName}(
234
234
  execute: boolean,
235
235
  params: { name: string }
236
236
  ): { onSuccess: boolean; onFailure: boolean; result: string } {
237
- throw new Error("Compile with: flow-weaver compile <file>");
237
+ throw new Error("Compile with: fw compile <file>");
238
238
  }
239
239
  `;
240
240
  }
@@ -306,9 +306,9 @@ function printNocodeGuidance(_projectName) {
306
306
  logger.newline();
307
307
  logger.log(` ${logger.bold('Useful commands')}`);
308
308
  logger.newline();
309
- logger.log(` flow-weaver run src/*.ts ${logger.dim('Run your workflow')}`);
310
- logger.log(` flow-weaver diagram src/*.ts ${logger.dim('See a visual diagram')}`);
311
- logger.log(` flow-weaver mcp-setup ${logger.dim('Connect more AI editors')}`);
309
+ logger.log(` fw run src/*.ts ${logger.dim('Run your workflow')}`);
310
+ logger.log(` fw diagram src/*.ts ${logger.dim('See a visual diagram')}`);
311
+ logger.log(` fw mcp-setup ${logger.dim('Connect more AI editors')}`);
312
312
  }
313
313
  function printVibecoderGuidance() {
314
314
  logger.newline();
@@ -326,17 +326,17 @@ function printLowcodeGuidance() {
326
326
  logger.newline();
327
327
  logger.log(` ${logger.bold('Explore and customize')}`);
328
328
  logger.newline();
329
- logger.log(` flow-weaver templates ${logger.dim('List all 16 workflow templates')}`);
330
- logger.log(` flow-weaver describe src/*.ts ${logger.dim('See the workflow structure')}`);
331
- logger.log(` flow-weaver docs annotations ${logger.dim('Annotation reference')}`);
329
+ logger.log(` fw templates ${logger.dim('List all 16 workflow templates')}`);
330
+ logger.log(` fw describe src/*.ts ${logger.dim('See the workflow structure')}`);
331
+ logger.log(` fw docs annotations ${logger.dim('Annotation reference')}`);
332
332
  logger.newline();
333
333
  logger.log(` Your project includes an example in ${logger.highlight('examples/')} to study.`);
334
334
  logger.log(` With MCP connected, AI can help modify nodes and connections.`);
335
335
  }
336
336
  function printExpertGuidance() {
337
337
  logger.newline();
338
- logger.log(` flow-weaver mcp-setup ${logger.dim('Connect AI editors (Claude, Cursor, VS Code)')}`);
339
- logger.log(` flow-weaver docs ${logger.dim('Browse reference docs')}`);
338
+ logger.log(` fw mcp-setup ${logger.dim('Connect AI editors (Claude, Cursor, VS Code)')}`);
339
+ logger.log(` fw docs ${logger.dim('Browse reference docs')}`);
340
340
  }
341
341
  /** Pad a filename to align descriptions */
342
342
  function pad(displayName, width) {
@@ -268,15 +268,15 @@ export function generateProjectFiles(projectName, template, format = 'esm', pers
268
268
  const workflowCode = tmpl.generate({ workflowName });
269
269
  // Package.json
270
270
  const scripts = {
271
- dev: `npx flow-weaver compile src/${workflowFile} -o src && npx tsx src/main.ts`,
271
+ dev: `npx fw compile src/${workflowFile} -o src && npx tsx src/main.ts`,
272
272
  start: 'npx tsx src/main.ts',
273
- compile: `npx flow-weaver compile src/${workflowFile} -o src`,
274
- validate: `npx flow-weaver validate src/${workflowFile}`,
275
- doctor: 'npx flow-weaver doctor',
273
+ compile: `npx fw compile src/${workflowFile} -o src`,
274
+ validate: `npx fw validate src/${workflowFile}`,
275
+ doctor: 'npx fw doctor',
276
276
  };
277
277
  // Add diagram script for non-expert personas
278
278
  if (persona !== 'expert') {
279
- scripts.diagram = `npx flow-weaver diagram src/${workflowFile} --format ascii-compact`;
279
+ scripts.diagram = `npx fw diagram src/${workflowFile} --format ascii-compact`;
280
280
  }
281
281
  const packageJsonContent = {
282
282
  name: projectName,
@@ -56,14 +56,14 @@ export async function marketInitCommand(name, options = {}) {
56
56
  type: 'module',
57
57
  main: './dist/index.js',
58
58
  types: './dist/index.d.ts',
59
- keywords: ['flowweaver-marketplace-pack', 'flow-weaver', shortName],
59
+ keywords: ['flow-weaver-marketplace-pack', 'flow-weaver', shortName],
60
60
  flowWeaver: {
61
61
  type: 'marketplace-pack',
62
62
  engineVersion: '>=0.1.0',
63
63
  },
64
64
  scripts: {
65
65
  build: 'tsc',
66
- pack: 'flow-weaver market pack',
66
+ pack: 'fw market pack',
67
67
  prepublishOnly: 'npm run build && npm run pack',
68
68
  },
69
69
  ...(options.author && { author: options.author }),
@@ -130,7 +130,7 @@ A [Flow Weaver](https://github.com/synergenius-fw/flow-weaver) marketplace pack.
130
130
  ## Installation
131
131
 
132
132
  \`\`\`bash
133
- flow-weaver market install ${name}
133
+ fw market install ${name}
134
134
  \`\`\`
135
135
 
136
136
  ## Contents
@@ -163,7 +163,7 @@ npm publish # Publish to npm
163
163
  logger.log(' npm install');
164
164
  logger.log(' # Add your node types, workflows, and patterns to src/');
165
165
  logger.log(' npm run build');
166
- logger.log(' flow-weaver market pack');
166
+ logger.log(' fw market pack');
167
167
  logger.log(' npm publish');
168
168
  logger.newline();
169
169
  }
@@ -301,7 +301,7 @@ export async function marketInstallCommand(packageSpec, options = {}) {
301
301
  }
302
302
  else {
303
303
  logger.warn('No flowweaver.manifest.json found in package');
304
- logger.info('The package may need to run "flow-weaver market pack" before publishing');
304
+ logger.info('The package may need to run "fw market pack" before publishing');
305
305
  }
306
306
  }
307
307
  /**
@@ -375,7 +375,7 @@ export async function marketListCommand(options = {}) {
375
375
  }
376
376
  if (packages.length === 0) {
377
377
  logger.info('No marketplace packages installed');
378
- logger.info('Use "flow-weaver market search" to find packages');
378
+ logger.info('Use "fw market search" to find packages');
379
379
  return;
380
380
  }
381
381
  for (const pkg of packages) {
@@ -24,13 +24,13 @@ export interface OpenAPIOptions {
24
24
  * @example
25
25
  * ```bash
26
26
  * # Generate JSON spec to stdout
27
- * flow-weaver openapi ./workflows
27
+ * fw openapi ./workflows
28
28
  *
29
29
  * # Generate YAML spec to file
30
- * flow-weaver openapi ./workflows --format yaml --output api-spec.yaml
30
+ * fw openapi ./workflows --format yaml --output api-spec.yaml
31
31
  *
32
32
  * # With custom title and version
33
- * flow-weaver openapi ./workflows --title "My API" --version "2.0.0"
33
+ * fw openapi ./workflows --title "My API" --version "2.0.0"
34
34
  * ```
35
35
  */
36
36
  export declare function openapiCommand(dir: string, options: OpenAPIOptions): Promise<void>;
@@ -15,13 +15,13 @@ import { logger } from '../utils/logger.js';
15
15
  * @example
16
16
  * ```bash
17
17
  * # Generate JSON spec to stdout
18
- * flow-weaver openapi ./workflows
18
+ * fw openapi ./workflows
19
19
  *
20
20
  * # Generate YAML spec to file
21
- * flow-weaver openapi ./workflows --format yaml --output api-spec.yaml
21
+ * fw openapi ./workflows --format yaml --output api-spec.yaml
22
22
  *
23
23
  * # With custom title and version
24
- * flow-weaver openapi ./workflows --title "My API" --version "2.0.0"
24
+ * fw openapi ./workflows --title "My API" --version "2.0.0"
25
25
  * ```
26
26
  */
27
27
  export async function openapiCommand(dir, options) {
@@ -41,19 +41,19 @@ export interface RunOptions {
41
41
  * @example
42
42
  * ```bash
43
43
  * # Basic execution
44
- * flow-weaver run workflow.ts
44
+ * fw run workflow.ts
45
45
  *
46
46
  * # With parameters
47
- * flow-weaver run workflow.ts --params '{"a": 5, "b": 3}'
47
+ * fw run workflow.ts --params '{"a": 5, "b": 3}'
48
48
  *
49
49
  * # From params file
50
- * flow-weaver run workflow.ts --params-file params.json
50
+ * fw run workflow.ts --params-file params.json
51
51
  *
52
52
  * # Specific workflow in multi-workflow file
53
- * flow-weaver run workflow.ts --workflow calculate
53
+ * fw run workflow.ts --workflow calculate
54
54
  *
55
55
  * # JSON output for scripting
56
- * flow-weaver run workflow.ts --json | jq '.result'
56
+ * fw run workflow.ts --json | jq '.result'
57
57
  * ```
58
58
  */
59
59
  export declare function runCommand(input: string, options: RunOptions): Promise<void>;
@@ -30,19 +30,19 @@ function displayPath(filePath) {
30
30
  * @example
31
31
  * ```bash
32
32
  * # Basic execution
33
- * flow-weaver run workflow.ts
33
+ * fw run workflow.ts
34
34
  *
35
35
  * # With parameters
36
- * flow-weaver run workflow.ts --params '{"a": 5, "b": 3}'
36
+ * fw run workflow.ts --params '{"a": 5, "b": 3}'
37
37
  *
38
38
  * # From params file
39
- * flow-weaver run workflow.ts --params-file params.json
39
+ * fw run workflow.ts --params-file params.json
40
40
  *
41
41
  * # Specific workflow in multi-workflow file
42
- * flow-weaver run workflow.ts --workflow calculate
42
+ * fw run workflow.ts --workflow calculate
43
43
  *
44
44
  * # JSON output for scripting
45
- * flow-weaver run workflow.ts --json | jq '.result'
45
+ * fw run workflow.ts --json | jq '.result'
46
46
  * ```
47
47
  */
48
48
  export async function runCommand(input, options) {
@@ -26,19 +26,19 @@ export interface ServeOptions {
26
26
  * @example
27
27
  * ```bash
28
28
  * # Start server with current directory
29
- * flow-weaver serve
29
+ * fw serve
30
30
  *
31
31
  * # Specify workflow directory
32
- * flow-weaver serve ./workflows
32
+ * fw serve ./workflows
33
33
  *
34
34
  * # Custom port
35
- * flow-weaver serve --port 8080
35
+ * fw serve --port 8080
36
36
  *
37
37
  * # Production mode
38
- * flow-weaver serve --production --precompile
38
+ * fw serve --production --precompile
39
39
  *
40
40
  * # Disable hot reload
41
- * flow-weaver serve --no-watch
41
+ * fw serve --no-watch
42
42
  * ```
43
43
  */
44
44
  export declare function serveCommand(dir: string | undefined, options: ServeOptions): Promise<void>;
@@ -14,19 +14,19 @@ import { logger } from '../utils/logger.js';
14
14
  * @example
15
15
  * ```bash
16
16
  * # Start server with current directory
17
- * flow-weaver serve
17
+ * fw serve
18
18
  *
19
19
  * # Specify workflow directory
20
- * flow-weaver serve ./workflows
20
+ * fw serve ./workflows
21
21
  *
22
22
  * # Custom port
23
- * flow-weaver serve --port 8080
23
+ * fw serve --port 8080
24
24
  *
25
25
  * # Production mode
26
- * flow-weaver serve --production --precompile
26
+ * fw serve --production --precompile
27
27
  *
28
28
  * # Disable hot reload
29
- * flow-weaver serve --no-watch
29
+ * fw serve --no-watch
30
30
  * ```
31
31
  */
32
32
  export async function serveCommand(dir, options) {
@@ -47,8 +47,8 @@ export async function templatesCommand(options = {}) {
47
47
  }
48
48
  logger.newline();
49
49
  logger.section("Usage");
50
- logger.log(" $ flow-weaver create workflow <template> <file> [--async] [--line N]");
51
- logger.log(" $ flow-weaver create node <name> <file> [-t <template>] [--line N]");
50
+ logger.log(" $ fw create workflow <template> <file> [--async] [--line N]");
51
+ logger.log(" $ fw create node <name> <file> [-t <template>] [--line N]");
52
52
  logger.newline();
53
53
  }
54
54
  //# sourceMappingURL=templates.js.map