Skip to content

snizu function run

Run a built function on this machine with an input and see what it answers. A quick check before it goes on a store, not the platform's sandbox.

Node 22+1 min read

Usage

Usage
snizu function run [dir] [--input sample.json]

Flags

  • [dir]path
    The function's folder. The current one by default.
  • --inputfile
    The JSON to give it. The folder's sample.json by default.

It runs dist/function.wasm the way the platform does: the input on standard input, the answer read from standard output, and nothing else to reach. Build it first with snizu function build.

Examples

Terminal
$ snizu function run
{"discounts":[{"title":"10% off","value":{"percentage":10},"target":"order"}]}
! This is a quick check: the fuel and memory limits only apply on the server.

Try another cart by writing it to a file:

Terminal
$ snizu function run --input small-cart.json
{"discounts":[]}
! This is a quick check: the fuel and memory limits only apply on the server.

Was this page helpful?

Updated 25 Nov 2026