Skip to content

Conversation

@sitole
Copy link
Member

@sitole sitole commented Jan 12, 2026

Documents the new Template.aliasExists SDK method for checking if a template alias exists and is accessible. Includes usage examples for JavaScript/TypeScript and Python (sync/async), practical use cases (verifying template availability, checking alias availability before building), and configuration options.

The method is implemented in PR #1068 for both JavaScript and Python SDKs.

Related to e2b-dev/E2B#1068


Note

Introduces comprehensive documentation for template aliases and how to work with them across SDKs.

  • New docs/template/aliases page covering what aliases are, global uniqueness, common use cases, and best practices
  • Adds JS/TS and Python (sync/async) examples for Template.aliasExists / Template.alias_exists and using aliases to build templates and create sandboxes
  • Updates docs.json navigation to include the new Aliases page under Templates

Written by Cursor Bugbot for commit 58e56f3. This will update automatically on new commits. Configure here.

Copy link
Member

@jakubno jakubno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think separate page for each command may be too much, but looks like that's how we do it now. So it's fine.

Why is there the first example with python async and the other doesn't have async variant?

I would maybe update the verify template availability? I would at least add a build in the else branch

@sitole
Copy link
Member Author

sitole commented Jan 12, 2026

I think a separate page for each command may be too mucht looks like that's how we do it now. So it's fine.

Agree here. I think we need a bigger refactor to do some page aggregating multiple simple commands such as this one.

Why is there the first example with Python async, and the other does async variant?

Added

I would maybe update the verify template availability? I would at least add a build in the else branch

Added an IF was simplified.

@sitole sitole requested a review from jakubno January 12, 2026 10:30

1. **Use descriptive names**: Choose aliases that clearly indicate the template's purpose or configuration
2. **Include versioning**: Consider adding version numbers to your aliases for better version management (e.g., `myapp-v1`, `myapp-v2`)
3. **Check availability first**: Always check if an alias is available before attempting to build with it
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it really necessary? Honestly I would do in a try block, otherwise there's a small race condition


## Common Use Cases

### Development and Production Environments
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sync with Jakub, so he updates this when releasing template tags

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants