# Text and JSON

> How a person and a script read the same command.

Web page: /docs/cli/output/

Every command can print for a person or for a script. Pass `--output text` or `--output json`. Any other value exits 1. The default is `text`, which is the form you read in a terminal.

**Text**

A person reads aligned labels or a table. Errors go to stderr as `error: code: message`. A request id is printed only when `DFLOW_DEBUG=1`.

**JSON**

Success and failure are one JSON document on stdout. A script should read this and ignore the text table. A failure looks like this:

```json
{"error":{"code":"forbidden","message":"forbidden","request_id":"req_123"}}
```

The process exit code is still set. Read `request_id` from that JSON when you need to report the call.

Use `--output json` in CI and in an editor. The exit code still tells you whether the command worked. The meanings are on [Exit codes](/docs/cli/exit-codes).
