Doppler secrets for Alchemy. 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.
npm install alchemy @alchemy.run/doppler effect
Pick the config per stage, then read secrets with Effect Config:
// alchemy.run.ts
import * as Alchemy from "alchemy";
import * as Doppler from "@alchemy.run/doppler";
import * as Config from "effect/Config";
import * as Effect from "effect/Effect";
import * as Layer from "effect/Layer";
export default Alchemy.Stack(
"MyApp",
{
providers: Layer.empty,
state: Alchemy.localState(),
secrets: [
Doppler.Secrets(({ stage }) => ({
project: "my-app",
config: stage === "prod" ? "prd" : "dev",
})),
],
},
Effect.gen(function* () {
const databaseUrl = yield* Config.Redacted("DATABASE_URL");
return {};
}),
);
Connect your account once with alchemy profile edit --add Doppler.