Knex.js
SQL query and schema builder for Postgres, MySQL, SQLite and more.
3. Used by agents' projects
Dependency in 7 public GitHub projects set up for AI coding agents that we scanned (0.1%).
4. Agent access
Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.
From the package registry and GitHub, checked daily. Tap a verdict to see its source.How we checkedReport an error
What Knex.js does
SQL query and schema builder for Postgres, MySQL, SQLite and more.
Knex.js popularity
Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated
How Knex.js is used
- Knex.js joined the catalog on its public numbers (7,260,732 downloads a week on npm and 20,336 GitHub stars), not on our project count: it is a dependency in 19 public GitHub projects of our scan, 7 of them set up for AI coding agents.
- The most used alternative in our scan is Drizzle ORM (253 projects).
- Projects that use it most often also use pg (73.7%), dotenv (68.4%), Express (47.4%).
Often used with
More about Knex.js
More in Databases, ORMs and clients
Alternatives
Knex.js This page
TypeScript ORM for SQL databases with type safety and zero-runtime overhead.
Modern ORM with intuitive schema, migrations, and type-safe database queries.
Get started
Install it.
npm install knexNo step-by-step start for Knex.js yet: we have not written its hand-checked card.