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

# Tags

> Track and organize resources with key-value pairs

<Warning>
  This feature is in [public preview](/preview/roadmap).
</Warning>

Tags are `key=value` pairs that help you track and organize resources on SF Compute.

## Syntax

Tag `keys` must not contain any `space`, `comma`, or `equals sign`

Tag `values` must not contain any `comma` or `equals sign`. `spaces` are accepted inside tag values

Tags are case sensitive.

## Create tags

You can set tags while creating a resource or by editing an existing one.

```bash theme={null}
sf pools create --name root --tag model=cuda-crunch
```

```bash theme={null}
sf instances set training-12 --tag model=cuda-crunch --tag optimizer=adam
```

## Edit tags

You can overwrite all existing tags with the `set` command for any resource.

```bash theme={null}
sf instances set prod --tag model=cuda-crunch --tag env=prod
```

## Delete tags

Setting tags to `null` will delete any existing tags attached to a resource.

Once deleted, tags cannot be recovered.

```bash theme={null}
sf pools set dev --tag null
```

## List resources by tags

You can filter resources that match your provided tags.

```bash theme={null}
sf instances list --tag model=cuda-crunch
```

```
NAME          STATUS              POOL       CREATED     TAGS
prod          running             root       2025-03-01  model=cuda-crunch, env=prod
```

Providing a tag key return all resources that have tags with the specified key

```bash theme={null}
sf instances list --tag-key env
```

```
NAME        STATUS               POOL           INSTANCE SKU  CREATED         TAGS
prod        awaiting_allocation  prod           -             Mar 31, 9:19pm  env=prod, model=cuda-crunch
```

## Limits

Tags have the following limits:

* Max limit of 50 tags per resource
* Tag keys cannot be more than 128 characters
* Tag values cannot be more than 256 characters
