dmno-dev/varlock
dmno-dev/varlock has 4,921 GitHub stars and 141 forks. GitHot measured +8 stars in 24 hours, +48 in 7 days, and +101 in 15 days. Last checked 2026-11-07 14:43 UTC. Last push 2026-11-05.
AI에 안전한 .env 파일: 에이전트에는 스키마를, 사람에게는 시크릿을 제공합니다.
측정된 스타 증가
- in 24h
- +8
- in 7 days
- +48
- in 15 days
- +101
- in 1 month
- 업데이트 지연
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalVarlock
AI-safe .env files: Schemas for agents, Secrets for humans.
- 🤖 AI-safe config — agents read your schema, never your secrets
- 🔍 proactive leak scanning via
varlock scan+ git hooks - 🔏 runtime protection — log redaction and leak prevention
- 🛡️ validation, coercion, type safety w/ IntelliSense
- 🌐 flexible multi-environment management — auto .env.* loading and explicit import
- 🔌 plugins to pull data from various backends (1Password, Infisical, AWS, Azure, GCP, HCP Vault, more!)
Unlike .env.example, your .env.schema is a single source of truth, built for collaboration, that will never be out of sync.
# @defaultSensitive=false @defaultRequired=infer @currentEnv=$APP_ENV
# ---
# our environment flag, will control automatic loading of `.env.xxx` files
# @type=enum(development, preview, production, test)
APP_ENV=development # default value, can override
# @type=port
API_PORT=8080 # non-sensitive values can be set directly
# API url including _expansion_ referencing another env var
# @type=url
API_URL=http://localhost:${API_PORT}
# sensitive api key, with extra validation
# @required @sensitive @type=string(startsWith=sk-)
OPENAI_API_KEY=
Flexible plugin system: adds new decorators, functions, types - enables secure declarative secret loading.
# @plugin(@varlock/1password-plugin)
# @initOp(token=$OP_TOKEN, allowAppAuth=forEnv(dev), account=acmeco)
# ---
# @type=opServiceAccountToken @sensitive
OP_TOKEN=
# Fetch secrets using 1Password secret references
DB_PASS=op(op://my-vault/database-password/password)
API_KEY=op(op://api-vault/stripe/api-key)
Installation
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 or the Docker guide for more information.
Workflow
Validate your .env.schema and pretty print your environment variables with:
varlock load
If you need to pass resolved env vars into another process, you can run:
varlock run -- python script.py
In many cases you can use our drop-in integrations for seamless experience - with additional security guardrails, like log redaction and leak prevention.
AI-Safe Config
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.
@env-spec
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.
Published Packages
Core
| Package | Published listing page |
|---|---|
| varlock | |
| @env-spec/parser | |
| @env-spec VSCode extension | VSCode Marketplace, Open VSX Registry |
| varlock Docker image | GitHub Container Registry |
Plugins
Framework Integrations
| Package | Published listing page |
|---|---|
| @varlock/astro-integration | |
| @varlock/cloudflare-integration | |
| @varlock/expo-integration | |
| @varlock/nextjs-integration | |
| @varlock/nuxt-integration | |
| @varlock/vite-integration |
MCP Servers
| MCP Server | Link | URL |
|---|---|---|
| Varlock Docs (HTTP) | Installation | https://docs.mcp.varlock.dev/mcp |
| Varlock Docs (SSE) | Installation | https://docs.mcp.varlock.dev/sse |
Examples
Examples of integrating varlock in various frameworks and situations can be found in the Varlock examples repo
Development & Contribution
See CONTRIBUTING.md for more information.
Thanks to
CI infrastructure sponsored by Depot, fast GitHub Actions runners.
관련 프로젝트 살펴보기
trimstray/the-book-of-secret-knowledge
영감을 주는 목록, 매뉴얼, 치트시트, 블로그, 팁, 원라이너, CLI/웹 도구 등을 모은 컬렉션.
256,789 스타Hack-with-Github/Awesome-Hacking
해커, 펜테스터, 보안 연구자를 위한 다양한 Awesome 목록 모음.
124,920 스타swisskyrepo/PayloadsAllTheThings
웹 애플리케이션 보안과 모의 침투 테스트/CTF에 유용한 페이로드 및 우회 방법 목록.
82,475 스타caddyserver/caddy
빠르고 확장 가능한 멀티플랫폼 HTTP/1-2-3 웹 서버이며, 자동 HTTPS를 지원합니다
78,878 스타