Ignitify.dev
Pass input and read results
Guides

Pass input and read results

Send JSON to a run with --payload. Read what the task returns with run:get.

1 · Read the payload in your task

The first argument of run is the payload, and what you return is the result.

index.ts
export async function run(payload, _ctx) {
  console.log("hello from run, name =", payload.name);
  return { greeting: `hello ${payload.name ?? "world"}` };
}

2 · Set a default payload

run.payload in task.yaml is the input when you pass none.

task.yaml
run:
  payload: { name: "world" }

3 · Pass a payload for one run

--payload replaces the default for this run only. It must be valid JSON.

terminal
$ ignitify task:run hello --payload '{"name":"Ada"}'✓ Run Submittedrun_id       019fdec1-7a40-7c3e-9b1d-3e5f0a8c4d21resource_id  run_Qm3TbX8kLw2Zstatus       PENDING

4 · Read the result

run:get prints the run and its Result. A failed run shows the error there.

terminal
$ ignitify run:get run_Qm3TbX8kLw2ZRun Detailsid           019fdec1-7a40-7c3e-9b1d-3e5f0a8c4d21resource_id  run_Qm3TbX8kLw2Zstatus       COMPLETEDtask_name    hellopreset       std.microtimeout_sec  120created_at   2026-10-14T18:51:01.241ZResult:  {    "greeting": "hello Ada"  }

5 · Read the logs

run:logs prints the console output of the run. Your own console.log lines start with [task].

terminal
$ ignitify run:logs run_Qm3TbX8kLw2Z | grep '\[task\]'[task] INFO: hello from run, name = Ada

6 · Stay inside the size limits

A payload is at most 10 KiB and a result at most 10 KiB. The CLI refuses a payload that is too big before it sends it.

terminal
$ ignitify task:run hello --payload "$(cat big.json)"Error: payload is <n> bytes; the limit is <n> bytes