Block reference
Every block has a config (what you set in the editor) and an output (the data later steps read through {{ steps.<id>.<field> }} — see Templates). Output blocks produce nothing. The output field names are not all the same — note multi_select uses values and condition uses result.
Quick reference
| Block | Category | Required config | Output fields |
|---|---|---|---|
| text_input | Interactive | label | value: string |
| select | Interactive | label | value: string |
| multi_select | Interactive | label | values: string[] |
| confirm | Interactive | label | value: boolean |
| password | Interactive | label | value: string |
| http_request | Action | url | status, headers, body |
| set_variable | Action | value | value |
| condition | Action | expression | result: boolean |
| output_text | Output | text | (none) |
| output_table | Output | data | (none) |
| output_json | Output | data | (none) |
Interactive blocks
Interactive blocks prompt the user. When the binary runs without a TTY (e.g. in CI), each prompt is answered from --input <id>=<value> or a CLIFLOW_INPUT_<id> env var instead — see the guide.
text_input
— Prompts for a single line of text.| label* | string The prompt question. |
| placeholder | string Hint shown in the prompt. |
| default | string Used if the user presses Enter. |
| required | boolean Reserved for validation. |
value: string — the text the user typed (or the default).{ "id": "name", "type": "text_input", "config": { "label": "Your name" } }
// read later: {{ steps.name.value }}select
— Single-choice menu. The output is the chosen option's value, not its label.| label* | string Prompt question. |
| options* | {label,value}[] Choices. |
| default | string Pre-selected value. |
value: string — the value of the chosen option.{ "id": "env", "type": "select", "config": {
"label": "Environment",
"options": [ { "label": "Production", "value": "prod" }, { "label": "Staging", "value": "stg" } ]
}}
// {{ steps.env.value }} -> "prod" or "stg"multi_select
— Multi-choice menu. Note the output is plural: values (an array).| label* | string Prompt question. |
| options* | {label,value}[] Choices. |
| default | string[] Pre-selected values. |
values: string[] — the chosen values. Index one with {{ steps.<id>.values[0] }}.{ "id": "addons", "type": "multi_select", "config": {
"label": "Add-ons", "options": [ { "label": "Auth", "value": "auth" }, { "label": "Logs", "value": "logs" } ]
}}
// {{ steps.addons.values }} -> array
// {{ steps.addons.values[0] }} -> first picked value
// non-interactive --input: --input addons=auth,logsconfirm
— A yes/no prompt.| label* | string The yes/no question. |
| default | boolean Default if the user presses Enter. |
value: boolean. In templates it stringifies to true / false.{ "id": "proceed", "type": "confirm", "config": { "label": "Continue?", "default": false } }
// {{ steps.proceed.value }} -> "true" or "false"
// non-interactive --input: --input proceed=true (also: 1, y, yes)password
— Masked input for secrets. Never echo the value.| label* | string Prompt question. |
value: string — the secret.{ "id": "api_key", "type": "password", "config": { "label": "API key" } }
// in CI, prefer an env var over --input (which is visible in `ps`):
// export CLIFLOW_INPUT_api_key=sk_...
// then {{ steps.api_key.value }} resolves without the prompt.Action blocks
Action blocks compute or branch. They run without user interaction. Conditions expose their result on the result field and route to the branch whose target you set in the editor.
http_request
— Calls an HTTP API. The response body is parsed as JSON when the response Content-Type includes application/json; otherwise it is a string.| method | GET|POST|PUT|PATCH|DELETE Defaults to GET. |
| url* | string Absolute http(s) URL. Templates allowed. |
| headers | object Request headers. |
| query | object Added as query-string params. |
| body | string | object Sent verbatim if a string, else JSON-encoded. |
| timeout | number (seconds) Default 30. |
| expect.status | number Fail the workflow if the status differs. |
status: number, headers: object, body: parsed JSON or string.The compiled binary blocks requests to private/loopback/link-local addresses (SSRF guard). To allow internal addresses, set CLIFLOW_ALLOW_PRIVATE_HTTP=1. In the browser simulator, requests are also subject to CORS.
{ "id": "fetch", "type": "http_request", "config": {
"method": "GET",
"url": "https://api.github.com/users/{{ steps.name.value }}",
"headers": { "Accept": "application/vnd.github.v3+json" },
"expect": { "status": 200 }
}}
// {{ steps.fetch.status }} -> 200
// {{ steps.fetch.body.login }} -> the "login" field from the JSON bodyset_variable
— Resolves its value once and stores it for reuse — handy for renaming, composing strings, or capturing a nested field.| value* | string Any template expression. May be empty string. |
value — the resolved value. If the whole field is a single {{ }}, the original typed value (object, number, array) is kept rather than stringified.{ "id": "login", "type": "set_variable", "config": { "value": "{{ steps.fetch.body.login }}" } }
// {{ steps.login.value }} -> the login stringcondition
— Evaluates an expression and branches. Set the true/false targets in the editor's Branches section. The result is exposed for debugging.| expression* | string A comparison or boolean expression. |
result: boolean — true routes to the branches.true target, else branches.false.{ "id": "ok", "type": "condition",
"config": { "expression": "{{ steps.fetch.status }} == 200" },
"branches": { "true": "show", "false": "err" } }
// {{ steps.ok.result }} -> "true" / "false"
// See the Templates page for the full expression grammar and its limits.Output blocks
Output blocks render to the terminal. They produce no output for later steps, so you cannot template off them. Put them at the end of a flow (or branch).
output_text
— Prints a message, optionally colored.| text* | string The message. Templates allowed. |
| style | default|info|success|warning|error Color. Default is default. |
{ "id": "greet", "type": "output_text",
"config": { "text": "Hello, {{ steps.name.value }}!", "style": "success" } }output_table
— Renders an array of objects as an ASCII table.| title | string Heading above the table. |
| columns | string[] Which keys to show. Defaults to all keys. |
| data* | array | object Usually {{ steps.<id>.body }}. |
{ "id": "tbl", "type": "output_table", "config": {
"title": "User",
"columns": [ "login", "followers" ],
"data": "{{ steps.fetch.body }}" } }output_json
— Pretty-prints a value as indented JSON. Use it to inspect an API response or any computed value.| data* | any The value to print. Usually a single {{ }} reference. |
{ "id": "dump", "type": "output_json", "config": { "data": "{{ steps.fetch.body }}" } }