Can you keep a secret? Varlock, the open-source toolkit for managing environment variables and secrets, is joining Cloudflare. But don’t worry, Varlock will remain actively developed, open source (MIT), and vendor-neutral for everyone.
Secrets management underpins almost every application, yet most projects lack a single source of truth and rely on bespoke logic to load and validate configuration. Coding agents turned this fragile chore into an immediate security risk. Together, we are investing in an open standard for environment configuration and bringing Varlock’s first-principles approach to Cloudflare Secrets Store and the rest of Cloudflare's Developer Platform.
Why environment variables needed a schema #
To figure out which environment variables an application needs, you usually piece together clues from a stale .env.example file, a README, custom validation code, and comments scattered across the repository. Sensitive API keys sit in plaintext .env files on developer laptops, move over chat messages, and end up copied into multiple dashboards. Rotating a key becomes a chore teams put off until something leaks.
Varlock replaces .env.example with a .env.schema file that you commit to Git. It uses JSDoc-style decorator comments (such as # @required) to declare types and rules, and a new function syntax to securely load secrets from external vaults or encrypted local files:
API_URL=https://api.example.com
STRIPE_SECRET_KEY=op("op://prod/stripe/secret-key")
This new schema layer adds a ton of value: validation, type safety, secure declarative , and most importantly — a single source of truth. It adds many additional security guardrails, and gives your agents a safe way to interact with your environment variables without leaking values. All of this is great for humans (especially teams) and their agents.
What this means for Varlock #
Varlock isn't going anywhere. With the recent acquisitions of Astro and VoidZero (the team behind Vite, Oxc, and more), Cloudflare has a proven track record of supporting open source dev tools for the common good and staying neutral. Varlock will remain open source (MIT license) and is committed to being a flexible open toolkit, with first-party plugins for the most popular secret vaults and frameworks.
Much of the Varlock roadmap will not change. Better agentic workflows, deeper language support outside of JavaScript, better native encryption utilities, and SOPS-style team vaults without any external backend are all in the works.
But the effort that would have gone into a hosted Varlock solution (which was obviously going to be built on Cloudflare!) will now be redirected into Cloudflare Secrets Store and improving config and secret handling across Cloudflare's platform. We have big plans in store, and can't wait to get them shipped.
We also want .env.schema and the @env-spec syntax to outgrow Varlock itself. We want to push this as an open standard to be integrated into a wide range of technologies. This will require help from outside Cloudflare, so if you are interested, please get in touch!
Secrets in the age of AI #
While these problems are not new, the rise of agents and AI-powered development has amplified them to the point they cannot be ignored. We are dealing with more code and more secrets than ever before. Using AI introduces whole new classes of exploits, like prompt injection, while also accelerating the pace of traditional vulnerabilities and supply chain attacks. At the same time, a new wave of builders using AI tools is encountering API keys for the first time.
This means that secrets management, identity, and access all need to be rethought entirely for this new agentic era. Credential brokering, OpenID Connect (OIDC) and bot identity, better machine flows for issuing and rotating secrets, more guardrails and stronger boundaries, and human-in-the-loop approvals are just some of the things we're working on.
We may eventually get away from most long-lived secrets altogether. But it's a long, bumpy road ahead, and our aim is to help us get there smoothly.
What's next? #
Huge thanks to everyone who has used Varlock and contributed by filing issues and opening pull requests on GitHub. Please keep them coming! If you haven’t tried Varlock yet, check out the Cloudflare Workers integration guide, or just point your agent at our docs to get started.
We have much more coming, both for the Varlock open source project, and for the Cloudflare Secrets Store, in the coming months. For the latest updates, follow @theozero (me), as well as @cloudflaredev and @varlockdev on X, and hop into the Varlock Discord.