dmno-dev/varlock
AI-safe .env files: Schemas for agents, Secrets for humans.
What it solves
Varlock solves the problem of managing environment variables and secrets in a way that is safe for AI agents. Traditional .env files often lead to secret leaks or lack of-sync synchronization between example files and actual values. Varlock introduces a schema-based approach where AI agents can understand the configuration requirements (types, validation, descriptions) without ever seeing the actual sensitive values.
How it works
It uses a new DSL called @env-spec to attach schemas and functionality to .env files using JSDoc-style comments. This allows developers to define a single source of truth in a .env.schema file. The tool provides a CLI for loading, validating, and running processes with resolved variables. It also features a plugin system to pull secrets from external backends like 1Password, AWS, Azure, and GCP, and includes a varlock scan command to detect leaked secrets in AI-generated code.
Who it’s for
Developers and teams building AI-integrated applications who need to secure their secrets while providing necessary context to AI agents and maintaining type safety across multiple environments.
Highlights
- AI-Safe Config: Provides agents with variable names and types without exposing secrets.
- Secret Leak Prevention: Proactive scanning via
varlock scanand runtime protection including log redaction. - Type Safety: Offers validation, coercion, and IntelliSense support via a VSCode extension.
- Extensible Backend Support: A wide array of plugins for major secret managers (e.g., HashiCorp Vault, Infisical, 1Password).
- Multi-environment Management: Automatic loading of
.env.*files and explicit imports.
Related
- Project
- Project
- Project
- Project
- Project