> See https://varlock.dev for docs and examples.
npm install varlock> See https://varlock.dev for docs and examples.
_A sample .env.schema_:
``bash@currentEnv=$APP_ENV
---
Installation
You can get started with varlock by installing the CLI:
`bash
Install as a dependency in a js project
npm install varlockOR as standalone CLI via homebrew
brew install dmno-dev/tap/varlockOR via cURL
curl -sSfL https://varlock.dev/install.sh | sh -s
`See the full installation docs.
Workflow
Validate your
.env.schema with: `bash
varlock load
`If you need to pass resolved env vars into another process, you can run:
`bash
varlock run -- node script.js
``Or you can integrate more deeply with one of our integrations to get log redaction and leak prevention.
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.