Morbid is a schema-aware TypeScript query builder for PostgreSQL that generates TypeScript definitions from your database schema using a CLI tool. Version 1.0.4 is current; project is in early development (work in progress, not production-ready). It differentiates from Knex.js by providing strong type safety out of the box via schema extraction, transactions with isolation levels, and chainable query methods. Release cadence is low; community contributions welcome.
npm install morbid-postgresNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Generates TypeScript definitions from PostgreSQL schema, then uses Morbid to perform queries and transactions.
Do not use in production; pin exact version if you must use.
N/A
Use import syntax and ensure your project is configured for ESM.
Import using the generated file name with .ts extension (e.g., './output-definition.ts').
Change to: import { Morbid } from 'morbid'Run: npm install morbid && npm install --save-dev @types/pg typescript
Run the Generate function with the correct destination and ensure the file exists.