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
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique identifier. Used as a key in Convex sessions. |
name | string | Yes | Display name shown to users. |
description | string | Yes | Short description shown in the template picker. |
repository | string | Yes | Full GitHub URL (or owner/repo shorthand) to clone into the sandbox. |
logos | string[] | Yes | Array of logo filenames from the public/ directory. |
image | string | No | E2B sandbox template ID. Omit to use the default E2B image. |
startCommands | array | Yes | Ordered list of commands to run after the repo is cloned. |
secrets | Record<string, string> | No | Static environment variables to write into the sandbox. |
systemPrompt | string | Yes | Inline prompt string or "FILE:filename.md" to load from disk. |
How startCommands work
Each entry in startCommands has three properties:
command— the shell command to runstatus— the session status to display while this command runs ("INSTALLING_DEPENDENCIES"or"STARTING_DEV_SERVER")background— iftrue, the command runs in the background (non-blocking). Use this for long-lived processes like dev servers.
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
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.
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.Write the template entry in config.ts
Open
vibracode-backend/config.ts and add your template to the templates array: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.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 theimage field.
Create a Dockerfile
Create a directory for your template (for example,
vibracode-backend/e2b-remix-template/) and add a Dockerfile: