Skip to content
Back to search

varlock

AI-safe .env files: Schemas for agents, Secrets for humans.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/dmno-dev/varlock with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/dmno-dev/varlock'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/dmno-dev--varlock/badge.svg)](/listings/dmno-dev--varlock)

HTML

<a href="/listings/dmno-dev--varlock"><img src="/api/listings/dmno-dev--varlock/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

These steps run a script from the network that findsafeskills does not scan.

You can get started with varlock by installing the CLI:

# Run the installation wizard, which will install as a dependency in a JavaScript project
npx varlock init

# Or install as standalone binary
brew install dmno-dev/tap/varlock # via homebrew
curl -sSfL https://varlock.dev/install.sh | sh -s # via cURL

# Or use the official Docker image
docker pull ghcr.io/dmno-dev/varlock:latest

See the full [installation docs](https://varlock.dev/getting-started/installation/) or the [Docker guide](https://varlock.dev/integrations/docker/) for more information.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 172 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. <p align="center">
  2. <a href="https://varlock.dev" target="_blank" rel="noopener noreferrer">
  3. <img src="/packages/varlock-website/src/assets/logos/wordmark.png" alt="Varlock banner">
  4. </a>
  5. </p>
  6. <br/>
  7. <p align="center">
  8. <a href="https://npmx.dev/package/varlock"><img src="https://img.shields.io/npm/v/varlock.svg" alt="npm package"></a>
  9. <a href="/LICENSE.md"><img src="https://img.shields.io/npm/l/varlock.svg" alt="license"></a>
  10. <a href="https://nodejs.org/en/about/previous-releases"><img src="https://img.shields.io/node/v/varlock.svg" alt="node compatibility"></a>
  11. <a href="https://github.com/dmno-dev/varlock/actions/workflows/test.yaml"><img src="https://img.shields.io/github/actions/workflow/status/dmno-dev/varlock/test.yaml?style=flat&logo=github&label=CI" alt="build status"></a>
  12. <a href="https://chat.dmno.dev"><img src="https://img.shields.io/badge/chat-discord-5865F2?style=flat&logo=discord" alt="discord chat"></a>
  13. <a href="https://depot.dev"><img src="https://img.shields.io/badge/CI%20powered%20by-Depot-46A75A?style=flat" alt="CI powered by Depot"></a>
  14. </p>
  15. <br/>
  16. ## Varlock
  17. > AI-safe .env files: Schemas for agents, Secrets for humans.
  18. - 🤖 AI-safe config — agents read your schema, never your secrets
  19. - 🔍 proactive leak scanning via `varlock scan` + git hooks
  20. - 🔏 runtime protection — log redaction and leak prevention
  21. - 🛡️ validation, coercion, type safety w/ IntelliSense
  22. - 🌐 flexible multi-environment management — auto .env.* loading and explicit import
  23. - 🔌 [plugins](https://varlock.dev/plugins/overview/) to pull data from various backends (1Password, Infisical, AWS, Azure, GCP, HCP Vault, more!)
  24. Unlike .env.example, **your .env.schema is a single source of truth**, built for collaboration, that will never be out of sync.
  25. ```bash
  26. # @defaultSensitive=false @defaultRequired=infer @currentEnv=$APP_ENV
  27. # ---
  28. # our environment flag, will control automatic loading of `.env.xxx` files
  29. # @type=enum(development, preview, production, test)
  30. APP_ENV=development # default value, can override
  31. # @type=port
  32. API_PORT=8080 # non-sensitive values can be set directly
  33. # API url including _expansion_ referencing another env var
  34. # @type=url
  35. API_URL=http://localhost:${API_PORT}
  36. # sensitive api key, with extra validation
  37. # @required @sensitive @type=string(startsWith=sk-)
  38. OPENAI_API_KEY=
  39. ```
  40. **Flexible plugin system**: adds new decorators, functions, types - enables secure declarative secret loading.
  41. ```bash
  42. # @plugin(@varlock/1password-plugin)
  43. # @initOp(token=$OP_TOKEN, allowAppAuth=forEnv(dev), account=acmeco)
  44. # ---
  45. # @type=opServiceAccountToken @sensitive
  46. OP_TOKEN=
  47. # Fetch secrets using 1Password secret references
  48. DB_PASS=op(op://my-vault/database-password/password)
  49. API_KEY=op(op://api-vault/stripe/api-key)
  50. ```
  51. ## Installation
  52. You can get started with varlock by installing the CLI:
  53. ```bash
  54. # Run the installation wizard, which will install as a dependency in a JavaScript project
  55. npx varlock init
  56. # Or install as standalone binary
  57. brew install dmno-dev/tap/varlock # via homebrew
  58. curl -sSfL https://varlock.dev/install.sh | sh -s # via cURL
  59. # Or use the official Docker image
  60. docker pull ghcr.io/dmno-dev/varlock:latest
  61. ```
  62. See the full [installation docs](https://varlock.dev/getting-started/installation/) or the [Docker guide](https://varlock.dev/integrations/docker/) for more information.
  63. ## Workflow
  64. Validate your `.env.schema` and pretty print your environment variables with:
  65. ```bash
  66. varlock load
  67. ```
  68. If you need to pass resolved env vars into another process, you can run:
  69. ```bash
  70. varlock run -- python script.py
  71. ```
  72. In many cases you can use our [drop-in integrations](https://varlock.dev/integrations/javascript/) for seamless experience - with additional security guardrails, like log redaction and leak prevention.
  73. ## AI-Safe Config
  74. Your `.env.schema` gives AI agents full context on your config — variable names, types, validation rules, descriptions — without ever exposing secret values. Combined with `varlock scan` to catch leaked secrets in AI-generated code, varlock is purpose-built for the AI era. Learn more in the [AI-safe config guide](https://varlock.dev/guides/ai-tools/).
  75. ## @env-spec
  76. Varlock is built on top of @env-spec, a new DSL for attaching a schema and additional functionality to .env files using JSDoc style comments. The @env-spec package contains a parser and info about the spec itself.
  77. - @env-spec [docs](https://varlock.dev/env-spec/overview/)
  78. - @env-spec [RFC](https://github.com/dmno-dev/varlock/discussions/17)
  79. ## Published Packages
  80. ### Core
  81. | Package | Published listing page |
  82. | --- | --- |
  83. | [varlock](packages/varlock) | [![npm version](https://img.shields.io/npm/v/varlock.svg)](https://npmx.dev/package/varlock) |
  84. | [@env-spec/parser](packages/env-spec-parser) | [![npm version](https://img.shields.io/npm/v/@env-spec/parser.svg)](https://npmx.dev/package/@env-spec/parser) |
  85. | [@env-spec VSCode extension](packages/vscode-plugin) | [VSCode Marketplace](https://marketplace.visualstudio.com/items?itemName=varlock.env-spec-language), [Open VSX Registry](https://open-vsx.org/extension/varlock/env-spec-language) |
  86. | [varlock Docker image](Dockerfile) | [GitHub Container Registry](https://github.com/orgs/dmno-dev/packages/container/package/varlock) |
  87. ### Plugins
  88. | Package | Published listing page |
  89. | --- | --- |
  90. | [@varlock/1password-plugin](packages/plugins/1password) | [![npm version](https://img.shields.io/npm/v/@varlock/1password-plugin.svg)](https://npmx.dev/package/@varlock/1password-plugin) |
  91. | [@varlock/aws-secrets-plugin](packages/plugins/aws-secrets) | [![npm version](https://img.shields.io/npm/v/@varlock/aws-secrets-plugin.svg)](https://npmx.dev/package/@varlock/aws-secrets-plugin) |
  92. | [@varlock/azure-key-vault-plugin](packages/plugins/azure-key-vault) | [![npm version](https://img.shields.io/npm/v/@varlock/azure-key-vault-plugin.svg)](https://npmx.dev/package/@varlock/azure-key-vault-plugin) |
  93. | [@varlock/bitwarden-plugin](packages/plugins/bitwarden) | [![npm version](https://img.shields.io/npm/v/@varlock/bitwarden-plugin.svg)](https://npmx.dev/package/@varlock/bitwarden-plugin) |
  94. | [@varlock/dashlane-plugin](packages/plugins/dashlane) | [![npm version](https://img.shields.io/npm/v/@varlock/dashlane-plugin.svg)](https://npmx.dev/package/@varlock/dashlane-plugin) |
  95. | [@varlock/doppler-plugin](packages/plugins/doppler) | [![npm version](https://img.shields.io/npm/v/@varlock/doppler-plugin.svg)](https://npmx.dev/package/@varlock/doppler-plugin) |
  96. | [@varlock/effect-plugin](packages/plugins/effect) | [![npm version](https://img.shields.io/npm/v/@varlock/effect-plugin.svg)](https://npmx.dev/package/@varlock/effect-plugin) |
  97. | [@varlock/google-secret-manager-plugin](packages/plugins/google-secret-manager) | [![npm version](https://img.shields.io/npm/v/@varlock/google-secret-manager-plugin.svg)](https://npmx.dev/package/@varlock/google-secret-manager-plugin) |
  98. | [@varlock/hashicorp-vault-plugin](packages/plugins/hashicorp-vault) | [![npm version](https://img.shields.io/npm/v/@varlock/hashicorp-vault-plugin.svg)](https://npmx.dev/package/@varlock/hashicorp-vault-plugin) |
  99. | [@varlock/infisical-plugin](packages/plugins/infisical) | [![npm version](https://img.shields.io/npm/v/@varlock/infisical-plugin.svg)](https://npmx.dev/package/@varlock/infisical-plugin) |
  100. | [@varlock/keepass-plugin](packages/plugins/keepass) | [![npm version](https://img.shields.io/npm/v/@varlock/keepass-plugin.svg)](https://npmx.dev/package/@varlock/keepass-plugin) |
  101. | [@varlock/kubernetes-plugin](packages/plugins/kubernetes) | [![npm version](https://img.shields.io/npm/v/@varlock/kubernetes-plugin.svg)](https://npmx.dev/package/@varlock/kubernetes-plugin) |
  102. | [@varlock/pass-plugin](packages/plugins/pass) | [![npm version](https://img.shields.io/npm/v/@varlock/pass-plugin.svg)](https://npmx.dev/package/@varlock/pass-plugin) |
  103. | [@varlock/passbolt-plugin](packages/plugins/passbolt) | [![npm version](https://img.shields.io/npm/v/@varlock/passbolt-plugin.svg)](https://npmx.dev/package/@varlock/passbolt-plugin) |
  104. | [@varlock/proton-pass-plugin](packages/plugins/proton-pass) | [![npm version](https://img.shields.io/npm/v/@varlock/proton-pass-plugin.svg)](https://npmx.dev/package/@varlock/proton-pass-plugin) |
  105. ### Framework Integrations
  106. | Package | Published listing page |
  107. | --- | --- |
  108. | [@varlock/astro-integration](packages/integrations/astro) | [![npm version](https://img.shields.io/npm/v/@varlock/astro-integration.svg)](https://npmx.dev/package/@varlock/astro-integration) |
  109. | [@varlock/cloudflare-integration](packages/integrations/cloudflare) | [![npm version](https://img.shields.io/npm/v/@varlock/cloudflare-integration.svg)](https://npmx.dev/package/@varlock/cloudflare-integration) |
  110. | [@varlock/expo-integration](packages/integrations/expo) | [![npm version](https://img.shields.io/npm/v/@varlock/expo-integration.svg)](https://npmx.dev/package/@varlock/expo-integration) |
  111. | [@varlock/nextjs-integration](packages/integrations/nextjs) | [![npm version](https://img.shields.io/npm/v/@varlock/nextjs-integration.svg)](https://npmx.dev/package/@varlock/nextjs-integration) |
  112. | [@varlock/nuxt-integration](packages/integrations/nuxt) | [![npm version](https://img.shields.io/npm/v/@varlock/nuxt-integration.svg)](https://npmx.dev/package/@varlock/nuxt-integration) |
  113. | [@varlock/vite-integration](packages/integrations/vite) | [![npm version](https://img.shields.io/npm/v/@varlock/vite-integration.svg)](https://npmx.dev/package/@varlock/vite-integration) |
  114. ## MCP Servers
  115. | MCP Server | Link | URL |
  116. | --- | --- | --- |
  117. | Varlock Docs (HTTP) | [Installation](https://varlock.dev/guides/mcp/docs-mcp/) | https://docs.mcp.varlock.dev/mcp |
  118. | Varlock Docs (SSE) | [Installation](https://varlock.dev/guides/mcp/docs-mcp/) | https://docs.mcp.varlock.dev/sse |
  119. ## Examples
  120. Examples of integrating varlock in various frameworks and situations can be found in the [Varlock examples repo](https://github.com/dmno-dev/varlock-examples)
  121. ## Development & Contribution
  122. See [CONTRIBUTING.md](CONTRIBUTING.md) for more information.
  123. ## Thanks to
  124. <a href="https://depot.dev">
  125. <picture>
  126. <source media="(prefers-color-scheme: dark)" srcset="https://depot.dev/assets/brand/1693758816/depot-logo-horizontal-on-dark.svg">
  127. <source media="(prefers-color-scheme: light)" srcset="https://depot.dev/assets/brand/1693758816/depot-logo-horizontal-on-light.svg">
  128. <img alt="Depot" src="https://depot.dev/assets/brand/1693758816/depot-logo-horizontal-on-light.svg" width="150">
  129. </picture>
  130. </a>
  131. CI infrastructure sponsored by [Depot](https://depot.dev), fast GitHub Actions runners.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.