Setup
Prerequisites
Section titled “Prerequisites”- Node.js 24.11.1+ or Bun
- A Convex team. Sign up at convex.dev; the free plan is enough to start.
Create a project
Section titled “Create a project”mkdir my-app && cd my-app && pnpm initmkdir my-app && cd my-app && bun init -ymkdir my-app && cd my-app && npm init -ymkdir my-app && cd my-app && yarn init -yInstall
Section titled “Install”pnpm add https://pkg.alchemy.run/alchemy/pr:3743:56b4873 https://pkg.alchemy.run/@alchemy.run/convex/pr:3743:56b4873 convex effect @effect/platform-bun @effect/platform-nodebun add https://pkg.alchemy.run/alchemy/pr:3743:56b4873 https://pkg.alchemy.run/@alchemy.run/convex/pr:3743:56b4873 convex effect @effect/platform-bun @effect/platform-nodenpm install https://pkg.alchemy.run/alchemy/pr:3743:56b4873 https://pkg.alchemy.run/@alchemy.run/convex/pr:3743:56b4873 convex effect @effect/platform-bun @effect/platform-nodeyarn add https://pkg.alchemy.run/alchemy/pr:3743:56b4873 https://pkg.alchemy.run/@alchemy.run/convex/pr:3743:56b4873 convex effect @effect/platform-bun @effect/platform-nodeconvex is Convex’s own package. Convex.Functions pushes with its CLI, and your functions import it.
Add the provider
Section titled “Add the provider”Add Convex.providers() to your Stack:
import * as Convex from "@alchemy.run/convex";import * as Alchemy from "alchemy";import * as Effect from "effect/Effect";
export default Alchemy.Stack( "MyApp", { providers: Convex.providers(), state: Alchemy.localState() }, Effect.gen(function* () { yield* Convex.Project("App"); }),);Connect a profile
Section titled “Connect a profile”Create a team access token in your team’s settings. A token belongs to the person who created it, so use a service account for anything shared. Then store it in your default profile:
pnpm alchemy profile edit --add Convexbun alchemy profile edit --add Convexnpx alchemy profile edit --add Convexyarn alchemy profile edit --add ConvexPaste the token when asked, and leave the team ID blank: Alchemy reads it from the token.
See Teams and tokens.
Use environment variables in CI
Section titled “Use environment variables in CI”Set CONVEX_ACCESS_TOKEN, and Alchemy uses it instead of your profile:
CONVEX_ACCESS_TOKEN=... pnpm alchemy deployCONVEX_ACCESS_TOKEN=... bun alchemy deployCONVEX_ACCESS_TOKEN=... npx alchemy deployCONVEX_ACCESS_TOKEN=... yarn alchemy deployCONVEX_TEAM_ID is optional, and only checks that the token is for the team you expect. See CI.
Mix with another cloud
Section titled “Mix with another cloud”Merge the providers:
providers: Layer.mergeAll(Cloudflare.providers(), Convex.providers()),Local development
Section titled “Local development”Convex has no emulator in Alchemy, so alchemy dev creates and uses real Convex deployments. Each stage gets its own.
Custom domains, log streams and data sync need the Convex Professional plan. Audit logs need a plan that keeps them.