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
snizu function run [dir] [--input sample.json]Flags
[dir]pathThe function's folder. The current one by default.--inputfileThe JSON to give it. The folder'ssample.jsonby 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
$ 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:
$ 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