Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions docs/template/tags.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
description: "Use tags to version your templates and manage environment-based deployments"
---

Template versioning allows you to maintain multiple versions of the same template using tags. This enables workflows like semantic versioning, environment-based deployments, and gradual rollouts.

Check warning on line 7 in docs/template/tags.mdx

View check run for this annotation

Mintlify / Mintlify Validation (e2b) - vale-spellcheck

docs/template/tags.mdx#L7

Did you really mean 'rollouts'?

## Tag format

Expand Down Expand Up @@ -39,6 +39,38 @@

</CodeGroup>

## Referencing a specific build

Instead of using a named tag, you can start a sandbox from a specific build by passing its `build_id` directly. This is useful when you need to pin a sandbox to an exact build artifact — for example, during debugging or when reproducing an issue from a known build.

The format follows the same colon syntax as tags: `<template>:<build_id>` or `<namespace>/<template>:<build_id>`.

You can find the `build_id` from the return value of `Template.build()` or by listing tags with `Template.getTags()` / `Template.get_tags()`.

<CodeGroup>

```typescript JavaScript & TypeScript
import { Sandbox } from 'e2b'

// Start a sandbox from a specific build ID
const sandbox = await Sandbox.create('my-template:f47ac10b-58cc-4372-a567-0e02b2c3d479')

// With namespace
const sandbox2 = await Sandbox.create('acme/my-template:f47ac10b-58cc-4372-a567-0e02b2c3d479')
```

```python Python
from e2b import Sandbox

# Start a sandbox from a specific build ID
sandbox = Sandbox.create('my-template:f47ac10b-58cc-4372-a567-0e02b2c3d479')

# With namespace
sandbox2 = Sandbox.create('acme/my-template:f47ac10b-58cc-4372-a567-0e02b2c3d479')
```

</CodeGroup>

## Building with tags

You can build templates with one or more tags to create versioned builds.
Expand Down