# Parameters and input files

> How the Nodaro CLI turns repeated --param and --input key=value pairs into a request body, how values get their type, and when to send a JSON file instead.

Source: https://nodaro.ai/docs/developers/cli/params

**Parameters** are the values you pass to a run on the command line. `nodaro nodes run` takes them as `--param key=value` and `nodaro apps run` as `--input key=value`. Both flags repeat, both follow the same rules, and a JSON file with `--params-file` covers anything that does not fit on a flag.

## Write key=value pairs

Repeat the flag once per value. Quote a value that contains spaces, so the shell passes it as one argument.

```bash
nodaro nodes run generate-video \
  --param prompt="a paper boat drifting down a rainy street" \
  --param provider=seedance-2-fast \
  --param duration=8
```

The CLI gives each value a type before it sends the request:

| You type | The request body gets |
| --- | --- |
| `true` or `false` | A boolean |
| `null` | `null` |
| A whole number, such as `8` | A number |
| A decimal number, such as `0.5` | A number |
| A value that starts with `[` or `{` and is valid JSON | A JSON array or object |
| Anything else | A string |

Only the first `=` separates the key from the value. The rest of the text is kept, so `--param query=a=b=c` sends the string `a=b=c`.

An inline JSON array looks like this. Wrap the pair in single quotes, so the shell keeps the double quotes:

```bash
nodaro nodes run generate-image --param prompt="the same mug on a marble counter" --param 'referenceImageUrls=["https://example.com/mug-front.png","https://example.com/mug-side.png"]'
```

To find the keys a node accepts, run `nodaro nodes get <type>`. For an app, run `nodaro apps get <slug>`.

## Send a JSON file

For nested objects, long arrays or any value that does not fit the flag form, write the whole body to a JSON file and pass it with `--params-file`. The file must contain one JSON object.

```bash
cat > body.json <<'EOF'
{
"prompt": "a lighthouse on a cliff at dawn, cinematic",
"provider": "flux",
"aspectRatio": "16:9"
}
EOF

nodaro nodes run generate-image --params-file body.json --param aspectRatio=9:16
```

Flags override the file. In this example, the run uses the `9:16` aspect ratio from the flag, and the rest of the body from the file.

## Set app inputs and raw node fields

`nodaro apps run` takes the app's input names as keys:

```bash
nodaro apps run hair-styler-dd3erw --input prompt="curly red hair" --watch
```

`--override` reaches node fields that the app does not expose, for this run only. Write it as `<nodeId>.<field>=<value>`:

```bash
nodaro apps run hair-styler-dd3erw --input prompt="curly red hair" \
  --override n1.promptPrefix="Studio portrait of" --override n1.promptSuffix=", 85mm, soft light"
```

This example wraps the user's prompt with hidden text before and after it. See [Prompt pre and post text](https://nodaro.ai/docs/concepts/prompt-pre-post-text). An override can never change where a node sends or fetches data, such as the address of a [Webhook Output](https://nodaro.ai/docs/nodes/publish/webhook-output) node; the run is refused with `locked_field`.

## Run input and source nodes

Input and source nodes run the same way. [Web Scrape](https://nodaro.ai/docs/nodes/automate/web-scrape), `web-scrape`, takes its source as `actor`: `google-search`, `content-crawler`, `rss` or `tiktok`.

```bash
# Google Search results
nodaro nodes run web-scrape --param actor=google-search --param query="running shoes" --param maxResults=5

# The text of one web page, as Markdown
nodaro nodes run web-scrape --param actor=content-crawler --param url=https://example.com --param mode=page
```

On a self-hosted install, Web Scrape needs `APIFY_API_TOKEN` on the server, or a [connection to Nodaro Cloud](https://nodaro.ai/docs/self-hosting/cloud-connect) that runs and bills the scrape.

## Frequently asked questions

### How does the Nodaro CLI decide whether a value is a number or a string?

The words true and false become booleans, null becomes null, and whole numbers and decimals become numbers. A value that starts with a square bracket or a curly brace becomes a JSON array or object when it is valid JSON. Everything else stays a string.

### Can a --param value contain an equals sign?

Yes. Only the first equals sign separates the key from the value, so --param query=a=b=c sends the value a=b=c.

### When should I use --params-file instead of --param?

Use a JSON file for nested objects, long arrays or any value that is hard to type as a flag. Flags on the same command override the keys they share with the file.

### What is the difference between --param and --input?

Use --param with nodaro nodes run, where the keys are the node's input fields. Use --input with nodaro apps run, where the keys are the app's input names. Both flags follow the same syntax.
