---
title: "ezgh flags segments update"
description: "Change a segment."
---

> 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 segments update

{/* 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 segments update <key> [--name n] [--description d] [--include id…] [--exclude id…] [--rules-file rules.json] [flags]
```

Change a segment. `--include`, `--exclude` and `--rules-file` replace those lists whole (`--include` "" empties it). Every environment's flags that use it change with it. The change is conditional on the segment being as it was read.

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

## Flags

| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| `--description` | string |  | the new description |
| `--exclude` | string, repeatable |  | the excluded targetingKeys, replacing them (repeat) |
| `--include` | string, repeatable |  | the included targetingKeys, replacing them (repeat) |
| `--name` | string |  | the new display name |
| `--rules-file` | string |  | the rules, replacing them: a JSON list |

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

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