Start with an example
Start with an example ArkEnv project.
An empty directory is the fastest way to see a typed env object.
ArkEnv's CLI scaffolds an example there, before you add one to your
own repo.
npx arkenv init --example <example-name>Run that in an empty directory. The CLI writes the example in place.
Pass --force only when you accept overwriting files that are already
there.
Repo already has application code?
Skip --example and follow
Installation instead. Init will
adopt the existing project.
Examples
Each card is an --example name. Pass that name and the CLI scaffolds
the project.
basic
Minimal Node.js project with ArkType (Recommended)
basic-js
Minimal Node.js app in plain JavaScript (runtime validates without TypeScript)
with-nextjs
Minimal Next.js project with ArkType
with-nextjs-zod
Minimal Next.js project with @arkenv/nextjs/standard and Zod
with-nuxt
Minimal Nuxt project with ArkType
with-vite-react
React + Vite + ArkType (Client-side inlining)
with-vite-react-zod
React + Vite with @arkenv/vite-plugin/standard and Zod
with-tanstack-start
TanStack Start with @arkenv/vite-plugin
with-tanstack-start-rsbuild
TanStack Start with @arkenv/rsbuild-plugin
with-solid-start
SolidStart with @arkenv/vite-plugin
with-bun
Minimal Bun project with ArkType
with-bun-react
React + Bun.serve + ArkType
with-zod
Minimal Node.js project using Zod instead of ArkType
with-valibot
Minimal Node.js project using Valibot instead of ArkType
mix-and-match
Minimal Node.js project mixing ArkType, Zod, and Valibot in @arkenv/core
Want the files without the CLI?
degit copies the example directory. You still install dependencies
and copy .env.example yourself.
npx degit yamcodes/arkenv/examples/<example-name> <project-name>
cd <project-name>
cp .env.example .env
npm install
npm run dev