> ## 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 と自動化

> 1つの provider に依存せず task を作成・dispatch し、structured result を集めます。

`dure` CLI は workspace と同じ app channel を使います。Orchestration command は
terminal input に永続的な task/message identity を加え、dispatch、完了 result、
heartbeat、escalation、human decision gate を区別します。

CLI を使う前に対象 channel で Dure を一度起動し registry を作ります。Dure 内で
開いた terminal は正しい channel を自動継承します。

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

# 直前の command が出力した ID に t7 を置き換えます。
dure orch dispatch --task t7 --to review-agent --inject

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

`task-create` は作業を記録するだけで provider を開始しません。
`dispatch --inject` は登録済み local agent pane に assignment も入力します。

Dure には local automation 用の loopback receipt-based spawn API もあります。Request
は journal に記録されるため、crash 後も timeout を失敗と推測せず receipt で
reconcile できます。

<Warning>
  Mailbox は1つの Dure app channel 内の local service で、hosted queue ではありません。
  SSH agent はまだ直接参加せず、`@all` は recipient ごとの acknowledgement を持ちません。
</Warning>

詳しい pattern は[マルチエージェント連携](/jp/orchestration)を参照してください。
