@output.ai/cli 0.5.0 → 0.5.2

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 (28) hide show
  1. package/dist/services/env_configurator.d.ts +6 -2
  2. package/dist/services/env_configurator.js +11 -4
  3. package/dist/services/env_configurator.spec.js +89 -16
  4. package/dist/services/messages.js +4 -4
  5. package/dist/services/workflow_generator.spec.js +0 -1
  6. package/dist/templates/agent_instructions/AGENTS.md.template +7 -7
  7. package/dist/templates/agent_instructions/agents/workflow_debugger.md.template +11 -11
  8. package/dist/templates/agent_instructions/commands/debug_workflow.md.template +13 -13
  9. package/dist/templates/agent_instructions/commands/plan_workflow.md.template +1 -1
  10. package/dist/templates/agent_instructions/skills/output-error-direct-io/SKILL.md.template +2 -2
  11. package/dist/templates/agent_instructions/skills/output-error-http-client/SKILL.md.template +2 -2
  12. package/dist/templates/agent_instructions/skills/output-error-missing-schemas/SKILL.md.template +2 -2
  13. package/dist/templates/agent_instructions/skills/output-error-nondeterminism/SKILL.md.template +3 -3
  14. package/dist/templates/agent_instructions/skills/output-error-try-catch/SKILL.md.template +2 -2
  15. package/dist/templates/agent_instructions/skills/output-error-zod-import/SKILL.md.template +2 -2
  16. package/dist/templates/agent_instructions/skills/output-services-check/SKILL.md.template +3 -3
  17. package/dist/templates/agent_instructions/skills/output-workflow-list/SKILL.md.template +9 -9
  18. package/dist/templates/agent_instructions/skills/output-workflow-result/SKILL.md.template +33 -33
  19. package/dist/templates/agent_instructions/skills/output-workflow-run/SKILL.md.template +25 -25
  20. package/dist/templates/agent_instructions/skills/output-workflow-runs-list/SKILL.md.template +15 -15
  21. package/dist/templates/agent_instructions/skills/output-workflow-start/SKILL.md.template +35 -35
  22. package/dist/templates/agent_instructions/skills/output-workflow-status/SKILL.md.template +26 -26
  23. package/dist/templates/agent_instructions/skills/output-workflow-stop/SKILL.md.template +19 -19
  24. package/dist/templates/agent_instructions/skills/output-workflow-trace/SKILL.md.template +7 -7
  25. package/dist/templates/project/README.md.template +1 -1
  26. package/package.json +2 -2
  27. package/dist/templates/workflow/.env.template +0 -7
  28. /package/dist/templates/project/{.env.template → .env.example.template} +0 -0
@@ -8,7 +8,7 @@ allowed-tools: [Bash]
8
8
 
9
9
  ## Overview
10
10
 
11
- This skill retrieves the result (return value) of a completed workflow execution. Use it after a workflow started with `output workflow start` has completed, or to retrieve results from historical runs.
11
+ This skill retrieves the result (return value) of a completed workflow execution. Use it after a workflow started with `npx output workflow start` has completed, or to retrieve results from historical runs.
12
12
 
13
13
  ## When to Use This Skill
14
14
 
@@ -22,14 +22,14 @@ This skill retrieves the result (return value) of a completed workflow execution
22
22
 
23
23
  - The workflow must have completed (status: COMPLETED)
24
24
  - You need the workflow ID
25
- - For FAILED workflows, use `output workflow debug` instead
25
+ - For FAILED workflows, use `npx output workflow debug` instead
26
26
 
27
27
  ## Instructions
28
28
 
29
29
  ### Get Result
30
30
 
31
31
  ```bash
32
- output workflow result <workflowId>
32
+ npx output workflow result <workflowId>
33
33
  ```
34
34
 
35
35
  The result is the return value of the workflow function, typically JSON.
@@ -39,10 +39,10 @@ The result is the return value of the workflow function, typically JSON.
39
39
  Before getting results, verify the workflow completed:
40
40
 
41
41
  ```bash
42
- output workflow status <workflowId>
42
+ npx output workflow status <workflowId>
43
43
  # Should show: COMPLETED
44
44
 
45
- output workflow result <workflowId>
45
+ npx output workflow result <workflowId>
46
46
  ```
47
47
 
48
48
  ## Understanding Results
@@ -62,7 +62,7 @@ export default workflow({
62
62
 
63
63
  ```bash
64
64
  # Result output
65
- output workflow result abc123
65
+ npx output workflow result abc123
66
66
  # { "processed": true, "count": 42 }
67
67
  ```
68
68
 
@@ -70,13 +70,13 @@ output workflow result abc123
70
70
 
71
71
  If you try to get the result of a failed workflow:
72
72
  - You'll get an error message
73
- - Use `output workflow debug` instead to see what went wrong
73
+ - Use `npx output workflow debug` instead to see what went wrong
74
74
 
75
75
  ### No Result (void workflows)
76
76
 
77
77
  Some workflows don't return a value:
78
78
  ```bash
79
- output workflow result abc123
79
+ npx output workflow result abc123
80
80
  # null
81
81
  ```
82
82
 
@@ -86,15 +86,15 @@ output workflow result abc123
86
86
 
87
87
  ```bash
88
88
  # Start workflow
89
- output workflow start calculate '{"values": [1, 2, 3]}'
89
+ npx output workflow start calculate '{"values": [1, 2, 3]}'
90
90
  # Output: Workflow ID: calc-abc123
91
91
 
92
92
  # Wait for completion
93
- output workflow status calc-abc123
93
+ npx output workflow status calc-abc123
94
94
  # Status: COMPLETED
95
95
 
96
96
  # Get the result
97
- output workflow result calc-abc123
97
+ npx output workflow result calc-abc123
98
98
  # { "sum": 6, "average": 2 }
99
99
  ```
100
100
 
@@ -102,21 +102,21 @@ output workflow result calc-abc123
102
102
 
103
103
  ```bash
104
104
  # Extract specific field
105
- output workflow result abc123 | jq '.total'
105
+ npx output workflow result abc123 | jq '.total'
106
106
 
107
107
  # Format for display
108
- output workflow result abc123 | jq '.'
108
+ npx output workflow result abc123 | jq '.'
109
109
 
110
110
  # Save to file
111
- output workflow result abc123 > result.json
111
+ npx output workflow result abc123 > result.json
112
112
  ```
113
113
 
114
114
  **Scenario**: Compare results between runs
115
115
 
116
116
  ```bash
117
117
  # Get results from two runs
118
- output workflow result run-1-abc > result1.json
119
- output workflow result run-2-xyz > result2.json
118
+ npx output workflow result run-1-abc > result1.json
119
+ npx output workflow result run-2-xyz > result2.json
120
120
 
121
121
  # Compare
122
122
  diff result1.json result2.json
@@ -128,17 +128,17 @@ diff result1.json result2.json
128
128
  WORKFLOW_ID="abc123"
129
129
 
130
130
  # Wait for completion
131
- while [[ $(output workflow status $WORKFLOW_ID) == *"RUNNING"* ]]; do
131
+ while [[ $(npx output workflow status $WORKFLOW_ID) == *"RUNNING"* ]]; do
132
132
  sleep 5
133
133
  done
134
134
 
135
135
  # Check if completed successfully
136
- if [[ $(output workflow status $WORKFLOW_ID) == *"COMPLETED"* ]]; then
137
- RESULT=$(output workflow result $WORKFLOW_ID)
136
+ if [[ $(npx output workflow status $WORKFLOW_ID) == *"COMPLETED"* ]]; then
137
+ RESULT=$(npx output workflow result $WORKFLOW_ID)
138
138
  echo "Workflow result: $RESULT"
139
139
  else
140
140
  echo "Workflow did not complete successfully"
141
- output workflow debug $WORKFLOW_ID
141
+ npx output workflow debug $WORKFLOW_ID
142
142
  fi
143
143
  ```
144
144
 
@@ -146,25 +146,25 @@ fi
146
146
 
147
147
  ### JSON Objects
148
148
  ```bash
149
- output workflow result abc123
149
+ npx output workflow result abc123
150
150
  # { "key": "value", "nested": { "data": true } }
151
151
  ```
152
152
 
153
153
  ### Arrays
154
154
  ```bash
155
- output workflow result abc123
155
+ npx output workflow result abc123
156
156
  # [1, 2, 3, 4, 5]
157
157
  ```
158
158
 
159
159
  ### Primitive Values
160
160
  ```bash
161
- output workflow result abc123
161
+ npx output workflow result abc123
162
162
  # 42
163
163
 
164
- output workflow result abc123
164
+ npx output workflow result abc123
165
165
  # "success"
166
166
 
167
- output workflow result abc123
167
+ npx output workflow result abc123
168
168
  # true
169
169
  ```
170
170
 
@@ -172,20 +172,20 @@ output workflow result abc123
172
172
 
173
173
  For large results, redirect to a file:
174
174
  ```bash
175
- output workflow result abc123 > large-result.json
175
+ npx output workflow result abc123 > large-result.json
176
176
  ```
177
177
 
178
178
  ## Error Handling
179
179
 
180
180
  ### "Workflow not found"
181
181
  - Check the workflow ID is correct
182
- - Use `output workflow runs list` to find valid IDs
182
+ - Use `npx output workflow runs list` to find valid IDs
183
183
 
184
184
  ### "Workflow not completed"
185
- - Check status: `output workflow status <id>`
185
+ - Check status: `npx output workflow status <id>`
186
186
  - Wait for COMPLETED status before getting result
187
187
  - If RUNNING, wait and try again
188
- - If FAILED, use `output workflow debug`
188
+ - If FAILED, use `npx output workflow debug`
189
189
 
190
190
  ### "No result available"
191
191
  - The workflow may return void/undefined
@@ -193,7 +193,7 @@ output workflow result abc123 > large-result.json
193
193
 
194
194
  ## Related Commands
195
195
 
196
- - `output workflow status <id>` - Check if workflow completed
197
- - `output workflow debug <id>` - Debug failed workflows
198
- - `output workflow run <name>` - Run and get result in one step
199
- - `output workflow runs list` - Find workflow IDs
196
+ - `npx output workflow status <id>` - Check if workflow completed
197
+ - `npx output workflow debug <id>` - Debug failed workflows
198
+ - `npx output workflow run <name>` - Run and get result in one step
199
+ - `npx output workflow runs list` - Find workflow IDs
@@ -20,7 +20,7 @@ This skill executes a workflow synchronously, meaning the command waits for the
20
20
 
21
21
  ## When to Use Async Instead
22
22
 
23
- Consider using `output workflow start` (async) when:
23
+ Consider using `npx output workflow start` (async) when:
24
24
  - The workflow takes a long time (minutes to hours)
25
25
  - You need to run multiple workflows in parallel
26
26
  - You want to disconnect and check results later
@@ -31,8 +31,8 @@ Consider using `output workflow start` (async) when:
31
31
  ### Basic Syntax
32
32
 
33
33
  ```bash
34
- output workflow run <workflowName> --input '<json-input>'
35
- output workflow run <workflowName> --input <path-to-json-file>
34
+ npx output workflow run <workflowName> --input '<json-input>'
35
+ npx output workflow run <workflowName> --input <path-to-json-file>
36
36
  ```
37
37
 
38
38
  The `--input` flag is required when the workflow expects input data.
@@ -44,7 +44,7 @@ The `--input` flag is required when the workflow expects input data.
44
44
  Pass JSON directly on the command line:
45
45
 
46
46
  ```bash
47
- output workflow run example --input '{"question": "who really is ada lovelace?"}'
47
+ npx output workflow run example --input '{"question": "who really is ada lovelace?"}'
48
48
  ```
49
49
 
50
50
  #### 2. File Path (Recommended)
@@ -52,7 +52,7 @@ output workflow run example --input '{"question": "who really is ada lovelace?"}
52
52
  Reference a JSON file containing the input:
53
53
 
54
54
  ```bash
55
- output workflow run simple --input src/simple/scenarios/question_ada_lovelace.json
55
+ npx output workflow run simple --input src/simple/scenarios/question_ada_lovelace.json
56
56
  ```
57
57
 
58
58
  This is the recommended approach because:
@@ -96,26 +96,26 @@ src/
96
96
 
97
97
  3. Run the workflow referencing the scenario:
98
98
  ```bash
99
- output workflow run my_workflow --input src/my_workflow/scenarios/test_user.json
99
+ npx output workflow run my_workflow --input src/my_workflow/scenarios/test_user.json
100
100
  ```
101
101
 
102
102
  ### Input Examples
103
103
 
104
104
  ```bash
105
105
  # Inline JSON - simple object
106
- output workflow run my-workflow --input '{"userId": "123"}'
106
+ npx output workflow run my-workflow --input '{"userId": "123"}'
107
107
 
108
108
  # Inline JSON - complex nested input
109
- output workflow run data-pipeline --input '{"source": "api", "options": {"limit": 100}}'
109
+ npx output workflow run data-pipeline --input '{"source": "api", "options": {"limit": 100}}'
110
110
 
111
111
  # File path - reference a scenario file
112
- output workflow run simple --input src/simple/scenarios/basic.json
112
+ npx output workflow run simple --input src/simple/scenarios/basic.json
113
113
 
114
114
  # File path - relative to current directory
115
- output workflow run batch-processor --input ./test_inputs/batch1.json
115
+ npx output workflow run batch-processor --input ./test_inputs/batch1.json
116
116
 
117
117
  # No input (only if workflow doesn't require it)
118
- output workflow run health-check
118
+ npx output workflow run health-check
119
119
  ```
120
120
 
121
121
  ## Understanding the Output
@@ -129,7 +129,7 @@ The workflow's return value is displayed, typically as JSON.
129
129
  If the workflow fails, you'll see:
130
130
  - Error message
131
131
  - The workflow ID (for further debugging)
132
- - Suggestion to use `output workflow debug` for details
132
+ - Suggestion to use `npx output workflow debug` for details
133
133
 
134
134
  ## Examples
135
135
 
@@ -140,7 +140,7 @@ If the workflow fails, you'll see:
140
140
  ls src/simple/scenarios/
141
141
 
142
142
  # Run using a scenario file
143
- output workflow run simple --input src/simple/scenarios/basic_sum.json
143
+ npx output workflow run simple --input src/simple/scenarios/basic_sum.json
144
144
 
145
145
  # Output:
146
146
  # { "sum": 6, "count": 3 }
@@ -158,20 +158,20 @@ cat > src/my_workflow/scenarios/test_case_1.json << 'EOF'
158
158
  EOF
159
159
 
160
160
  # Run the workflow
161
- output workflow run my_workflow --input src/my_workflow/scenarios/test_case_1.json
161
+ npx output workflow run my_workflow --input src/my_workflow/scenarios/test_case_1.json
162
162
  ```
163
163
 
164
164
  **Scenario**: Quick inline test during development
165
165
 
166
166
  ```bash
167
- output workflow run example --input '{"question": "explain quantum computing"}'
167
+ npx output workflow run example --input '{"question": "explain quantum computing"}'
168
168
  ```
169
169
 
170
170
  **Scenario**: Re-run a workflow with different input for debugging
171
171
 
172
172
  ```bash
173
173
  # First attempt with scenario file
174
- output workflow run process-data --input src/process_data/scenarios/user_abc.json
174
+ npx output workflow run process-data --input src/process_data/scenarios/user_abc.json
175
175
  # Error occurs
176
176
 
177
177
  # Create a new scenario to isolate the issue
@@ -179,17 +179,17 @@ cat > src/process_data/scenarios/debug_minimal.json << 'EOF'
179
179
  {"id": "test", "debug": true}
180
180
  EOF
181
181
 
182
- output workflow run process-data --input src/process_data/scenarios/debug_minimal.json
182
+ npx output workflow run process-data --input src/process_data/scenarios/debug_minimal.json
183
183
  ```
184
184
 
185
185
  **Scenario**: Capture output for further processing
186
186
 
187
187
  ```bash
188
188
  # Save result to a file
189
- output workflow run generate-report --input src/generate_report/scenarios/jan_2024.json > report.json
189
+ npx output workflow run generate-report --input src/generate_report/scenarios/jan_2024.json > report.json
190
190
 
191
191
  # Pipe to jq for processing
192
- output workflow run get-users --input src/get_users/scenarios/active.json | jq '.users[].name'
192
+ npx output workflow run get-users --input src/get_users/scenarios/active.json | jq '.users[].name'
193
193
  ```
194
194
 
195
195
  ## Error Handling
@@ -198,7 +198,7 @@ output workflow run get-users --input src/get_users/scenarios/active.json | jq '
198
198
 
199
199
  | Error | Cause | Solution |
200
200
  |-------|-------|----------|
201
- | "Workflow not found" | Workflow name is incorrect | Check with `output workflow list` |
201
+ | "Workflow not found" | Workflow name is incorrect | Check with `npx output workflow list` |
202
202
  | "Invalid input" | JSON doesn't match schema | Verify input matches workflow's inputSchema |
203
203
  | "Parse error" | Malformed JSON or file not found | Check JSON syntax or file path |
204
204
  | "Timeout" | Workflow took too long | Use async execution for long workflows |
@@ -208,10 +208,10 @@ output workflow run get-users --input src/get_users/scenarios/active.json | jq '
208
208
  When a workflow fails, the output includes the workflow ID. Use it to get the full trace:
209
209
 
210
210
  ```bash
211
- output workflow run my-workflow --input src/my_workflow/scenarios/test.json
211
+ npx output workflow run my-workflow --input src/my_workflow/scenarios/test.json
212
212
  # Output: Workflow failed. ID: abc123xyz
213
213
 
214
- output workflow debug abc123xyz --format json
214
+ npx output workflow debug abc123xyz --format json
215
215
  ```
216
216
 
217
217
  ## Input Schema Tips
@@ -223,6 +223,6 @@ output workflow debug abc123xyz --format json
223
223
 
224
224
  ## Related Commands
225
225
 
226
- - `output workflow start <name> --input` - Start asynchronously
227
- - `output workflow list` - See available workflows
228
- - `output workflow debug <id>` - Debug a failed run
226
+ - `npx output workflow start <name> --input` - Start asynchronously
227
+ - `npx output workflow list` - See available workflows
228
+ - `npx output workflow debug <id>` - Debug a failed run
@@ -23,7 +23,7 @@ This skill helps you view the execution history of workflows. Use it to find fai
23
23
  ### List All Recent Runs
24
24
 
25
25
  ```bash
26
- output workflow runs list
26
+ npx output workflow runs list
27
27
  ```
28
28
 
29
29
  By default, this shows the 100 most recent workflow executions across all workflow types.
@@ -38,7 +38,7 @@ By default, this shows the 100 most recent workflow executions across all workfl
38
38
  ### Filter by Workflow Name
39
39
 
40
40
  ```bash
41
- output workflow runs list <workflowName>
41
+ npx output workflow runs list <workflowName>
42
42
  ```
43
43
 
44
44
  This shows only runs for the specified workflow type.
@@ -46,7 +46,7 @@ This shows only runs for the specified workflow type.
46
46
  ### Get Detailed JSON Output
47
47
 
48
48
  ```bash
49
- output workflow runs list --format json
49
+ npx output workflow runs list --format json
50
50
  ```
51
51
 
52
52
  Use JSON format for programmatic analysis or when you need full details.
@@ -79,42 +79,42 @@ When viewing runs, pay attention to:
79
79
 
80
80
  ```bash
81
81
  # List recent runs and look for FAILED status
82
- output workflow runs list --limit 20
82
+ npx output workflow runs list --limit 20
83
83
 
84
84
  # Or use JSON format with jq to filter
85
- output workflow runs list --format json | jq '.[] | select(.status == "FAILED")'
85
+ npx output workflow runs list --format json | jq '.[] | select(.status == "FAILED")'
86
86
  ```
87
87
 
88
88
  **Scenario**: Get workflow ID for debugging
89
89
 
90
90
  ```bash
91
91
  # List runs for a specific workflow
92
- output workflow runs list my-workflow --limit 5
92
+ npx output workflow runs list my-workflow --limit 5
93
93
 
94
94
  # Note the workflow ID from the output (e.g., "abc123xyz")
95
95
  # Then debug it
96
- output workflow debug abc123xyz --format json
96
+ npx output workflow debug abc123xyz --format json
97
97
  ```
98
98
 
99
99
  **Scenario**: Review recent activity for a specific workflow
100
100
 
101
101
  ```bash
102
102
  # See the last 10 runs of the data-pipeline workflow
103
- output workflow runs list data-pipeline --limit 10
103
+ npx output workflow runs list data-pipeline --limit 10
104
104
  ```
105
105
 
106
106
  **Scenario**: Export run history for analysis
107
107
 
108
108
  ```bash
109
109
  # Get all recent runs as JSON for external analysis
110
- output workflow runs list --format json > workflow-runs.json
110
+ npx output workflow runs list --format json > workflow-runs.json
111
111
  ```
112
112
 
113
113
  **Scenario**: Find when failures started
114
114
 
115
115
  ```bash
116
116
  # Look at more history to find patterns
117
- output workflow runs list --limit 50 --format json | jq 'group_by(.status) | map({status: .[0].status, count: length})'
117
+ npx output workflow runs list --limit 50 --format json | jq 'group_by(.status) | map({status: .[0].status, count: length})'
118
118
  ```
119
119
 
120
120
  ## Identifying Problems
@@ -129,13 +129,13 @@ output workflow runs list --limit 50 --format json | jq 'group_by(.status) | map
129
129
  ### Next Steps After Finding a Failed Run
130
130
 
131
131
  1. Copy the workflow ID from the run
132
- 2. Get the execution trace: `output workflow debug <workflowId> --format json`
132
+ 2. Get the execution trace: `npx output workflow debug <workflowId> --format json`
133
133
  3. Analyze the trace to identify the failure
134
134
  4. Apply the appropriate fix based on the error pattern
135
135
 
136
136
  ## Related Commands
137
137
 
138
- - `output workflow debug <id>` - Analyze execution trace
139
- - `output workflow status <id>` - Check current status
140
- - `output workflow result <id>` - Get execution result
141
- - `output workflow list` - List available workflows
138
+ - `npx output workflow debug <id>` - Analyze execution trace
139
+ - `npx output workflow status <id>` - Check current status
140
+ - `npx output workflow result <id>` - Get execution result
141
+ - `npx output workflow list` - List available workflows
@@ -20,7 +20,7 @@ This skill starts a workflow asynchronously, meaning the command returns immedia
20
20
 
21
21
  ## When to Use Sync Instead
22
22
 
23
- Consider using `output workflow run` (sync) when:
23
+ Consider using `npx output workflow run` (sync) when:
24
24
  - Workflow completes quickly (seconds)
25
25
  - You need the result immediately in your terminal
26
26
  - Simple testing during development
@@ -31,8 +31,8 @@ Consider using `output workflow run` (sync) when:
31
31
  ### Basic Syntax
32
32
 
33
33
  ```bash
34
- output workflow start <workflowName> --input '<json-input>'
35
- output workflow start <workflowName> --input <path-to-json-file>
34
+ npx output workflow start <workflowName> --input '<json-input>'
35
+ npx output workflow start <workflowName> --input <path-to-json-file>
36
36
  ```
37
37
 
38
38
  The `--input` flag is required when the workflow expects input data.
@@ -44,7 +44,7 @@ The `--input` flag is required when the workflow expects input data.
44
44
  Pass JSON directly on the command line:
45
45
 
46
46
  ```bash
47
- output workflow start data-migration --input '{"batchSize": 1000}'
47
+ npx output workflow start data-migration --input '{"batchSize": 1000}'
48
48
  ```
49
49
 
50
50
  #### 2. File Path (Recommended)
@@ -52,7 +52,7 @@ output workflow start data-migration --input '{"batchSize": 1000}'
52
52
  Reference a JSON file containing the input:
53
53
 
54
54
  ```bash
55
- output workflow start data-migration --input src/data_migration/scenarios/large_batch.json
55
+ npx output workflow start data-migration --input src/data_migration/scenarios/large_batch.json
56
56
  ```
57
57
 
58
58
  This is the recommended approach because:
@@ -63,30 +63,30 @@ This is the recommended approach because:
63
63
  ### Getting the Workflow ID
64
64
 
65
65
  The command outputs the workflow ID which you'll need for:
66
- - Checking status: `output workflow status <id>`
67
- - Getting results: `output workflow result <id>`
68
- - Debugging: `output workflow debug <id>`
66
+ - Checking status: `npx output workflow status <id>`
67
+ - Getting results: `npx output workflow result <id>`
68
+ - Debugging: `npx output workflow debug <id>`
69
69
 
70
70
  ## Examples
71
71
 
72
72
  **Scenario**: Start a long-running workflow with scenario file
73
73
 
74
74
  ```bash
75
- output workflow start data-migration --input src/data_migration/scenarios/full_migration.json
75
+ npx output workflow start data-migration --input src/data_migration/scenarios/full_migration.json
76
76
 
77
77
  # Output:
78
78
  # Started workflow: data-migration
79
79
  # Workflow ID: abc123xyz
80
- # Use 'output workflow status abc123xyz' to check progress
80
+ # Use 'npx output workflow status abc123xyz' to check progress
81
81
  ```
82
82
 
83
83
  **Scenario**: Start multiple workflows in parallel using scenario files
84
84
 
85
85
  ```bash
86
86
  # Start several workflows with different scenario files
87
- output workflow start process-batch --input src/process_batch/scenarios/batch_1.json
88
- output workflow start process-batch --input src/process_batch/scenarios/batch_2.json
89
- output workflow start process-batch --input src/process_batch/scenarios/batch_3.json
87
+ npx output workflow start process-batch --input src/process_batch/scenarios/batch_1.json
88
+ npx output workflow start process-batch --input src/process_batch/scenarios/batch_2.json
89
+ npx output workflow start process-batch --input src/process_batch/scenarios/batch_3.json
90
90
 
91
91
  # Note: Save the workflow IDs to check them later
92
92
  ```
@@ -105,37 +105,37 @@ cat > src/generate_report/scenarios/annual_2024.json << 'EOF'
105
105
  EOF
106
106
 
107
107
  # Start the workflow
108
- output workflow start generate-report --input src/generate_report/scenarios/annual_2024.json
108
+ npx output workflow start generate-report --input src/generate_report/scenarios/annual_2024.json
109
109
  # Output: Workflow ID: report-2024-abc
110
110
 
111
111
  # Check status periodically
112
- output workflow status report-2024-abc
112
+ npx output workflow status report-2024-abc
113
113
  # Output: Status: RUNNING
114
114
 
115
115
  # Later, check again
116
- output workflow status report-2024-abc
116
+ npx output workflow status report-2024-abc
117
117
  # Output: Status: COMPLETED
118
118
 
119
119
  # Get the result
120
- output workflow result report-2024-abc
120
+ npx output workflow result report-2024-abc
121
121
  ```
122
122
 
123
123
  **Scenario**: Quick inline test for development
124
124
 
125
125
  ```bash
126
- output workflow start quick-job --input '{"test": true}'
126
+ npx output workflow start quick-job --input '{"test": true}'
127
127
  ```
128
128
 
129
129
  **Scenario**: Script for parallel execution
130
130
 
131
131
  ```bash
132
132
  # Start workflows and capture IDs
133
- ID1=$(output workflow start job --input src/job/scenarios/type_a.json | grep "Workflow ID" | cut -d: -f2 | tr -d ' ')
134
- ID2=$(output workflow start job --input src/job/scenarios/type_b.json | grep "Workflow ID" | cut -d: -f2 | tr -d ' ')
133
+ ID1=$(npx output workflow start job --input src/job/scenarios/type_a.json | grep "Workflow ID" | cut -d: -f2 | tr -d ' ')
134
+ ID2=$(npx output workflow start job --input src/job/scenarios/type_b.json | grep "Workflow ID" | cut -d: -f2 | tr -d ' ')
135
135
 
136
136
  # Wait and check results
137
- output workflow result $ID1
138
- output workflow result $ID2
137
+ npx output workflow result $ID1
138
+ npx output workflow result $ID2
139
139
  ```
140
140
 
141
141
  ## Following Up After Starting
@@ -143,7 +143,7 @@ output workflow result $ID2
143
143
  ### Check Status
144
144
 
145
145
  ```bash
146
- output workflow status <workflowId>
146
+ npx output workflow status <workflowId>
147
147
  ```
148
148
 
149
149
  Status values:
@@ -155,7 +155,7 @@ Status values:
155
155
  ### Get Result
156
156
 
157
157
  ```bash
158
- output workflow result <workflowId>
158
+ npx output workflow result <workflowId>
159
159
  ```
160
160
 
161
161
  Only works for COMPLETED workflows. For FAILED workflows, use debug.
@@ -163,13 +163,13 @@ Only works for COMPLETED workflows. For FAILED workflows, use debug.
163
163
  ### Debug If Failed
164
164
 
165
165
  ```bash
166
- output workflow debug <workflowId> --format json
166
+ npx output workflow debug <workflowId> --format json
167
167
  ```
168
168
 
169
169
  ### Stop If Needed
170
170
 
171
171
  ```bash
172
- output workflow stop <workflowId>
172
+ npx output workflow stop <workflowId>
173
173
  ```
174
174
 
175
175
  ## Workflow ID Management
@@ -178,8 +178,8 @@ When starting multiple workflows, keep track of IDs:
178
178
 
179
179
  ```bash
180
180
  # Log IDs to a file
181
- output workflow start batch-job --input src/batch_job/scenarios/id_1.json >> workflow-ids.txt
182
- output workflow start batch-job --input src/batch_job/scenarios/id_2.json >> workflow-ids.txt
181
+ npx output workflow start batch-job --input src/batch_job/scenarios/id_1.json >> workflow-ids.txt
182
+ npx output workflow start batch-job --input src/batch_job/scenarios/id_2.json >> workflow-ids.txt
183
183
 
184
184
  # Or use a naming convention in your workflow that makes IDs predictable
185
185
  ```
@@ -188,14 +188,14 @@ output workflow start batch-job --input src/batch_job/scenarios/id_2.json >> wor
188
188
 
189
189
  1. **Use scenario files**: Store inputs in `src/<workflow>/scenarios/` for reproducibility
190
190
  2. **Save the workflow ID**: Always note the ID for later reference
191
- 3. **Monitor long workflows**: Use `output workflow status` to check progress
191
+ 3. **Monitor long workflows**: Use `npx output workflow status` to check progress
192
192
  4. **Handle failures**: Check status before getting results
193
- 5. **Clean up**: Stop any stuck workflows with `output workflow stop`
193
+ 5. **Clean up**: Stop any stuck workflows with `npx output workflow stop`
194
194
 
195
195
  ## Related Commands
196
196
 
197
- - `output workflow run <name> --input` - Execute synchronously
198
- - `output workflow status <id>` - Check execution status
199
- - `output workflow result <id>` - Get execution result
200
- - `output workflow stop <id>` - Stop a running workflow
201
- - `output workflow debug <id>` - Debug a workflow execution
197
+ - `npx output workflow run <name> --input` - Execute synchronously
198
+ - `npx output workflow status <id>` - Check execution status
199
+ - `npx output workflow result <id>` - Get execution result
200
+ - `npx output workflow stop <id>` - Stop a running workflow
201
+ - `npx output workflow debug <id>` - Debug a workflow execution