# prb tag command reference

Manage tags. This page documents **7 commands** under `prb tag`.

Flags and examples below come from the command definitions. A **Required** flag is explicitly marked required by Cobra; an unmarked flag can still be needed by runtime validation or a non-interactive workflow. Empty strings and empty lists are registered defaults, not sample values.

Every command also inherits the [global flags](/docs/developers/cli/commands#global-flags). Run `prb <command> --help` to check your installed version. Replace placeholder IDs and names in source examples before running them. Return to the [complete CLI command reference](/docs/developers/cli/commands) to browse another command.

## Commands

| Command                             | Description                                    | Usage               | Source                                                                                              |
| ----------------------------------- | ---------------------------------------------- | ------------------- | --------------------------------------------------------------------------------------------------- |
| [`prb tag`](#prb-tag)               | Manage tags.                                   | `prb tag <command>` | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/tag/tag.go#L35)           |
| [`prb tag attach`](#prb-tag-attach) | Attach a tag to a resource.                    | `prb tag attach`    | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/tag/attach/attach.go#L69) |
| [`prb tag create`](#prb-tag-create) | Create a tag.                                  | `prb tag create`    | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/tag/create/create.go#L66) |
| [`prb tag delete`](#prb-tag-delete) | Delete a tag.                                  | `prb tag delete`    | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/tag/delete/delete.go#L47) |
| [`prb tag detach`](#prb-tag-detach) | Detach a tag from a resource.                  | `prb tag detach`    | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/tag/detach/detach.go#L61) |
| [`prb tag list`](#prb-tag-list)     | List tags in an organization or on a resource. | `prb tag list`      | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/tag/list/list.go#L103)    |
| [`prb tag update`](#prb-tag-update) | Update a tag.                                  | `prb tag update`    | [View implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/tag/update/update.go#L62) |

## prb tag

Manage tags.

### Usage

```text
prb tag <command>
```

[View command implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/tag/tag.go#L35).

## prb tag attach

Attach a tag to a resource.

### Usage

```text
prb tag attach
```

Accepts no positional arguments.

### Additional help

```text
Attach a tag to a resource. Attaching a tag that is already present is a no-op.
```

### Flags

| Flag            | Type   | Default | Required | Description               |
| --------------- | ------ | ------- | -------- | ------------------------- |
| `--resource-id` | string | `""`    | —        | ID of the resource to tag |
| `--tag-id`      | string | `""`    | —        | ID of the tag to attach   |

### Examples

```bash
# Attach a tag interactively
prb tag attach --resource-id prbdoc_...

# Attach a tag non-interactively
prb tag attach --resource-id prbdoc_... --tag-id prbrtg_...
```

[View command implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/tag/attach/attach.go#L69).

## prb tag create

Create a tag.

### Usage

```text
prb tag create
```

Accepts no positional arguments.

### Flags

| Flag      | Type   | Default | Required | Description                              |
| --------- | ------ | ------- | -------- | ---------------------------------------- |
| `--color` | string | `""`    | —        | Optional hex color (#RGB or #RRGGBB)     |
| `--name`  | string | `""`    | —        | Tag name; unique within the organization |
| `--org`   | string | `""`    | —        | Organization ID                          |

### Examples

```bash
# Create a tag interactively
prb tag create

# Create a tag non-interactively
prb tag create --org prborg_... --name Production --color "#FF0000"
```

[View command implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/tag/create/create.go#L66).

## prb tag delete

Delete a tag.

### Usage

```text
prb tag delete
```

Accepts no positional arguments.

### Flags

| Flag          | Type    | Default | Required | Description              |
| ------------- | ------- | ------- | -------- | ------------------------ |
| `--id`        | string  | `""`    | —        | Tag ID                   |
| `--tag-id`    | string  | `""`    | —        | Tag ID                   |
| `--yes`, `-y` | boolean | `false` | —        | Skip confirmation prompt |

### Examples

```bash
# Delete a tag interactively
prb tag delete --id prbrtg_...

# Delete without confirmation
prb tag delete --tag-id prbrtg_... --yes
```

[View command implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/tag/delete/delete.go#L47).

## prb tag detach

Detach a tag from a resource.

### Usage

```text
prb tag detach
```

Accepts no positional arguments.

### Flags

| Flag            | Type   | Default | Required | Description                 |
| --------------- | ------ | ------- | -------- | --------------------------- |
| `--resource-id` | string | `""`    | —        | ID of the resource to untag |
| `--tag-id`      | string | `""`    | —        | ID of the tag to detach     |

### Examples

```bash
# Detach a tag interactively
prb tag detach --resource-id prbdoc_...

# Detach a tag non-interactively
prb tag detach --resource-id prbdoc_... --tag-id prbrtg_...
```

[View command implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/tag/detach/detach.go#L61).

## prb tag list

List tags in an organization or on a resource.

### Usage

```text
prb tag list
```

Accepts no positional arguments.

### Flags

| Flag                | Type    | Default  | Required | Description                             |
| ------------------- | ------- | -------- | -------- | --------------------------------------- |
| `--after`           | string  | `""`     | —        | Cursor to continue listing from         |
| `--json`            | boolean | `false`  | —        | Output JSON (same as --output json)     |
| `--limit`, `-L`     | integer | `30`     | —        | Maximum number of tags to list          |
| `--order-by`        | string  | `""`     | —        | Order by field (CREATED_AT, NAME)       |
| `--order-direction` | string  | `"DESC"` | —        | Sort direction (ASC, DESC)              |
| `--org`             | string  | `""`     | —        | Organization ID                         |
| `--output`, `-o`    | string  | `""`     | —        | Output format: json, table (default)    |
| `--resource`        | string  | `""`     | —        | Resource ID whose attached tags to list |

### Examples

```bash
# List tags in the default organization
prb tag list

# List tags for a specific organization
prb tag list --org prborg_... --output json

# List tags attached to a resource
prb tag list --resource prbdoc_...
```

[View command implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/tag/list/list.go#L103).

## prb tag update

Update a tag.

### Usage

```text
prb tag update
```

Accepts no positional arguments.

### Flags

| Flag      | Type   | Default | Required | Description                                                  |
| --------- | ------ | ------- | -------- | ------------------------------------------------------------ |
| `--color` | string | `""`    | —        | Hex color (#RGB or #RRGGBB); pass an empty value to clear it |
| `--id`    | string | `""`    | —        | Tag ID                                                       |
| `--name`  | string | `""`    | —        | Tag name; unique within the organization                     |

### Examples

```bash
# Update a tag interactively
prb tag update --id prbrtg_...

# Update the name
prb tag update --id prbrtg_... --name Staging

# Remove the color
prb tag update --id prbrtg_... --color ""
```

[View command implementation](https://github.com/getprobo/probo/blob/main/pkg/cmd/tag/update/update.go#L62).
