---
title: "ezgh deploy validate"
description: "Check an EZGHDeploy file."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.ezghcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ezgh deploy validate

{/* Generated by ezgh-cli's internal/tools/clidocs from the ezgh command tree. Don't edit: change the command's help in ezgh-cli and regenerate. */}

```sh
ezgh deploy validate [file] [flags]
```

Check an EZGHDeploy file: the checkout's, or the file named. Every problem is printed with its place in the file, the reason and an example that would be accepted; the exit code is 1 when there is one. The file is checked here, without a request.

With `--environment`, the environment must be in the file. Whether it may deploy its branch into its project is checked by Deploy when the stack is registered and on each push.

Part of [`ezgh deploy`](/cli/reference/deploy).

## Examples

```sh
ezgh deploy validate
ezgh deploy validate --environment staging
```

## Flags

| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| `--environment` | string |  | also check this environment is in the file |

Inherited from parent commands:

| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| `--dir` | string | `.` | the repository's checkout (any directory inside it) |
| `--json` | boolean |  | print JSON, as -o json does |

This command also takes the [global flags](/cli/reference#global-flags).

Source: https://docs.ezghcloud.com/cli/reference/deploy-validate/index.mdx
