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

# tag - Tag or untag an image

Assign or remove a tag from an image. Tags are human-readable names that
make images easier to reference.

## Examples

```bash theme={null}
# Tag an image
contree tag 3f2a7b... my-app:v1.0

# Remove a tag
contree tag 3f2a7b... my-app:v1.0 --delete

# Use the tagged image
eval $(contree use tag:my-app:v1.0)
```

## Help output

<div className="contree-terminal" style={{"border":"1px solid rgba(255,255,255,0.15)","borderRadius":8,"overflow":"hidden","margin":"1rem 0"}}><div style={{"background":"#292929","height":24,"display":"flex","alignItems":"center","padding":"0 12px","position":"relative"}}><div style={{"display":"flex","alignItems":"center","flexShrink":0}}><span style={{"display":"inline-block","width":10,"height":10,"borderRadius":"50%","background":"#ff5f57","marginRight":6}} /><span style={{"display":"inline-block","width":10,"height":10,"borderRadius":"50%","background":"#febc2e","marginRight":6}} /><span style={{"display":"inline-block","width":10,"height":10,"borderRadius":"50%","background":"#28c840"}} /></div><div style={{"position":"absolute","left":0,"right":0,"textAlign":"center","fontFamily":"-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif","fontWeight":"bold","color":"#999"}}>\$ contree tag --help</div></div><pre style={{"margin":0,"borderRadius":0,"padding":"8px 10px","background":"#1e1e1e","overflowX":"auto"}}><code style={{"fontFamily":"JetBrains Mono, SF Mono, SFMono-Regular, Menlo, Monaco, Cascadia Mono, Segoe UI Mono, Roboto Mono, Oxygen Mono, Ubuntu Monospace, Source Code Pro, Fira Mono, Droid Sans Mono, Consolas, Courier New, monospace","color":"#c5c8c6","whiteSpace":"pre-wrap"}}><span style={{"color":"#61afef","fontWeight":"bold"}}>usage: </span><span style={{"color":"#c678dd","fontWeight":"bold"}}>contree tag</span><span style={{"color":"#c5c8c6"}}> \[</span><span style={{"color":"#98c379"}}>-h</span><span style={{"color":"#c5c8c6"}}>] \[</span><span style={{"color":"#98c379"}}>-U</span><span style={{"color":"#c5c8c6"}}>] </span><span style={{"color":"#98c379"}}>ARG \[ARG ...]</span><br /><br /><span style={{"color":"#c5c8c6"}}>Assign or remove a tag from an image.</span><br /><br /><span style={{"color":"#c5c8c6"}}>Tags provide human-readable names for image UUIDs, making them easier</span><br /><span style={{"color":"#c5c8c6"}}>to reference in commands like \`contree use tag:NAME\`.</span><br /><br /><span style={{"color":"#c5c8c6"}}>With one argument, tags the current session image.</span><br /><span style={{"color":"#c5c8c6"}}>With two arguments, the first is the image reference and the second is the tag.</span><br /><br /><span style={{"color":"#c5c8c6"}}>Use -U/--delete/--rm to remove a tag instead of assigning one.</span><br /><br /><span style={{"color":"#61afef","fontWeight":"bold"}}>positional arguments:</span><br /><span style={{"color":"#c5c8c6"}}>  </span><span style={{"color":"#98c379","fontWeight":"bold"}}>ARG</span><span style={{"color":"#c5c8c6"}}>                 TAG (current image) or IMAGE\_REF TAG</span><br /><br /><span style={{"color":"#61afef","fontWeight":"bold"}}>options:</span><br /><span style={{"color":"#c5c8c6"}}>  </span><span style={{"color":"#98c379","fontWeight":"bold"}}>-h</span><span style={{"color":"#c5c8c6"}}>, </span><span style={{"color":"#56b6c2","fontWeight":"bold"}}>--help</span><span style={{"color":"#c5c8c6"}}>          show this help message and exit</span><br /><span style={{"color":"#c5c8c6"}}>  </span><span style={{"color":"#98c379","fontWeight":"bold"}}>-U</span><span style={{"color":"#c5c8c6"}}>, </span><span style={{"color":"#56b6c2","fontWeight":"bold"}}>--delete</span><span style={{"color":"#c5c8c6"}}>, </span><span style={{"color":"#56b6c2","fontWeight":"bold"}}>--rm</span><span style={{"color":"#c5c8c6"}}>  Remove tag from image</span><br /><br /><span style={{"color":"#c5c8c6"}}>examples:</span><br /><span style={{"color":"#c5c8c6"}}>  contree tag python-dev:latest            # tag current session image</span><br /><span style={{"color":"#c5c8c6"}}>  contree tag UUID python-dev:latest       # tag specific image by UUID</span><br /><span style={{"color":"#c5c8c6"}}>  contree tag tag:alpine:latest my-alpine  # re-tag by reference</span><br /><span style={{"color":"#c5c8c6"}}>  contree tag -U UUID my-tag               # remove a tag (or --delete/--rm)</span><br /><br /><span style={{"color":"#c5c8c6"}}>for coding agents:</span><br /><span style={{"color":"#c5c8c6"}}>  mutating command</span><br /><span style={{"color":"#c5c8c6"}}>  default action assigns tag; use --delete to remove mapping</span><br /><br /><span style={{"color":"#c5c8c6"}}>agent note:</span><br /><span style={{"color":"#c5c8c6"}}>  Before using this command in an automated workflow, read:</span><br /><span style={{"color":"#c5c8c6"}}>    contree agent</span></code></pre></div>

## Usage

Tags are free-form strings. A common convention is `scope/purpose:version`:

```bash theme={null}
contree tag UUID ubuntu-with-curl:latest
contree tag UUID my-project/dev-env:v2
```

Once tagged, reference the image anywhere with the `tag:` prefix:

```bash theme={null}
contree use tag:ubuntu-with-curl:latest
```

Tagging an image that already has a different tag replaces the old tag.

## See also

* [images - List and import images](./images) – list images and their tags
* [Your First Sandbox](../tutorial/first-steps) – working with images
