Type‑safe config. Secure secrets. One import.

Configuration that keeps up with your code

Define a single schema, layer sources, and ship strong types and validated values everywhere — server, edge, and client.

ServerEdgeClient
conf/config.ts
import { defineConfig, s, source } from 'confkit';

export const config = defineConfig({
  sources: [
    source().env(),                 // process.env + .env* (in dev)
    source().file('config.yaml'),   // json/yaml/toml by extension
  ],
  schema: {
    NODE_ENV: s.enum(['development','test','production']).default('development'),
    PORT: s.port().default(3000),
    DATABASE_URL: s.url(),
    PUBLIC_APP_NAME: s.string().client().default('confkit'),
    STRIPE_SECRET: s.secret(s.string()),
  },
});
End‑to‑end types from a single schema • Deep redaction of secrets
Terminal
$ npx confkit init
$ confkit check
✔ Schema validated • 0 issues
Works great withNext.jsViteExpoAWSGCPAzure

Type‑safe by design

Define once, get types everywhere. No drift, no guessing.

Layered sources

Env, files, and cloud secrets with predictable precedence.

Secure secrets

Runtime validation and deep redaction out of the box.

First‑class DX

Tiny API, friendly CLI, and fast feedback loops.

Client‑safe exports

Mark public values; secrets stay server‑only by default.

Integrations built‑in

Next, Vite, Expo + cloud providers with zero fuss.

Ship configuration you can trust in minutes

Follow the quickstart to add ConfKit to your project and get validated values with end‑to‑end types.