Kadak

Installation

Install KadakORM and create a client that runs immediately.

Installation

You want to verify your setup quickly.

This page gives you a copy-paste setup that connects and runs a real query.

1. Install

pnpm add @shyk/kadak-orm postgres zod

2. Create db.ts

import { connect, table } from '@shyk/kadak-orm'

const users = table('users', {
  id: 'id',
  email: 'email',
  name: 'text',
})

export const db = connect('postgres://postgres:postgres@localhost:5432/kadak_demo', { users })

3. Run one query

import { db } from './db'

const row = await db.users.insert({ email: 'amit@example.com', name: 'Amit' })
console.log(row)
await db.close()

Important: connect() always takes exactly two arguments: (configOrUrl, tables).

Need advanced options like retries and replicas? See Runtime Controls.

On this page