Type-Safe Secret Management with Infisical and EffectTS

I'd like to have my secrets stored safely via Infisical, but have them type-safe via EffectTS.

How could I do so?

Goals:
1. Able to validate in build time (I do it with bun run secrets.ts).
2. Able to use in runtime (Start Next.js app with bun run start).

My current code is in the thread.
Was this page helpful?