Skip to content

Setup

Sign up at prisma.io and create a service token in the Prisma Console (workspace settings → service tokens). Register the provider next to your cloud’s:

alchemy.run.ts
import * as Prisma from "alchemy/Prisma";
providers: Layer.mergeAll(Cloudflare.providers(), Prisma.providers()),

The next alchemy login adds a Prisma step with two options:

  • Environment variable — reads PRISMA_SERVICE_TOKEN (or PRISMA_API_TOKEN; good for CI).
  • Service Token — entered interactively, saved under ~/.alchemy/credentials/<profile>/prisma-stored.json.

In CI (CI=true), the environment-variable method is selected automatically — no prompt, just set PRISMA_SERVICE_TOKEN.

See Profiles for how credentials are stored and switched.

bun alchemy dev needs no credentials at all: the Prisma providers run against a local @prisma/dev Postgres, and every resource (project, database, connection) resolves to its local equivalent with the same output shape. See Postgres for the dev database options.