- CLI Reference
- Commands
- ironflow invoke
ironflow invoke
Directly invoke a function by ID.
ironflow invoke <function-id> [flags]By default, the command is synchronous — it blocks until the function completes and prints the output. Use --no-wait to fire-and-forget.
Under the hood, invoke emits a synthetic event ironflow.invoke.<function-id> and auto-registers a trigger for it on the target function if one doesn’t already exist.
Arguments:
| Argument | Required | Description |
|---|---|---|
function-id | Yes | The function to invoke (e.g., process-order) |
Flags:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--data | -d | string | Inline JSON input data (defaults to {}) | |
--data-file | -f | string | Path to JSON file containing input data | |
--metadata | -m | string[] | Key=value metadata pairs (repeatable); ignored unless --no-wait | |
--no-wait | bool | false | Fire-and-forget (don’t wait for result) | |
--timeout | -t | duration | 30s | Max wait time |
--json | bool | false | Output as JSON instead of human-friendly text | |
--server | -s | string | Server URL override |
Data input follows the same rules as emit (flag vs file vs stdin, error on conflict, default {}).
--metadata only reaches the run in fire-and-forget mode. The synchronous path
(the default) sends no metadata and prints a warning when you pass some.
Examples:
# Invoke and wait for result (default)ironflow invoke process-order --data '{"order_id": "123"}'
# Fire-and-forgetironflow invoke send-notification --data '{"user_id": "456"}' --no-wait
# With custom timeoutironflow invoke generate-report --data '{}' --timeout 120s
# Pipe from filecat complex-input.json | ironflow invoke generate-report
# JSON outputironflow invoke process-order --data '{"order_id": "123"}' --jsonOutput (sync):
Invoking process-order (timeout: 30s)...✓ process-order completed in 1200ms Output: {"order_confirmed":true}Output (—no-wait):
Invoked process-order (event: evt_01HN8K3X5Y)Run ID: run_abc123