The best way to control Claude Code, Codex and more from any computer or phone
| 1 | # @alchemy.run/infisical |
| 2 | |
| 3 | [Infisical](https://infisical.com) secrets for [Alchemy](https://alchemy.run). Load an Infisical environment into your Stack, with nothing written to `process.env` or disk. |
| 4 | |
| 5 | ```sh |
| 6 | npm install alchemy @alchemy.run/infisical effect |
| 7 | ``` |
| 8 | |
| 9 | Pick the environment per stage, then read secrets with Effect `Config`: |
| 10 | |
| 11 | ```typescript |
| 12 | // alchemy.run.ts |
| 13 | import * as Alchemy from "alchemy"; |
| 14 | import * as Infisical from "@alchemy.run/infisical"; |
| 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 | Infisical.Secrets(({ stage }) => ({ |
| 26 | project: "my-app", |
| 27 | environment: stage === "prod" ? "prod" : "dev", |
| 28 | path: "/api", |
| 29 | })), |
| 30 | ], |
| 31 | }, |
| 32 | Effect.gen(function* () { |
| 33 | const databaseUrl = yield* Config.Redacted("DATABASE_URL"); |
| 34 | return {}; |
| 35 | }), |
| 36 | ); |
| 37 | ``` |
| 38 | |
| 39 | Connect your account once with `alchemy profile edit --add Infisical`. |
| 40 | |
| 41 | ## Learn more |
| 42 | |
| 43 | - [Infisical on alchemy.run](https://alchemy.run/environments/infisical) |
| 44 | - [Secret providers](https://alchemy.run/environments/secret-providers) |
| 45 | - [Secrets](https://alchemy.run/environments/secrets) |