- CLI Reference
- Commands
- ironflow subscribe
ironflow subscribe
Subscribe to real-time events via WebSocket.
ironflow subscribe [patterns...] [flags]Connects to the server’s WebSocket endpoint and streams events matching the given NATS-style patterns.
Arguments:
| Argument | Required | Description |
|---|---|---|
patterns | Yes (1+) | NATS-style topic patterns to subscribe to |
Flags:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--server | -s | string | ws://localhost:9123/ws (derived from IRONFLOW_SERVER_URL if set) | WebSocket server URL |
--replay | -r | int | 0 | Number of historical events to replay |
--json | -j | bool | false | Output events as JSON (one per line) |
--metadata | -m | bool | false | Include event metadata (timestamp, sequence) |
Examples:
# Subscribe to all run eventsironflow subscribe "system.run.>"
# Subscribe to user eventsironflow subscribe "events:order.placed"
# Multiple patterns with replayironflow subscribe --replay 10 "system.run.>" "events:>"