Introduction

Validate and secure environment variables in Nuxt applications.

This integration requires ArkType to be installed.

The @arkenv/nuxt integration provides end-to-end environment validation for both the server and the browser. It automatically injects your configuration into Nuxt's runtimeConfig, catching configuration bugs early and preventing sensitive server-side variables from ever reaching the client via a custom Vite plugin.

Quickstart

The fastest way to get started is with the ArkEnv CLI. It automatically configures @arkenv/nuxt for your existing Nuxt project.

npx @arkenv/cli@latest init
pnx @arkenv/cli@latest init
yarn dlx @arkenv/cli@latest init
bunx @arkenv/cli@latest init

Layout strategies

ArkEnv supports two layout structures to match your security and developer experience preferences:

Next steps