Deployment

CLI Commands

Command reference for worker and deployment lifecycle operations

Overview

Workflow Studio CLI provides worker lifecycle commands and deployment artifact lifecycle commands.

Worker commands

Validate worker configuration

npx workflow-studio worker check-config

Exit codes:

  • 0 — valid configuration
  • 2 — valid with warnings (e.g. empty seed key secrets)
  • 1 — invalid configuration

Start worker

npx workflow-studio worker start

Optional flags:

npx workflow-studio worker start \
  --config ./workflow.config.ts \
  --port 3001 \
  --host 0.0.0.0 \
  --require-https true

Deployment artifact commands

These four commands form the deployment pipeline: compile your workflow functions into JS bundles, package them into an archive, upload to the server, and activate.

Build workflow bundles

npx workflow build

Build deployment artifact

npx workflow-studio compute build

Outputs the generated deployment ID and manifest path to stdout:

Built artifact: .workflow-studio/dist/artifact.tgz
Deployment ID: dep_abc123...
Manifest: .workflow-studio/tmp/dep_abc123.../manifest.json

Use the printed Deployment ID in subsequent deploy and activate commands.

Deploy artifact

npx workflow-studio compute deploy \
  --artifact .workflow-studio/dist/artifact.tgz \
  --manifest .workflow-studio/tmp/<deploymentId>/manifest.json \
  --url "$WORKFLOW_COMPUTE_BASE_URL" \
  --api-key "$WORKFLOW_COMPUTE_API_KEY"

Activate deployment

npx workflow-studio compute activate \
  --deployment-id <deploymentId> \
  --url "$WORKFLOW_COMPUTE_BASE_URL" \
  --api-key "$WORKFLOW_COMPUTE_API_KEY"

Roll back deployment

npx workflow-studio compute rollback \
  --deployment-id <deploymentId> \
  --url "$WORKFLOW_COMPUTE_BASE_URL" \
  --api-key "$WORKFLOW_COMPUTE_API_KEY"

Validate remote ownership

npx workflow-studio compute validate-ownership \
  --url "$WORKFLOW_COMPUTE_BASE_URL" \
  --api-key "$WORKFLOW_COMPUTE_API_KEY" \
  --strict \
  --app-url "https://your-app.example.com"

Optional:

  • --config ./workflow.config.ts to load typed remoteWorldTarget from config.

Exit codes

worker check-config

  • 0 — valid configuration
  • 2 — valid with warnings
  • 1 — invalid configuration

compute validate-ownership

  • 0 — all checks passed
  • 2 — warnings only (no hard failures)
  • 1 — hard failure

Typical rollout sequence

This is the canonical rollout procedure for deploying workflow code to a remote compute worker. Other pages link here for brevity.

  1. npx workflow-studio worker check-config
  2. npx workflow-studio worker start
  3. npx workflow build
  4. npx workflow-studio compute build
  5. npx workflow-studio compute deploy
  6. npx workflow-studio compute activate
  7. npx workflow-studio compute validate-ownership --strict