Skip to content

Latest commit

 

History

2,151 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ArkEnv Logo

ArkEnv

Typesafe environment variables for ArkType, Zod, and Valibot.
No boilerplate. Zero runtime dependencies.

Test Status npm bundle size ArkType Ecosystem Pullfrog

Important

v1 is in RC. Still on v0? Migrate to v1.

Docs   ⛯   Get started   ⛯   Frameworks   ⛯   Try on StackBlitz


First-class integrations: Next.js, Nuxt, Vite, TanStack Start, SolidStart, and Bun fullstack


ArkType
import arkenv from "@arkenv/core";

export const env = arkenv({
  DATABASE_URL: "string.url",
  PORT: "0 <= number.integer <= 65535 = 3000",
  CI: "boolean = false",
});
Zod
import arkenv from "@arkenv/standard";
import * as z from "zod";

export const env = arkenv({
  DATABASE_URL: z.url(),
  PORT: z.int().min(0).max(65535).default(3000),
  CI: z.boolean().default(false),
});
Valibot
import arkenv from "@arkenv/standard/valibot";
import * as v from "valibot";

export const env = arkenv({
  DATABASE_URL: v.pipe(v.string(), v.url()),
  PORT: v.optional(
    v.pipe(v.number(), v.integer(), v.minValue(0), v.maxValue(65535)),
    3000,
  ),
  CI: v.optional(v.boolean(), false),
});

npm
npx arkenv init
pnpm
pnpm dlx arkenv init
Yarn
yarn dlx arkenv init
Bun
bunx arkenv init


Supporting ArkEnv

If you love ArkEnv, you can support the project by starring it on GitHub!

You are also welcome to contribute to the project and join the wonderful people who have contributed:

Yam C Borodetsky
Yam C Borodetsky

💻 💬 🤔 🎨 📖 🐛 💡 🚇 🔌 🔧 ⚠️
Aruay Berdikulova
Aruay Berdikulova

💻 🤔
David Blass
David Blass

🤔 🧑‍🏫 💬
Andrei Danciu
Andrei Danciu

🔌 💻
Joakim Carlstein
Joakim Carlstein

💻 🔌 📖
RoomWithOutRoof
RoomWithOutRoof

📖 🔧
Abhimanyu Tiwari
Abhimanyu Tiwari

💻 📖 💡 ⚠️ 🔧

We acknowledge the various projects and people that inspired ArkEnv.

About

⛯ Typesafe environment variables for ArkType, Zod, and Valibot.

Topics

Resources

Contributing

Stars

142 stars

Watchers

2 watching

Forks

Releases

Used by

Contributors

Languages