# Structured input and output (/docs/cli/input-and-output)



Most commands that call a product query, mutation, or action accept structured input.

## JSON file input [#json-file-input]

```sh
ivk j coverage --input coverage.json
```

The file must contain one JSON object. Arrays and scalar values are rejected.

## Standard input [#standard-input]

Use `-` explicitly:

```sh
ivk j coverage --input - < coverage.json
```

When standard input is not a terminal, the CLI also reads a JSON object without `--input`:

```sh
cat coverage.json | ivk j coverage
```

## Field input [#field-input]

Repeat `--field name=value` for short inputs:

```sh
ivk notifications set-preference \
  --field eventType=finding_confirmed_high_severity \
  --field inApp=true \
  --field email=false \
  --field revision=0
```

Values that parse as JSON become booleans, numbers, arrays, objects, or null. Other values remain strings. Field names begin with a letter and contain only letters and numbers.

Fields override values from the input object.

## Request IDs [#request-ids]

Write commands that support request IDs add one automatically when it is missing. Reuse a caller-provided request ID when you need idempotent retry behavior across a known operation.

## Destructive actions [#destructive-actions]

Commands that archive, remove, stop, revoke, deactivate, or delete data may require `--yes`.

```sh
ivk workspace request-deletion --input deletion.json --yes
```

Without confirmation, the CLI exits with a customer-safe error and does not perform the action.

## JSON output [#json-output]

Place `--json` before the command:

```sh
ivk --json j list
ivk --json st | jq '.status'
```

Successful JSON commands write one JSON document to standard output. Human headings, tables, spinners, and colors are disabled.

Errors use a stable code, customer-safe message, and nonzero exit status. They do not include raw provider responses, stack traces, credentials, or submitted input objects.

## Color and terminals [#color-and-terminals]

Use `--no-color` for plain human-readable output:

```sh
ivk --no-color status
```

For automation, prefer `--json` instead of parsing tables.
