Part 4: Stages
Deploy another stage
Section titled “Deploy another stage”alchemy deploy --stage stagingEach stage gets its own template and Worker, named after the stage. Without --stage, you deploy to live_$USER.
Share one E2B team
Section titled “Share one E2B team”Stages share your E2B team. Sandboxes a stage’s Worker creates carry the stage in their metadata (alchemy::stage), so you can list one stage’s sandboxes without touching another’s:
const staging = yield* sandboxes.list({ metadata: { "alchemy::stage": "staging" } });Destroying a stage leaves its sandboxes running until they time out.
Volumes and templates you create at runtime have no metadata. Delete them when their owner goes away, as the example’s DELETE /users/:user route does.
Part 5 deploys from CI.