> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dureai.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI and automation

> Create tasks, dispatch work, collect structured results, and automate Dure without coupling to one provider.

## What it enables

The `dure` CLI uses the same app channel as the workspace. Its orchestration
commands add durable task and message identity around terminal input: dispatch,
completion results, heartbeats, escalations, and human decision gates.

Launch Dure once in the target app channel before using the CLI so its registry
exists. A terminal opened inside Dure inherits the correct channel.

## A minimal task loop

```sh theme={"system"}
dure orch task-create \
  --title "Review the reconnect diff" \
  --spec "Check behavior, tests, and rollback. Return findings only."

# Replace t7 with the ID printed above.
dure orch dispatch --task t7 --to review-agent --inject

dure orch check --wait \
  --types worker_done,escalation,decision_gate \
  --timeout 900
```

`task-create` records work; it does not start a provider. `dispatch --inject`
also sends the assignment into a registered local agent pane. Without
`--inject`, the assignment and message are persisted without terminal input.

## Headless spawn

Dure also exposes a loopback, receipt-based spawn API for local automation. A
spawn request is journaled so callers can reconcile the outcome after a crash
instead of assuming that a timed-out request failed. Treat the app registry and
receipt as the authority; do not script pane pixels.

## Current boundary

The mailbox is local to one Dure app channel. It is not a hosted queue, and SSH
agents do not directly join it yet. Use an explicit recipient when delivery to
one agent is required; `@all` does not track a separate acknowledgement for
every recipient.

For message semantics and more patterns, read
[Multi-agent orchestration](/en/orchestration).
