Templates
A template is a reusable Remote Dev Environment configuration. Define the machine and its setup once, then create consistent sessions from it without repeating the same choices each time.
Template overviewClick to copy link
A template can include:
- A stack, a machine type, and a working directory that terminals start in.
- A warmup script and a startup script for installing tools and preparing the environment.
- Template variables and session inputs for the values your environment needs.
- Workspace links: shortcut buttons that open a specific folder in your IDE.
- A virtual device: an iOS simulator or Android emulator that every session created from the template boots.
Warmup and startup scriptsClick to copy link
Both scripts are Bash and run as the session user, but at different times:
- The warmup script runs once, when the session is first created. Use it for slow, one-time setup such as installing dependencies.
- The startup script runs every time the session starts, including after a restore. Keep it idempotent, since it runs more than once.
Variables and inputsClick to copy link
Templates carry two kinds of values, both of which can be exposed to the session as environment variables:
- Template variables are baked into the template with a fixed value. Mark a variable as secret to encrypt it at rest.
- Session inputs are filled in when a session is created. You can mark an input as required and give it a default value. A session input can also pull its value from a saved input, so secrets are resolved on the server and never shown in the UI.
Workspace linksClick to copy link
Workspace links are buttons on the session that open a given folder path in your IDE. They're handy for jumping straight into the right directory in a multi-folder project.
Declared deviceClick to copy link
A template can declare a virtual device, so every session created from it boots an iOS simulator or Android emulator without any device settings on the session. Turn on Boot a device with every session in the template form, or use the CLI:
bitrise-cli rde template create --file template.json --device-platform ios --device-model "iPhone 16"
The template's stack and machine type must fit the platform: a macOS stack for iOS, a Linux Android stack for Android. When you create a session from the template, you can keep the device as declared, change individual fields for that session only, or turn it off with Start an iOS simulator or Start an Android emulator in the UI and --no-device in the CLI. Sessions already created from the template keep the device they were created with. The device options themselves are described in Device sessions.
Managing templatesClick to copy link
Create, edit, clone, and delete templates from the Bitrise RDE UI, or from the CLI with bitrise-cli rde template.
When you create a session, its template configuration is captured as a snapshot. Editing or deleting a template afterwards doesn't change or break sessions that were already created from it.
Warm poolsClick to copy link
To have sessions of a template ready before anyone asks for them, create a warm pool from it: Create warm pool on the template's page opens the pool form with the template selected. A pool follows its template, so editing the template replaces the pool's warm sessions, and deleting the template deletes its pools.