# App flows (experimental)

[View as human](https://replume.dev/docs/flows/)

**Experimental in 0.2.13.** The file format and output may change.

A flow compares HTTP requests at task start and after the change.

Set the startup command in `.replume/config`:

```yaml
flows:
  start: npm run dev
```

Save a flow such as this in `.replume/flows/charge.yaml`. This example needs the demo app’s routes:

```yaml
name: charge
requests:
  - name: health
    method: GET
    path: /health
    expect:
      status: 200
      body: ok
replay:
  n: 4
  method: POST
  path: /charge
  headers:
    Idempotency-Key: order-1
  body: "{}"
  side_effect:
    method: GET
    path: /charges?key=order-1
    count_at: count
    expect_count: 1
```

From the repository, run:

```sh
replume flow
```

The replay sends the same charge request four times at once, then reads `count` from the follow-up response. More than one charge is flagged as a duplicate. Use test data and a disposable service for checks that write data.

For a Node app, Replume uses Docker when the daemon and the local image are ready. Python start commands and Node apps without local Docker and the image use a temporary working copy. The working copy is not a security sandbox. Results are saved in `.replume/reports/flows.json` and shown under **Flows** in a later session report. Flows do not change the verdict. Set `flows.on_stop: true` in `.replume/config` to run them when Replume writes the session report.
