Workflow Commands

The cre workflow commands manage workflows throughout their entire lifecycle, from local testing to deployment and ongoing management.

cre workflow simulate

Compiles your workflow to WASM and executes it in a local simulation environment. This is the core command for testing and debugging your workflow.

Usage:

cre workflow simulate <workflow-name-or-path> [flags]

Arguments:

  • <workflow-name-or-path> โ€” (Required) Workflow folder name (e.g., my-workflow) or path (e.g., ./my-workflow). When run from the project root, you can use just the folder name. The CLI looks for a workflow.yaml file in the workflow directory.

Flags:

Flag
Description
--broadcastBroadcast onchain write transactions (default: false). Without this flag, a dry run is performed
-g, --engine-logsEnable non-fatal engine logging
--non-interactiveRun without prompts; requires --trigger-index and inputs for the selected trigger type
--trigger-index <int>Index of the trigger to run (0-based). Required when using --non-interactive
--http-payload <string>HTTP trigger payload as JSON string or path to JSON file (with or without @ prefix)
--evm-tx-hash <string>EVM trigger transaction hash (0x...). For EVM log triggers
--evm-event-index <int>EVM trigger log index (0-based). For EVM log triggers

Examples:

  • Basic simulation

    cre workflow simulate ./my-workflow --target local-simulation
    
  • Broadcast real onchain transactions

    cre workflow simulate ./my-workflow --broadcast --target local-simulation
    

cre workflow deploy

Deploys a workflow to the Workflow Registry contract. This command compiles your workflow, uploads the artifacts to the CRE Storage Service, and registers the workflow onchain.

Usage:

cre workflow deploy <workflow-name-or-path> [flags]

Arguments:

  • <workflow-name-or-path> โ€” (Required) Workflow folder name (e.g., my-workflow) or path (e.g., ./my-workflow)

Flags:

Flag
Description
-r, --auto-startActivate the workflow immediately after deployment (default: true)
-o, --outputOutput file for the compiled WASM binary encoded in base64 (default: "./binary.wasm.br.b64")
--unsignedReturn the raw transaction instead of sending it to the network
--yesSkip the confirmation prompt and proceed with the operation

Examples:

  • Deploy workflow with auto-start (default behavior)

    cre workflow deploy my-workflow --target production-settings
    
  • Deploy without auto-starting

    cre workflow deploy my-workflow --auto-start=false --target production-settings
    
  • Deploy and save the compiled binary to a custom location

    cre workflow deploy my-workflow --output ./dist/workflow.wasm.br.b64
    

For more details, see Deploying Workflows.

cre workflow activate

Changes the workflow status to active on the Workflow Registry contract. Active workflows can respond to their configured triggers.

Usage:

cre workflow activate <workflow-name-or-path> [flags]

Arguments:

  • <workflow-name-or-path> โ€” (Required) Workflow folder name (e.g., my-workflow) or path (e.g., ./my-workflow)

Flags:

FlagDescription
--unsignedReturn the raw transaction instead of sending it to the network
--yesSkip the confirmation prompt and proceed with the operation

Example:

cre workflow activate ./my-workflow --target production-settings

For more details, see Activating & Pausing Workflows.

cre workflow pause

Changes the workflow status to paused on the Workflow Registry contract. Paused workflows will not respond to triggers.

Usage:

cre workflow pause <workflow-name-or-path> [flags]

Arguments:

  • <workflow-name-or-path> โ€” (Required) Workflow folder name (e.g., my-workflow) or path (e.g., ./my-workflow)

Flags:

FlagDescription
--unsignedReturn the raw transaction instead of sending it to the network
--yesSkip the confirmation prompt and proceed with the operation

Example:

cre workflow pause ./my-workflow --target production-settings

For more details, see Activating & Pausing Workflows.

cre workflow delete

Deletes a workflow from the Workflow Registry.

Usage:

cre workflow delete <workflow-name-or-path> [flags]

Arguments:

  • <workflow-name-or-path> โ€” (Required) Workflow folder name (e.g., my-workflow) or path (e.g., ./my-workflow)

Flags:

FlagDescription
--unsignedReturn the raw transaction instead of sending it to the network
--yesSkip the confirmation prompt and proceed with the operation

Example:

cre workflow delete ./my-workflow --target production-settings

For more details, see Deleting Workflows.

Workflow lifecycle

The typical workflow lifecycle uses these commands in sequence:

  1. Develop locally โ€” Write and iterate on your workflow code
  2. cre workflow simulate โ€” Test your workflow in a local simulation environment
  3. cre workflow deploy โ€” Deploy your workflow to the registry (auto-starts by default)
  4. cre workflow pause / cre workflow activate โ€” Control workflow execution as needed
  5. cre workflow deploy (again) โ€” Deploy updates (replaces the existing workflow)
  6. cre workflow delete โ€” Remove the workflow when no longer needed

Learn more

Get the latest Chainlink content straight to your inbox.