Skip to content

Commit f5a6933

Browse files
committed
docs: update template naming to reflect team-local names
Template names are now scoped to teams rather than being globally unique. This updates the documentation to reflect the changes from e2b-dev/infra PRs #1760 and #1806. - Update names.mdx to explain team-local naming with namespace format - Add backwards compatibility note for existing public templates - Update tags.mdx to show namespaced format examples - Fix outdated alias parameter in billing.mdx - Update from_template example in base-image.mdx
1 parent 8bf0d3a commit f5a6933

4 files changed

Lines changed: 19 additions & 18 deletions

File tree

docs/billing.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ You can customize allocated CPU and RAM when building custom templates by specif
4343
```js JavaScript & TypeScript
4444
import { Template, defaultBuildLogger } from 'e2b'
4545

46-
await Template.build(template, {
47-
alias: "my-template",
46+
await Template.build(template, 'my-template', {
4847
cpuCount: 8,
4948
memoryMB: 4096,
5049
onBuildLogs: defaultBuildLogger(),
@@ -55,7 +54,7 @@ from e2b import Template, default_build_logger
5554

5655
Template.build(
5756
template,
58-
alias="my-template",
57+
'my-template',
5958
cpu_count=8,
6059
memory_mb=4096,
6160
on_build_logs=default_build_logger(),

docs/template/base-image.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ template.from_image("custom-image:latest")
8181
template.from_base_image() # e2bdev/base
8282

8383
# Build from existing template
84-
template.from_template("existing-template-alias")
84+
template.from_template("my-template") # Your team's template
85+
template.from_template("acme/other-template") # Full namespaced reference
8586

8687
# Parse and build from Dockerfile
8788
template.from_dockerfile("Dockerfile")

docs/template/names.mdx

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,18 @@ sandbox = Sandbox.create('my-python-env')
3838

3939
</CodeGroup>
4040

41-
## Uniqueness Requirement
41+
## Team-Local Naming
4242

43-
<Warning>
44-
Template names must be **globally unique across the entire E2B platform**, not just within your team or account. This means if another user has already claimed a name, you cannot use it for your template.
45-
</Warning>
43+
Template names are scoped to your team. This means:
4644

47-
When choosing a name, consider using:
48-
- Your company or project name as a prefix (e.g., `acme-api-server`)
49-
- Version numbers or environment indicators (e.g., `myapp-v2`, `myapp-staging`)
50-
- Descriptive names that indicate the template's purpose (e.g., `data-analysis-python`)
45+
- Your template named `my-app` is stored as `your-team-slug/my-app`
46+
- You can reference it simply as `my-app` within your team
47+
- Other teams can have their own `my-app` template without conflict
48+
- Public templates should be referenced using the full namespaced format (`team-slug/template-name`)
49+
50+
<Note>
51+
**Backwards Compatibility**: Existing public templates remain accessible without the team slug prefix. New public templates should be referenced using the full namespaced format (`team-slug/template-name`).
52+
</Note>
5153

5254
## Common Use Cases
5355

@@ -137,7 +139,7 @@ When building variants with the same template definition but different CPU/RAM c
137139

138140
## Checking Name Availability
139141

140-
You can check if a name is already in use with the `exists` method.
142+
You can check if a name is already in use within your team with the `exists` method.
141143

142144
<CodeGroup>
143145

@@ -162,4 +164,3 @@ print(f"Name {'is taken' if exists else 'is available'}")
162164
1. **Use descriptive names**: Choose names that clearly indicate the template's purpose or configuration
163165
2. **Use tags for versioning**: Instead of baking version numbers into names, use [tags](/docs/template/tags) for version management (e.g., `myapp:v1`, `myapp:v2`)
164166
3. **Use consistent naming**: Establish a naming convention for your team and stick to it
165-
4. **Document your names**: Keep a record of which names are used for which purposes in your team

docs/template/tags.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ Template versioning allows you to maintain multiple versions of the same templat
88

99
## Tag Format
1010

11-
Tags follow the `name:tag` format, where `name` is your template's unique identifier and `tag` is the version label.
11+
Tags follow the `name:tag` format, where `name` is your template's identifier and `tag` is the version label.
1212

1313
```
14-
my-template:v1.0.0
15-
my-template:production
16-
my-template:latest
14+
my-template:v1.0.0 // Within your team
15+
my-template:production // Within your team
16+
acme/my-template:v1.0.0 // Full namespaced reference
1717
```
1818

1919
## The Default Tag

0 commit comments

Comments
 (0)