Skip to main content
Templates define the starting point for every app a user builds. Each template is a Git repository that gets cloned into an E2B sandbox, a sequence of commands to bootstrap it, and a system prompt that tells the AI agent how to work with it. Adding your own template requires editing a single file — vibracode-backend/config.ts — and optionally building a custom E2B sandbox image.

The Template interface

Every template in Vibra Code implements the following TypeScript interface:

Field reference

How startCommands work

Each entry in startCommands has three properties:
  • command — the shell command to run
  • status — the session status to display while this command runs ("INSTALLING_DEPENDENCIES" or "STARTING_DEV_SERVER")
  • background — if true, the command runs in the background (non-blocking). Use this for long-lived processes like dev servers.
Commands run in order. The session moves to RUNNING status after all non-background commands complete.

Existing templates as reference

The built-in templates show the range of possible configurations:
The Shopify template uses secrets to write a static SESSION_SECRET into the sandbox environment, and uses multiple INSTALLING_DEPENDENCIES steps to install both npm packages and the Shopify CLI globally before starting the dev server.

Adding a new template

1

Create or find a starter repository

Your template needs a public GitHub repository. It should be a working app skeleton that can be cloned, installed, and started with a small number of shell commands.If you’re forking an existing template, make sure the repository is publicly accessible or that your E2B sandbox has credentials to clone it.
2

Add your logo assets

Place logo files (SVG or JPEG) in vibracode-backend/public/. Reference them by filename in the logos array. Multiple logos are displayed as a stack in the template picker.
3

Write the template entry in config.ts

Open vibracode-backend/config.ts and add your template to the templates array:
4

Write a system prompt

Your system prompt should tell the AI agent which stack it is working in and any important constraints. At minimum, include the dev server port, installed packages, and any patterns you want enforced.For long prompts, use the file reference syntax:
Then create vibracode-backend/remix-prompt.md with the full prompt content. See Customizing AI system prompts for guidance on writing effective prompts.
5

Restart the backend

Your new template will appear in the template picker immediately.

Building a custom E2B sandbox

By default, E2B sandboxes start from a standard base image. If your template needs pre-installed system dependencies (compilers, runtimes, native tools), build a custom E2B image and set its ID in the image field.
1

Install the E2B CLI

2

Create a Dockerfile

Create a directory for your template (for example, vibracode-backend/e2b-remix-template/) and add a Dockerfile:
3

Build the E2B template

E2B will print a template ID when the build completes.
4

Set the template ID in config.ts

Copy the template ID from the E2B CLI output and paste it into the image field of your template entry:
You do not need a custom E2B image for most web templates. The default E2B image includes Node.js, npm, Python, and common build tools. Only build a custom image if your template has unusual native dependencies.
E2B template builds count against your E2B usage. Build templates infrequently and reuse the same image ID across deploys unless the base dependencies change.