AI安全的.env文件:面向代理的Schema,面向人类的机密。
面向 AI 的安全 .env 文件:为代理提供模式,为人类提供机密。
varlock scan 和 git 钩子进行主动泄漏扫描与 .env.example 不同,你的 .env.schema 是唯一的真相来源,专为协作而构建,永远不会不同步。
# @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=灵活的插件系统:添加新的装饰器、函数、类型——支持安全的声明式密钥加载。
# @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)你可以通过安装 CLI 来开始使用 varlock:
# 运行安装向导,它将立即
<a href="https://varlock.dev" target="_blank" rel="noopener noreferrer">
<a href="https://npmx.dev/package/varlock"></a>
<a href="/LICENSE.md"></a>
<a href="https://nodejs.org/en/about/previous-releases"></a>
<a href="https://github.com/dmno-dev/varlock/actions/workflows/test.yaml"></a>
<a href="https://chat.dmno.dev"></a>暂无开放 Issues,或尚未同步最近议题。