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-configExit codes:
0— valid configuration2— valid with warnings (e.g. empty seed key secrets)1— invalid configuration
Start worker
npx workflow-studio worker startOptional flags:
npx workflow-studio worker start \
--config ./workflow.config.ts \
--port 3001 \
--host 0.0.0.0 \
--require-https trueDeployment 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 buildBuild deployment artifact
npx workflow-studio compute buildOutputs 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.jsonUse 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.tsto load typedremoteWorldTargetfrom config.
Exit codes
worker check-config
0— valid configuration2— valid with warnings1— invalid configuration
compute validate-ownership
0— all checks passed2— 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.
npx workflow-studio worker check-confignpx workflow-studio worker startnpx workflow buildnpx workflow-studio compute buildnpx workflow-studio compute deploynpx workflow-studio compute activatenpx workflow-studio compute validate-ownership --strict