Installation
MountSQLI is a pnpm monorepo, but you install it like any other package. The core package re-exports the tree-shakeable surface; driver packages are added separately.
Install the core
Section titled “Install the core”npm install @mountsqli/corepnpm add @mountsqli/coreyarn add @mountsqli/corebun add @mountsqli/coreInstall a driver
Section titled “Install a driver”Pick the driver for your database. Each driver self-registers on import.
pnpm add @mountsqli/driver-sqliteUses Node’s built-in node:sqlite. Requires Node ≥ 22.5.
pnpm add @mountsqli/driver-postgresDepends on pg.
pnpm add @mountsqli/driver-mysqlDepends on mysql2.
Install subsystems (optional)
Section titled “Install subsystems (optional)”Add only what you use. Each is a separate package:
pnpm add @mountsqli/auth # passwords, JWT, RBAC, RLS, OAuthpnpm add @mountsqli/api # REST / OpenAPI / RPC codegenpnpm add @mountsqli/storage # signed URLs, versioning, S3pnpm add @mountsqli/realtime # hub, presence, live queriespnpm add @mountsqli/cache # L1/L2/query cachepnpm add @mountsqli/ai # natural language to SQLRequirements
Section titled “Requirements”| Tool | Minimum |
|---|---|
| Node.js | 22.5+ (for the node:sqlite driver) |
| pnpm | 11 (recommended) |
| TypeScript | 5.9+ |
| Module system | ESM only |
Verify the install
Section titled “Verify the install”import { mountsqli, defineTable, int, text } from "@mountsqli/core";
const ping = defineTable("ping", { id: int().pk() });const db = mountsqli({ driver: "sqlite", url: ":memory:", tables: [ping] });
console.log("MountSQLI is ready");Common mistakes
Section titled “Common mistakes”- Forgetting to install a driver — you get a
MountError("CONFIG", "unknown driver"). - Using CommonJS
require— MountSQLI is ESM-only.
Related
Section titled “Related”- Quick Start — first query end to end.
- Drivers — when to use each driver.
