@output.ai/cli 0.4.0 → 0.4.1
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/README.md
CHANGED
|
@@ -1,194 +1,59 @@
|
|
|
1
1
|
# @output.ai/cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Command-line interface for creating and running Output Framework workflows.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@output.ai/cli)
|
|
6
|
+
[](https://docs.output.ai/packages/cli)
|
|
4
7
|
|
|
5
8
|
## Installation
|
|
6
9
|
|
|
7
10
|
```bash
|
|
8
|
-
|
|
9
|
-
cd sdk/cli && npm link
|
|
10
|
-
|
|
11
|
-
# Or run directly from the monorepo
|
|
12
|
-
npx @output.ai/cli
|
|
11
|
+
npm install -g @output.ai/cli
|
|
13
12
|
```
|
|
14
13
|
|
|
15
|
-
##
|
|
16
|
-
|
|
17
|
-
### Initialize a New Project
|
|
14
|
+
## Quick Start
|
|
18
15
|
|
|
19
16
|
```bash
|
|
20
|
-
# Create a new
|
|
17
|
+
# Create a new project
|
|
21
18
|
output init my-project
|
|
22
|
-
|
|
19
|
+
cd my-project
|
|
23
20
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
Creates a complete Output SDK project structure with:
|
|
27
|
-
- Example workflows demonstrating SDK features
|
|
28
|
-
- TypeScript project configuration
|
|
29
|
-
- Agent configuration files
|
|
30
|
-
|
|
31
|
-
### Start Development Services
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
# Start with automatic file watching (default)
|
|
21
|
+
# Start development services
|
|
35
22
|
output dev
|
|
36
23
|
|
|
37
|
-
#
|
|
38
|
-
output
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
#### What It Does
|
|
42
|
-
|
|
43
|
-
The `dev` command orchestrates your entire development environment:
|
|
44
|
-
1. Starts Docker services (Temporal, Redis, PostgreSQL)
|
|
45
|
-
2. Launches the API server for workflow execution
|
|
46
|
-
3. Starts the worker to process workflows
|
|
47
|
-
4. Opens Temporal UI for workflow monitoring
|
|
48
|
-
5. Automatically restarts the worker when source files change
|
|
49
|
-
6. Provides a unified log view of all services
|
|
50
|
-
|
|
51
|
-
This is the primary command for local development - it handles all the complexity of running multiple services and keeps them synchronized.
|
|
52
|
-
|
|
53
|
-
#### Automatic File Watching
|
|
54
|
-
|
|
55
|
-
By default, the worker container automatically restarts when you modify files in:
|
|
56
|
-
- `src/` - Your workflow source files and implementations
|
|
57
|
-
- `package.json` - When dependencies change
|
|
58
|
-
|
|
59
|
-
This feature uses Docker Compose's native watch functionality (requires Docker Compose v2.22+).
|
|
60
|
-
|
|
61
|
-
#### Command Options
|
|
62
|
-
|
|
63
|
-
- `--no-watch` - Disable automatic container restart on file changes
|
|
64
|
-
|
|
65
|
-
### List Workflows
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
# List all available workflows (simple list, default)
|
|
69
|
-
output workflow list
|
|
70
|
-
|
|
71
|
-
# List workflows with custom API URL
|
|
72
|
-
API_URL=http://localhost:3001 output workflow list
|
|
73
|
-
|
|
74
|
-
# List workflows with authentication
|
|
75
|
-
API_AUTH_TOKEN=your-token output workflow list
|
|
76
|
-
|
|
77
|
-
# Show detailed table view with all information
|
|
78
|
-
output workflow list --format table
|
|
79
|
-
|
|
80
|
-
# Show detailed table with expanded parameter info
|
|
81
|
-
output workflow list --format table --detailed
|
|
82
|
-
|
|
83
|
-
# List workflows in JSON format
|
|
84
|
-
output workflow list --format json
|
|
85
|
-
|
|
86
|
-
# Filter workflows by name (partial match)
|
|
87
|
-
output workflow list --filter simple
|
|
24
|
+
# Run a workflow
|
|
25
|
+
output workflow run simple --input '{"question": "who is ada lovelace?"}'
|
|
88
26
|
```
|
|
89
27
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
- `--format, -f` - Output format: `list` (default, simple column), `table`, or `json`
|
|
93
|
-
- `--detailed, -d` - Show detailed parameter information in table view
|
|
94
|
-
- `--filter` - Filter workflows by name (case-insensitive partial match)
|
|
95
|
-
|
|
96
|
-
The list command connects to the API server and retrieves all available workflows. By default, it displays a simple list of workflow names (like `ls`). Use `--format table` for detailed information.
|
|
97
|
-
|
|
98
|
-
### Debug a Workflow Execution
|
|
99
|
-
|
|
100
|
-
```bash
|
|
101
|
-
# Display trace information for a workflow run
|
|
102
|
-
output workflow debug <workflowId>
|
|
103
|
-
|
|
104
|
-
# Display trace in JSON format
|
|
105
|
-
output workflow debug <workflowId> --format json
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
#### What It Does
|
|
109
|
-
|
|
110
|
-
The `debug` command retrieves and displays detailed execution traces for debugging workflow runs. It shows:
|
|
111
|
-
- Complete execution timeline with all events
|
|
112
|
-
- Hierarchical execution tree showing workflow structure
|
|
113
|
-
- Step and activity inputs/outputs
|
|
114
|
-
- Error details and stack traces
|
|
115
|
-
- Performance metrics and durations
|
|
116
|
-
|
|
117
|
-
#### Command Options
|
|
118
|
-
|
|
119
|
-
- `--format, -f` - Output format: `text` (default, human-readable) or `json` (raw trace data)
|
|
120
|
-
|
|
121
|
-
#### Environment Variables
|
|
122
|
-
|
|
123
|
-
- `HOST_TRACE_PATH` - When running in Docker, this maps the container's trace log path to the host filesystem path. Set this to your project's `logs` directory (e.g., `${PWD}/logs`). Required for trace files to be accessible from the CLI when workflows run in containers.
|
|
124
|
-
|
|
125
|
-
### Generate a Workflow
|
|
126
|
-
|
|
127
|
-
```bash
|
|
128
|
-
# Generate a complete workflow with example steps
|
|
129
|
-
output workflow generate my-workflow --description "My awesome workflow"
|
|
130
|
-
|
|
131
|
-
# Generate a minimal skeleton workflow
|
|
132
|
-
output workflow generate my-workflow --skeleton
|
|
133
|
-
|
|
134
|
-
# Generate in a specific directory
|
|
135
|
-
output workflow generate my-workflow --output-dir ./src/workflows
|
|
136
|
-
|
|
137
|
-
# Force overwrite existing workflow
|
|
138
|
-
output workflow generate my-workflow --force
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
#### Command Options
|
|
142
|
-
|
|
143
|
-
- `--description, -d` - Description of the workflow
|
|
144
|
-
- `--skeleton, -s` - Generate minimal skeleton without example steps
|
|
145
|
-
- `--output-dir, -o` - Output directory (default: `src/`)
|
|
146
|
-
- `--force, -f` - Overwrite existing directory
|
|
147
|
-
|
|
148
|
-
#### Generated Structure
|
|
149
|
-
|
|
150
|
-
The CLI creates a complete workflow structure:
|
|
151
|
-
|
|
152
|
-
```
|
|
153
|
-
my-workflow/
|
|
154
|
-
├── workflow.ts # Main workflow definition
|
|
155
|
-
├── steps.ts # Activity/step implementations
|
|
156
|
-
├── prompt@v1.prompt # LLM prompt template (if not skeleton)
|
|
157
|
-
└── README.md # Workflow documentation
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
### Initialize Agent Configuration
|
|
161
|
-
|
|
162
|
-
```bash
|
|
163
|
-
# Initialize agent configuration for your coding agent
|
|
164
|
-
output-cli agents init
|
|
165
|
-
|
|
166
|
-
# Specify your agent provider (default: claude-code)
|
|
167
|
-
output-cli agents init --agent-provider claude-code
|
|
168
|
-
|
|
169
|
-
# Force overwrite existing configuration
|
|
170
|
-
output-cli agents init --force
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
#### What It Does
|
|
174
|
-
|
|
175
|
-
Sets up your coding agent of choice with context files, sub-agents, and slash commands for working with the Output SDK effectively. It creates a `.outputai/` directory and wires up your coding agent to the context files.
|
|
176
|
-
|
|
177
|
-
**Note:** Currently this only works for [Claude Code](https://claude.ai/code), but we plan to add support for other coding agents over time.
|
|
178
|
-
|
|
179
|
-
#### Command Options
|
|
28
|
+
## Command Reference
|
|
180
29
|
|
|
181
|
-
|
|
182
|
-
|
|
30
|
+
| Command | Description |
|
|
31
|
+
|---------|-------------|
|
|
32
|
+
| `output init` | Initialize a new project |
|
|
33
|
+
| `output dev` | Start development services (Temporal, API, Worker) |
|
|
34
|
+
| `output agents init` | Initialize AI agent configurations |
|
|
35
|
+
| `output workflow plan` | Generate a workflow plan from description |
|
|
36
|
+
| `output workflow generate` | Generate a workflow from plan |
|
|
37
|
+
| `output workflow list` | List available workflows |
|
|
38
|
+
| `output workflow run` | Execute a workflow synchronously |
|
|
39
|
+
| `output workflow start` | Start a workflow asynchronously |
|
|
40
|
+
| `output workflow status` | Get workflow execution status |
|
|
41
|
+
| `output workflow result` | Get workflow execution result |
|
|
42
|
+
| `output workflow stop` | Stop a workflow execution |
|
|
183
43
|
|
|
184
|
-
|
|
44
|
+
## Development Services
|
|
185
45
|
|
|
186
|
-
|
|
46
|
+
Running `output dev` starts:
|
|
187
47
|
|
|
188
|
-
|
|
48
|
+
| Service | URL | Description |
|
|
49
|
+
|---------|-----|-------------|
|
|
50
|
+
| Temporal UI | http://localhost:8080 | Monitor and debug workflows |
|
|
51
|
+
| API Server | http://localhost:3001 | REST API for workflow execution |
|
|
52
|
+
| Worker | — | Processes workflows with auto-reload |
|
|
189
53
|
|
|
190
|
-
|
|
54
|
+
## Documentation
|
|
191
55
|
|
|
192
|
-
|
|
56
|
+
For comprehensive documentation, visit:
|
|
193
57
|
|
|
194
|
-
|
|
58
|
+
- [CLI Reference](https://docs.output.ai/packages/cli)
|
|
59
|
+
- [Getting Started](https://docs.output.ai/quickstart)
|
|
@@ -30,7 +30,7 @@ Edit `.env` to add:
|
|
|
30
30
|
### 3. Start Output Services
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
|
-
output dev
|
|
33
|
+
npx output dev
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
This starts:
|
|
@@ -44,7 +44,7 @@ This starts:
|
|
|
44
44
|
In a new terminal:
|
|
45
45
|
|
|
46
46
|
```bash
|
|
47
|
-
output workflow run simple --input '{"question": "who really is ada lovelace?"}'
|
|
47
|
+
npx output workflow run simple --input '{"question": "who really is ada lovelace?"}'
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
### 5. Stop Services
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@output.ai/cli",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "CLI for Output.ai workflow generation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -43,7 +43,10 @@
|
|
|
43
43
|
"copyfiles": "2.4.1",
|
|
44
44
|
"orval": "7.13.2"
|
|
45
45
|
},
|
|
46
|
-
"license": "
|
|
46
|
+
"license": "Apache-2.0",
|
|
47
|
+
"publishConfig": {
|
|
48
|
+
"access": "public"
|
|
49
|
+
},
|
|
47
50
|
"imports": {
|
|
48
51
|
"#*": "./dist/*"
|
|
49
52
|
},
|