---
# @generated by sylphx-gen 0.1.0 from contracts@e145cc7cf1bc9605f2b27439e5e17ed76a1a2fd7e7021906a013f7565e4a0cd5. Do not edit.
title: "sylphx config config_segments"
description: "The sylphx config config_segments commands of Sylphx Config: every verb, with its argument, its flags and a run line."
type: reference
product: flags
summary: "Every sylphx config config_segments command: its argument, its flags and a run line."
updated: 2026-09-28
nav: false
---

The `config_segments` commands of Sylphx Config, as the CLI spells them: the same
calls as [the `config_segments` API page](/docs/api/config_segments), typed for the
shell. [Install, sign in and the grammar](/docs/cli) are on the CLI index.

## get

Gets a config segment.

**`NAME`** — the resource's name; a bare id is enough below the linked
project.

**CLI**

```bash
sylphx config config-segments get orgs/acme/projects/shop/envs/production/config_segments/config-segment
```

`GET https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/config_segments/config-segment` · scope `config:read` · effect `read` · [Request, response and examples](/docs/api/config_segments/get)

## list

Lists config segments in an environment.

**`PARENT`** — optional: the CLI fills it from the linked project or the
key's scope when it is left out.

**CLI**

```bash
sylphx config config-segments list orgs/acme/projects/shop/envs/production
```

`GET https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/config_segments` · scope `config:read` · effect `read` · [Request, response and examples](/docs/api/config_segments/list)

**Flags**

| Flag | Type | What it does |
| --- | --- | --- |
| `--page-size` | `int` | At most this many; default 50, clamped to 1000. |
| `--page-token` | `string` | `next_page_token` of the previous page. |

## create

Creates a config segment.

**`ID`** — The id segment of the new Resource's name; the server assigns one when omitted.

**CLI**

```bash
sylphx config config-segments create --parent orgs/acme/projects/shop/envs/production
```

`POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/config_segments` · scope `config:write` · effect `write` · [Request, response and examples](/docs/api/config_segments/create)

**Flags**

| Flag | Type | What it does |
| --- | --- | --- |
| `--parent` | `string` | The parent to create in; defaults to the linked project or the key's scope. |
| `--meta.labels` | `key=value` | Caller-writable, indexed labels (AIP-122 label rules). Repeat the flag for each value. |
| `--meta.annotations` | `key=value` | Caller-writable, unindexed annotations. Repeat the flag for each value. |
| `--meta.display-name` | `string` | Caller-writable human-readable name. |
| `--spec.included` | `string` | Subjects always in the segment, by `user_id` or `anonymous_id`. Repeat the flag for each value. |
| `--spec.excluded` | `string` | Subjects never in the segment, whatever else holds. Repeat the flag for each value. |
| `--spec.conditions` | `json` | Conditions over the evaluation context; all must hold. Repeat the flag for each value. |
| `--spec.description` | `string` | Who the segment is. |
| `--dry-run` | `bool` | Validate and print the result without writing (validate_only). |
| `--no-wait` | `bool` | Return the call at once instead of waiting for it to finish. |

## update

Updates a config segment; every flag naming it follows.

**`NAME`** — the resource's name; a bare id is enough below the linked
project.

**CLI**

```bash
sylphx config config-segments update orgs/acme/projects/shop/envs/production/config_segments/config-segment
```

`PATCH https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/config_segments/config-segment` · scope `config:write` · effect `write` · [Request, response and examples](/docs/api/config_segments/update)

**Flags**

| Flag | Type | What it does |
| --- | --- | --- |
| `--meta.labels` | `key=value` | Caller-writable, indexed labels (AIP-122 label rules). Repeat the flag for each value. |
| `--meta.annotations` | `key=value` | Caller-writable, unindexed annotations. Repeat the flag for each value. |
| `--meta.display-name` | `string` | Caller-writable human-readable name. |
| `--spec.included` | `string` | Subjects always in the segment, by `user_id` or `anonymous_id`. Repeat the flag for each value. |
| `--spec.excluded` | `string` | Subjects never in the segment, whatever else holds. Repeat the flag for each value. |
| `--spec.conditions` | `json` | Conditions over the evaluation context; all must hold. Repeat the flag for each value. |
| `--spec.description` | `string` | Who the segment is. |
| `--dry-run` | `bool` | Validate and print the result without writing (validate_only). |
| `--no-wait` | `bool` | Return the call at once instead of waiting for it to finish. |

## delete

Deletes a config segment; refused while a flag names it.

**`NAME`** — the resource's name; a bare id is enough below the linked
project.

**CLI**

```bash
sylphx config config-segments delete orgs/acme/projects/shop/envs/production/config_segments/config-segment --yes
```

`DELETE https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/config_segments/config-segment` · scope `config:write` · effect `destructive` · [Request, response and examples](/docs/api/config_segments/delete)

**Flags**

| Flag | Type | What it does |
| --- | --- | --- |
| `--etag` | `string` | Delete only if the current etag matches. |
| `--dry-run` | `bool` | Validate and print the result without writing (validate_only). |
| `--no-wait` | `bool` | Return the call at once instead of waiting for it to finish. |
| `--yes` | `bool` | Do not ask before this destructive call. |
