> For the complete documentation index, see [llms.txt](https://docs.flatredball.com/gum/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flatredball.com/gum/cli/cli/check.md).

# check

```
gumcli check <project.gumx> [--json]
```

Loads a Gum project and reports all errors, including malformed XML in element files, missing referenced files, and semantic errors such as invalid base types and missing behavior instances.

## Options

* `<project.gumx>` — Path to the `.gumx` project file
* `--json` — Output errors as a JSON array instead of human-readable text

## Examples

```
gumcli check MyProject/MyProject.gumx
gumcli check MyProject/MyProject.gumx --json
```

## Output

**No errors (human-readable):**

```
No errors found.
```

**Errors found (human-readable):**

```
error: ButtonComponent: Base type 'ButtonBase' not found.
warning: SliderComponent: Variable 'Thumb Width' references a missing variable.

2 error(s) found.
```

Each line follows the format: `<severity>: <element>: <message>`

**JSON output:**

```json
[
  {
    "element": "ButtonComponent",
    "message": "Base type 'ButtonBase' not found.",
    "severity": "Error"
  },
  {
    "element": "SliderComponent",
    "message": "Variable 'Thumb Width' references a missing variable.",
    "severity": "Warning"
  }
]
```

## Exit Codes

| Code | Meaning                                  |
| ---- | ---------------------------------------- |
| 0    | No errors found                          |
| 1    | One or more errors found                 |
| 2    | Project `.gumx` file could not be loaded |

{% hint style="info" %}
Warnings are included in the output but do not cause a non-zero exit code. Only items with severity `Error` result in exit code 1.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.flatredball.com/gum/cli/cli/check.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
