This package helps you integrate varlock into a Nuxt project.
See our docs site for complete installation and usage instructions.
It is designed as a Nuxt module that adds varlock to both the Vite config and the Nitro server build, so .env files are loaded and validated by varlock across dev, build, and the production server.
Compared to the default Nuxt behavior, this package provides:
- Validation of your env vars against your
.env.schema - Type-generation and type-safe env var access with built-in docs
- Redaction of sensitive values from logs during build and dev time
- Automatic leak prevention of sensitive items at build and runtime
- More flexible multi-env handling
npm install @varlock/nuxt-integration varlock
# or
bun add @varlock/nuxt-integration varlockAdd the module to your nuxt.config.ts:
export default defineNuxtConfig({
modules: ['@varlock/nuxt-integration'],
})Then run varlock init to set up your .env.schema file based on your existing .env files.