Skip to main content
The output CLI is how you create projects, start development services, run workflows, and debug executions. It’s the main way you interact with Output during development.

Quick Start

# Create a new project
npx @outputai/cli init
cd <project-name>

# Start development services (Temporal, API, worker)
npx output dev

# Run a workflow with a test scenario
npx output workflow run lead_enrichment acme

Command Reference

CommandDescription
output initCreate a new project
output devStart development services
output updateUpdate CLI and agent configuration
output workflow planGenerate a workflow plan from a description
output workflow generateGenerate workflow code from a plan
output workflow listList available workflows
output workflow runs listList recent workflow runs
output workflow runRun a workflow and wait for the result
output workflow startStart a workflow without waiting
output workflow statusCheck workflow execution status
output workflow resultGet a completed workflow’s result
output workflow stopStop a workflow gracefully
output workflow terminateForce-stop a workflow
output workflow debugShow the execution trace
output workflow costCalculate execution cost from a trace
output workflow testRun evaluations against a workflow
output workflow dataset listList datasets for a workflow
output workflow dataset generateGenerate a dataset from a scenario or trace

Project Commands

output init

Create a new Output project with the standard file structure:
output init [folder-name]
folder-name
string
Name of the project folder to create
FlagDefaultDescription
--skip-envfalseSkip interactive environment variable setup

output dev

Start all development services via Docker Compose:
output dev
This starts:
ServiceURLDescription
Temporal UIhttp://localhost:8080Monitor and debug workflows
Temporal Serverlocalhost:7233gRPC endpoint
API Serverhttp://localhost:3001REST API for running workflows
WorkerProcesses workflows with auto-reload
PostgreSQLlocalhost:5432Temporal persistence
Redislocalhost:6379Caching layer
FlagDefaultDescription
--compose-file, -fPath to custom docker-compose file
--no-watchfalseDisable file watching

output dev eject

Export the Docker Compose configuration so you can customize it:
output dev eject
FlagDefaultDescription
--output, -odocker-compose.ymlOutput path
--force, -ffalseOverwrite existing file

output update

Update the Output CLI and agent configuration:
output update
With no flags, updates everything. Use flags to update specific components:
FlagDescription
--cliUpdate CLI packages only
--agentsUpdate Claude Code agent configuration only

Workflow Commands

output workflow plan

Generate a workflow plan from a natural language description. The command prompts for a description, generates a plan using AI, and lets you iterate on it interactively. Type ACCEPT to save.
output workflow plan
output workflow plan --description "Enrich leads by looking up company data and generating a summary"
FlagDefaultDescription
--description, -dWorkflow description (prompts if not provided)
--force-agent-file-writefalseForce overwrite agent templates

output workflow generate

Generate workflow code from a plan or description:
output workflow generate <name>
name
string
required
Name of the workflow to generate
FlagDefaultDescription
--skeleton, -sfalseGenerate minimal skeleton without examples
--description, -dWorkflow description
--output-dir, -oworkflows/Output directory
--force, -ffalseOverwrite existing directory
--plan-file, -pPath to plan file for AI-assisted implementation
# Generate a skeleton workflow
output workflow generate lead_enrichment --skeleton

# Generate from a saved plan
output workflow generate lead_enrichment --plan-file .outputai/plans/2025_01_15_lead_enrichment/PLAN.md

output workflow list

List available workflows from the catalog:
output workflow list
output workflow list --format json --detailed
FlagDefaultDescription
--format, -flistOutput format: list, table, json
--detailed, -dfalseShow schemas and descriptions
--filterFilter by name

output workflow runs list

List recent workflow runs, optionally filtered by workflow name:
output workflow runs list
output workflow runs list lead_enrichment --limit 10
output workflow runs list lead_enrichment --format json
workflowName
string
Filter by workflow name (optional)
FlagDefaultDescription
--limit, -l100Maximum runs to return
--format, -ftableOutput format: table, json, text

output workflow run

Run a workflow synchronously and wait for the result:
output workflow run <workflowName> [scenario]
workflowName
string
required
Name of the workflow to execute
scenario
string
Scenario name — resolved from the workflow’s scenarios/ directory
FlagDefaultDescription
--input, -iJSON input or file path (overrides scenario)
--task-queue, -qTask queue name
--format, -ftextOutput format: json, text
# Using a scenario file (recommended for repeatable tests)
output workflow run lead_enrichment acme

# Using inline JSON
output workflow run lead_enrichment --input '{"companyDomain": "acme.com"}'

# Using a file path
output workflow run lead_enrichment --input ./test_input.json

output workflow start

Start a workflow asynchronously — returns the workflow ID immediately without waiting:
output workflow start <workflowName> [scenario]
workflowName
string
required
Name of the workflow to start
scenario
string
Scenario name — resolved from the workflow’s scenarios/ directory
FlagDefaultDescription
--input, -iJSON input or file path (overrides scenario)
--task-queue, -qTask queue name

output workflow status

Check whether a workflow is still running, completed, or failed:
output workflow status <workflowId>
workflowId
string
required
The workflow execution ID
FlagDefaultDescription
--format, -ftextOutput format: json, text

output workflow result

Get the output of a completed workflow:
output workflow result <workflowId>
workflowId
string
required
The workflow execution ID
FlagDefaultDescription
--format, -ftextOutput format: json, text

output workflow stop

Stop a running workflow gracefully:
output workflow stop <workflowId>
workflowId
string
required
The workflow execution ID

output workflow terminate

Force-stop a workflow immediately. Use this for stuck workflows or cleaning up after branch switches:
output workflow terminate <workflowId>
output workflow terminate wf-12345 --reason "Cleaning up old workflows"
workflowId
string
required
The workflow execution ID
FlagDefaultDescription
--reason, -rReason for termination
Unlike stop (which cancels gracefully), terminate kills the workflow immediately.

output workflow debug

Show the execution trace for a workflow — what steps ran, what they received and returned, and where failures happened. See Tracing for details on trace format.
output workflow debug <workflowId>
output workflow debug wf-12345 --format json
workflowId
string
required
The workflow execution ID
FlagDefaultDescription
--format, -ftextOutput format: json, text
Use --format json to get the full untruncated trace. The text format truncates long values for readability, but the JSON format preserves everything.

output workflow cost

Calculate the estimated dollar cost of a workflow execution from its trace. Covers LLM token costs and API service costs. See Cost Estimation for details on pricing configuration and the config/costs.yml override file.
output workflow cost <workflowId> [tracePath]
workflowId
string
required
Workflow ID to calculate cost for
tracePath
string
Path to a local trace JSON file. If omitted, fetches the latest trace for the workflow.
FlagDefaultDescription
--format, -ftextOutput format: json, text
--verbosefalseShow per-call breakdown with token counts and individual step costs
# Cost from latest trace
output workflow cost lead_enrichment_QlcADmOM

# Cost from a specific trace file
output workflow cost lead_enrichment_QlcADmOM logs/runs/lead_enrichment/2026-03-01_trace.json

# Detailed per-call breakdown
output workflow cost lead_enrichment_QlcADmOM --verbose

# Machine-readable output
output workflow cost lead_enrichment_QlcADmOM --format json
If the report shows “Unknown models”, add them to config/costs.yml in your project root. See Cost Estimation — Pricing Configuration for the format.

Evaluation Commands

These commands run offline evaluations against your workflows using the @outputai/evals package. You define evaluators, write dataset YAML files, and use these commands to execute and manage them.

output workflow test

Run evaluations against a workflow using its datasets:
output workflow test <workflowName>
workflowName
string
required
Name of the workflow to test
FlagDefaultDescription
--cachedfalseUse cached output from dataset files (skip workflow execution). Exclusive with --save
--savefalseRun workflow and save output back to dataset files. Exclusive with --cached
--dataset, -dComma-separated list of dataset names to run
--format, -ftextOutput format: text, json
# Run evals using cached output (fast — no workflow execution)
output workflow test simple --cached

# Run evals with fresh execution and save results back to datasets
output workflow test simple --save

# Run specific datasets only
output workflow test simple --dataset basic_input,edge_case

# Get JSON output for CI integration
output workflow test simple --cached --format json

Dataset Commands

output workflow dataset list

List datasets for a workflow:
output workflow dataset list <workflowName>
workflowName
string
required
Workflow name to list datasets for
FlagDefaultDescription
--format, -ftableOutput format: table, json, text
output workflow dataset list simple
output workflow dataset list simple --format json

output workflow dataset generate

Generate a dataset for a workflow from a scenario, inline JSON, trace file, or S3:
output workflow dataset generate <workflowName> [scenario]
workflowName
string
required
Name of the workflow
scenario
string
Scenario name — resolved from the workflow’s scenarios/ directory
FlagDefaultDescription
--input, -iWorkflow input as JSON string or file path (overrides scenario)
--name, -nDataset name (defaults to scenario name or trace filename)
--trace, -tPath to a local trace file to extract dataset from. Exclusive with --download
--download, -dfalseDownload traces from S3 and create datasets. Exclusive with --trace
--limit, -l5Maximum number of traces to download from S3
# Generate from a scenario
output workflow dataset generate simple basic_input

# Generate with inline JSON input
output workflow dataset generate simple --input '{"values": [1, 2, 3]}' --name custom_case

# Generate from a local trace file
output workflow dataset generate simple --trace logs/runs/simple/trace.json --name from_trace

# Download recent traces from S3 and create datasets
output workflow dataset generate simple --download --limit 10

Environment Configuration

By default, the CLI loads environment variables from .env in the current directory. To use a different env file:
# Use production environment
OUTPUT_CLI_ENV=.env.prod output workflow list

# Use staging environment
OUTPUT_CLI_ENV=.env.staging output workflow run lead_enrichment acme
VariableDefaultDescription
OUTPUT_CLI_ENV.envPath to custom env file (relative or absolute)
OUTPUT_API_URLhttp://localhost:3001Output API server URL used by workflow commands
OUTPUT_API_AUTH_TOKENAPI auth token for requests (required in production)
OUTPUT_DEBUGSet to true to enable CLI debug mode
DOCKER_SERVICE_NAMEoutput-sdkDocker Compose project name for output dev
OUTPUT_API_VERSION1.9API Docker image tag. Set to dev for local builds
OUTPUT_WORKFLOWS_DIR.Workflows subdirectory relative to project root. Set to test_workflows for monorepo dev
ANTHROPIC_API_KEYAnthropic API key for AI-assisted workflow generation (workflow plan, workflow generate)