# marmot explain (/docs/commands/explain)

<!-- Generated by scripts/gen.mjs from `marmot explain --help` and scripts/commands.mjs. Do not edit by hand. -->

Show what an error code means, an example of the mistake and the fix. With no code, list all codes.

```text title="Usage"
marmot explain [CODE] [flags]
```

## Examples [#examples]

```sh
marmot explain M0014
marmot explain -json M0002
```

Every diagnostic marmot prints has a stable code, such as `M0014`. `marmot explain CODE` says
what it means, shows code with the mistake and the same code fixed, and gives the usual fix.
With no code it lists all of them. `-json CODE` writes `{code, title, text, wrong, right, fix}`
to stdout.

Every code is on the [error codes](/docs/diagnostics/codes) page.

## Flags [#flags]

Flags take one dash or two: `-release` and `--release` are the same.

| Flag | Meaning |
| --- | --- |
| `-color string` | color in human output: auto, always or never (NO_COLOR turns auto off) (default "auto") |
| `-json` | machine readable output: JSON Lines on stderr (also $MARMOT_OUTPUT=json, and the default under coding agents) |

## Full help [#full-help]

```text title="marmot explain --help"
Show what an error code means, an example of the mistake and the fix. With no code, list all codes.

Usage:
  marmot explain [CODE] [flags]

Examples:
marmot explain M0014
marmot explain -json M0002

Flags:
      --color string   color in human output: auto, always or never (NO_COLOR turns auto off) (default "auto")
  -h, --help           help for explain
      --json           machine readable output: JSON Lines on stderr (also $MARMOT_OUTPUT=json, and the default under coding agents)
```