@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 06:00 UTC

main
md 44 lines 1.24 KB
Rendered Raw
1 # @alchemy.run/doppler
2
3 [Doppler](https://www.doppler.com) secrets for [Alchemy](https://alchemy.run). Load a Doppler config into your Stack: browser login on your machine, a service token in CI, and nothing written to `process.env` or disk.
4
5 ```sh
6 npm install alchemy @alchemy.run/doppler effect
7 ```
8
9 Pick the config per stage, then read secrets with Effect `Config`:
10
11 ```typescript
12 // alchemy.run.ts
13 import * as Alchemy from "alchemy";
14 import * as Doppler from "@alchemy.run/doppler";
15 import * as Config from "effect/Config";
16 import * as Effect from "effect/Effect";
17 import * as Layer from "effect/Layer";
18
19 export default Alchemy.Stack(
20 "MyApp",
21 {
22 providers: Layer.empty,
23 state: Alchemy.localState(),
24 secrets: [
25 Doppler.Secrets(({ stage }) => ({
26 project: "my-app",
27 config: stage === "prod" ? "prd" : "dev",
28 })),
29 ],
30 },
31 Effect.gen(function* () {
32 const databaseUrl = yield* Config.Redacted("DATABASE_URL");
33 return {};
34 }),
35 );
36 ```
37
38 Connect your account once with `alchemy profile edit --add Doppler`.
39
40 ## Learn more
41
42 - [Doppler on alchemy.run](https://alchemy.run/environments/doppler)
43 - [Secret providers](https://alchemy.run/environments/secret-providers)
44 - [Secrets](https://alchemy.run/environments/secrets)