# function run

> Run one of your checkout functions on this machine, with no network, and check its answer.

Source: https://storeware.ai/docs/cli/commands/function-run

```bash
npx @storeware/cli function run <handle> [manifest] [flags]
```

## Arguments

| Argument | Required | What it is |
| --- | --- | --- |
| `<handle>` | Yes | The function, by the handle it has under `[[functions]]` in the manifest. |
| `[manifest]` | No | The manifest. `storeware.app.toml` in this directory when not given. |

## Flags

| Flag | What it does |
| --- | --- |
| `--input <file>` | A JSON file to hand it. A sample for its kind when not given. |
| `--json` | Print the answer, the time it took and any problems as JSON, for a script. |

## Examples

```bash
npx @storeware/cli function run volume_discount
npx @storeware/cli function run volume_discount --input basket.json
```

More in [Checkout functions](https://storeware.ai/docs/build-apps/checkout-functions). Every command also takes the [flags on the reference page](https://storeware.ai/docs/cli/commands#flags-every-command-takes).
