Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/fajarnugraha37/drizzle-castor/llms.txt

Use this file to discover all available pages before exploring further.

Drizzle Castor is published to both the npm registry (under the @fajarnugraha37 scope) and the JSR registry (under the @fajar scope). Choose the registry that best fits your runtime and toolchain. Both distributions are functionally identical; the JSR package exports the TypeScript source directly, making it the preferred choice for Deno and ESM-first projects.

Install from npm

The npm package ships pre-built CommonJS and ESM bundles along with TypeScript declaration files. It works with Bun, Node.js, and any bundler that supports the exports field in package.json.
bun add @fajarnugraha37/drizzle-castor

Install from JSR

The JSR package (@fajar/drizzle-castor) exports the raw TypeScript source and is recommended for Deno or projects that prefer ESM-first workflows.
bunx jsr add @fajar/drizzle-castor

Peer dependencies

Drizzle Castor requires the following peer dependencies to be installed alongside it:
PackageVersionNotes
drizzle-orm^0.30Included as a direct dependency (0.45.2+)
typescript^5.0Required for type inference; listed as a peer dependency
drizzle-orm is declared as a direct dependency in Drizzle Castor’s package.json, so your package manager will install it automatically. TypeScript is a peer dependency, meaning you must have it installed in your project separately.
Install both together in one command:
bun
bun add @fajarnugraha37/drizzle-castor drizzle-orm && bun add -d typescript

Runtime requirements

Bun 1.0+

Bun is the recommended runtime. The Bun SQLite adapter (drizzle-orm/bun-sqlite) works out of the box with no additional native dependencies.

Node.js

Node.js is fully supported. Use better-sqlite3, pg, or mysql2 as your Drizzle database driver depending on your chosen dialect.

Current version

The current stable release is 0.1.2 (npm) / 0.1.0 (JSR). You can verify the installed version at any time:
# npm / bun / pnpm / yarn
cat node_modules/@fajarnugraha37/drizzle-castor/package.json | grep '"version"'

ESM and CJS support

The npm package uses the exports field in package.json to serve both module formats from the same installation:
package.json (drizzle-castor)
{
  "exports": {
    ".": {
      "types": "./dist/index.d.ts",
      "import": "./dist/index.js",
      "require": "./dist/index.cjs"
    }
  }
}
  • ESM (import): ./dist/index.js
  • CJS (require): ./dist/index.cjs
  • TypeScript types: ./dist/index.d.ts
No extra configuration is needed. Your bundler or runtime picks the correct format automatically based on your project’s "type" field or the import / require call syntax you use.
The JSR distribution exports the raw TypeScript source (./src/index.ts). It does not include pre-built CJS bundles. If you need CommonJS output from the JSR package, run it through your own TypeScript build step.

What’s next

Quickstart

Configure the schema builder and run your first queries in under five minutes.

Introduction

Learn what Drizzle Castor is, the problems it solves, and how it works.

Build docs developers (and LLMs) love