---
title: "ezgh flags export"
description: "Write an environment's flags as a flagd snapshot."
---

> 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 flags export

{/* 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 flags export --env <environment> [flags]
```

Write an environment's current compiled flags to stdout, as flagd's flag-definition JSON: the file EZGH's server providers take as a bootstrap (bootstrapPath) or run on alone (offline: true), and that flagd itself serves. It's what server SDK keys read, rules included.

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

## Examples

```sh
ezgh flags export --env production > flags.json
```

## Flags

| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| `--env` | string |  | the environment's key (required) |

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

Source: https://docs.ezghcloud.com/cli/reference/flags-export/index.mdx
