Installation
There are two ways to install varlock:
- Install as a
package.jsondependency in JavaScript/TypeScript projects - Install as a standalone binary
If you prefer to let your AI agent install Varlock for you, you can skip these instructions and build a prompt for your agent:
Docs MCP
Section titled “Docs MCP”There is also a Docs MCP server that exposes a search tool. See more details here.
As a JavaScript/TypeScript dependency
Section titled “As a JavaScript/TypeScript dependency”Requires:
- Node.js version 22 or higher
Installation
Section titled “Installation”To install varlock in your project, run:
npx varlock initpnpm dlx varlock initbunx varlock initvlx varlock inityarn dlx varlock initThis will install varlock as a dependency and scan your project for .env files and create a .env.schema file in the root of your project. Depending on your project configuration, it will optionally:
- Remove your existing
.env.examplefile - Add decorators to your
.env.schemafile to specify the type of each environment variable
For AI agent workflows, use non-interactive mode instead:
npx varlock init --agentpnpm dlx varlock init --agentbunx varlock init --agentvlx varlock init --agentyarn dlx varlock init --agentAs a standalone binary
Section titled “As a standalone binary”To install varlock CLI as a binary, run:
# Install via homebrewbrew install dmno-dev/tap/varlock
# OR via cURLcurl -sSfL https://varlock.dev/install.sh | sh -sThen run the setup wizard to help you get started:
varlock initVarlock skill
Section titled “Varlock skill”Then install the Varlock agent skill:
npx skills add dmno-dev/varlockRequires GitHub CLI v2.90+.
gh skill install dmno-dev/varlock varlockSee the AI Tools guide for update commands and agent-specific options.