Start with an example
Start with an example ArkEnv project.
Use the interactive CLI to bootstrap an example with your favorite tooling:
npx arkenv init --example <example-name>pnpm dlx arkenv init --example <example-name>yarn dlx arkenv init --example <example-name>bunx arkenv init --example <example-name>Run it in an empty directory, or pass --force to overwrite.
For a repo that already has application code, skip --example and follow
Installation.
Examples
The following examples can be bootstrapped with the CLI. Just use the --example <example-name> flag with the corresponding name.
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
For a more manual approach, you can clone an example and run it locally using degit:
npx degit yamcodes/arkenv/examples/<example-name> <project-name>
cd <project-name>
cp .env.example .env
npm install
npm run devpnpm dlx degit yamcodes/arkenv/examples/<example-name> <project-name>
cd <project-name>
cp .env.example .env
pnpm install
pnpm run devyarn dlx degit yamcodes/arkenv/examples/<example-name> <project-name>
cd <project-name>
cp .env.example .env
yarn install
yarn devbunx degit yamcodes/arkenv/examples/<example-name> <project-name>
cd <project-name>
cp .env.example .env
bun install
bun run dev