Arkormˣ is a framework-agnostic ORM designed to run anywhere Node.js runs. It brings a familiar model layer and fluent query builder on top of adapter-backed execution, with Prisma compatibility available as an optional 2.x compatibility path.
- Adapter-backed query execution with practical ORM ergonomics.
- Adapter-first runtime setup with Kysely/Postgres support and optional Prisma compatibility for existing 2.x integrations.
- End-to-end guides for setup, querying, relationships, migrations, and CLI usage.
- Full TypeScript support, providing strong typing and improved developer experience.
- Follows best practices for security, ensuring your data is protected.
- Open source and welcomes contributions from developers around the world.
- Intuitive API that feels familiar to users transitioning from Eloquent or other ORMs, making it easy to learn and adopt.
Stable release:
pnpm add arkormx kysely pgPreview release (next):
pnpm add arkormx@next kysely pgPrimary runtime path:
import { createKyselyAdapter, defineConfig } from 'arkormx'
import { Kysely, PostgresDialect } from 'kysely'
import { Pool } from 'pg'
export default defineConfig({
adapter: createKyselyAdapter(
new Kysely<Record<string, never>>({
dialect: new PostgresDialect({
pool: new Pool({
connectionString: process.env.DATABASE_URL,
}),
}),
}),
),
})Optional compatibility/runtime config for CLI and transaction helpers:
Create arkormx.config.js in your project root:
import { defineConfig } from 'arkormx'
import { PrismaClient } from '@prisma/client'
const prisma = new PrismaClient()
export default defineConfig({
prisma: () => prisma,
})Or run the Arkormˣ CLI command npx arkorm init to initialize your project along with configuration.
import { Model } from 'arkormx'
type UserAttributes = {
id: number
email: string
name: string
isActive: boolean
}
export class User extends Model<UserAttributes> {}pnpm add @prisma/client
pnpm add -D prismaconst users = await User.query().whereKey('isActive', true).latest().limit(10).get()await User.transaction(async () => {
await User.query().create({
name: 'Mia',
email: 'mia@example.com',
isActive: 1,
})
await User.query().where({ email: 'john@example.com' }).updateFrom({ isActive: 1 })
})