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

BlockCategoryRequired configOutput fields
text_inputInteractivelabelvalue: string
selectInteractivelabelvalue: string
multi_selectInteractivelabelvalues: string[]
confirmInteractivelabelvalue: boolean
passwordInteractivelabelvalue: string
http_requestActionurlstatus, headers, body
set_variableActionvaluevalue
conditionActionexpressionresult: boolean
output_textOutputtext(none)
output_tableOutputdata(none)
output_jsonOutputdata(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.
Config
label*string
The prompt question.
placeholderstring
Hint shown in the prompt.
defaultstring
Used if the user presses Enter.
requiredboolean
Reserved for validation.
Output
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.
Config
label*string
Prompt question.
options*{label,value}[]
Choices.
defaultstring
Pre-selected value.
Output
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).
Config
label*string
Prompt question.
options*{label,value}[]
Choices.
defaultstring[]
Pre-selected values.
Output
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,logs

confirm

A yes/no prompt.
Config
label*string
The yes/no question.
defaultboolean
Default if the user presses Enter.
Output
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.
Config
label*string
Prompt question.
Output
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.
Config
methodGET|POST|PUT|PATCH|DELETE
Defaults to GET.
url*string
Absolute http(s) URL. Templates allowed.
headersobject
Request headers.
queryobject
Added as query-string params.
bodystring | object
Sent verbatim if a string, else JSON-encoded.
timeoutnumber (seconds)
Default 30.
expect.statusnumber
Fail the workflow if the status differs.
Output
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 body

set_variable

Resolves its value once and stores it for reuse — handy for renaming, composing strings, or capturing a nested field.
Config
value*string
Any template expression. May be empty string.
Output
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 string

condition

Evaluates an expression and branches. Set the true/false targets in the editor's Branches section. The result is exposed for debugging.
Config
expression*string
A comparison or boolean expression.
Output
result: booleantrue 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.
Config
text*string
The message. Templates allowed.
styledefault|info|success|warning|error
Color. Default is default.
Output
None.
{ "id": "greet", "type": "output_text",
  "config": { "text": "Hello, {{ steps.name.value }}!", "style": "success" } }

output_table

Renders an array of objects as an ASCII table.
Config
titlestring
Heading above the table.
columnsstring[]
Which keys to show. Defaults to all keys.
data*array | object
Usually {{ steps.<id>.body }}.
Output
None.
{ "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.
Config
data*any
The value to print. Usually a single {{ }} reference.
Output
None.
{ "id": "dump", "type": "output_json", "config": { "data": "{{ steps.fetch.body }}" } }