1---
2title: Setup
3description: Connect alchemy to Prisma — account, service tokens, and profiles.
4---
5
6Sign up at [prisma.io](https://www.prisma.io) and create a service
7token in the [Prisma Console](https://console.prisma.io) (workspace
8settings → service tokens). Register the provider next to your
9cloud's:
10
11```typescript
12// alchemy.run.ts
13import * as Alchemy from "alchemy";
14import * as Cloudflare from "alchemy/Cloudflare";
15import * as Prisma from "alchemy/Prisma";
16import * as Effect from "effect/Effect";
17import * as Layer from "effect/Layer";
18
19export default Alchemy.Stack(
20 "App",
21 {
22 providers: Layer.mergeAll(
23 Cloudflare.providers(),
24 Prisma.providers(),
25 ),
26 state: Alchemy.localState(),
27 },
28 Effect.gen(function* () {
29 // Declare Prisma and Cloudflare resources here.
30 }),
31);
32```
33
34Run `alchemy profile edit --add Prisma`. The service token is entered
35interactively and saved under
36`~/.alchemy/credentials/<profile>/prisma-stored.json`.
37
38In CI (`CI=true`), profiles are bypassed. Set `PRISMA_SERVICE_TOKEN` or
39`PRISMA_API_TOKEN`; Alchemy reads it directly and persists nothing.
40
41See [Profiles](/environments/profiles) for how credentials are stored
42and switched.
43
44## Local dev
45
46`bun alchemy dev` needs no Prisma credentials. Database resources run
47against a local `@prisma/dev` Postgres, Compute resources run their
48configured `dev.command`, and the remaining Prisma resources return
49compatible local outputs. See
50[Postgres](/prisma/data/postgres) for the dev database options.
51
52## Next steps
53
54- [Tutorial: Your First Project](/prisma/tutorial/part-1) — build a full-stack Prisma application in four parts.
55- [Prisma overview](/prisma) — resources and compositions.