Run flows

For AI agents: this page is Markdown at https://squiggle.sh/docs/run.md. Every docs page is listed at https://squiggle.sh/llms.txt, and all of them are one file at https://squiggle.sh/llms-full.txt.

Run a flow from the terminal or Studio, run a whole folder of flows across simulators, and re-run a flow every time you save it.

Run one flow

Terminal
squiggle flow checkout                   # by name, from .squiggle/flows/squiggle flow ./e2e/checkout.yaml        # by pathsquiggle flow - < generated.yaml         # from standard inputsquiggle flow checkout --fresh           # relaunch the app first

Each step prints as it runs, then the result. When a run fails, it names the failing step and saves a screenshot of the simulator under it. Before running again after a failure, use --fresh: the failed run left the app wherever it stopped.

Terminal
squiggle flow loginflow login 19 steps · direct · in-process taps  ✔  0 tap                 tap text=Sign in                         259ms  ✔  1 type                enter email — type testID=email-input    1.3s  …  ✔ 18 assert              Welcome back — 1 assertion(s)               1ms  ✔ PASS  19 of 19 steps  11.6s

In Studio, open the Flows screen and press Replay on a flow. Each step’s result appears next to the simulator.

Run a flowStudio tour · 5 steps

Re-run on every save

Terminal
squiggle watch checkout

watch keeps the connection to the app open, so each re-run starts at once. If you save during a run, it finishes that run and then runs again, so the app is never left mid-step.

Run a folder of flows

Terminal
squiggle flows ./.squiggle/flows/smoke --shards 4

squiggle flows runs every flow in a folder and splits them across the booted simulators, so the suite gets faster with each one you add. --clone-from <udid> clones a simulator to make more. --agentic or --scripted runs one kind of flow.

Why runs are fast

Most test runners sleep after every step, long enough for the slowest screen. Squiggle watches the app, and moves on as soon as it stops moving:

Three steps, two ways to wait
Fixed sleep after each step1.98 s
Squiggle: act when the app stops moving0.87 s
  • the step
  • the screen is still moving
  • waiting for nothing

This needs the app launched with Squiggle attached (Studio and squiggle up do it). Without it, flows still run, but nothing in the app answers when Squiggle asks whether it has stopped moving: each wait moves on after three unanswered checks, so a step can act while a screen is still animating. The Run settings page lists the flags that change how steps are delivered and how long they wait.

More