---
title: "una explain"
url: https://una-lang.org/en/docs/cli/explain/
release: v0.4.0
---

# una explain

Explain a diagnostic code.

```text
una explain [OPTIONS] <CODE>
```

## Examples

```sh
una explain U5001
```

Explain a diagnostic code, with a failing example and its fix.

## Arguments

| Argument | What it does | Default |
| --- | --- | --- |
| `<CODE>` | A diagnostic code, for example U0001 |  |

## Options

| Option | What it does | Default |
| --- | --- | --- |
| `--json` | Print machine output as JSON on stdout, and nothing else on stdout |  |
| `--color <WHEN>` | When to use colors in human output. Values: `never`: Never use colors; `auto`: Use colors when the output is a terminal; `always`: Always use colors. | `auto` |

## Specification

The normative rules, from spec/13 §5:

| Command | Meaning |
| --- | --- |
| `una explain <code>` | Explanation of a diagnostic code |




## Help text

As `una explain --help` prints it at v0.4.0:

```text
Explain a diagnostic code

Usage: una explain [OPTIONS] <CODE>

Arguments:
  <CODE>
          A diagnostic code, for example U0001

Options:
      --json
          Print machine output as JSON on stdout, and nothing else on stdout

      --color <WHEN>
          When to use colors in human output

          Possible values:
          - never:  Never use colors
          - auto:   Use colors when the output is a terminal
          - always: Always use colors

          [default: auto]

  -h, --help
          Print help (see a summary with '-h')
```
