Control Flow

retry, when, and forEach — alineo's built-in workflow control-flow primitives.

control-flow

Demonstrates all of alineo's built-in workflow control-flow primitives in a single sandbox.

Setup

bunx alineo-cli init   # starts OpenSandbox in Docker (one-time setup)

Run

bun install
bun start

What it shows

PrimitiveDescription
retryRetries a flaky command up to 5 times with exponential backoff
whenBranches conditionally based on the previous exec's exit code
forEachIterates over a list, running a command per item