# @adonisjs/lucid

> SQL ORM built on top of Active Record pattern

Latest version **22.4.2** (published 2026-04-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install @adonisjs/lucid
pnpm add @adonisjs/lucid
yarn add @adonisjs/lucid
bun add @adonisjs/lucid
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 22.4.2 |
| Published | 2026-04-05 |
| First published | 2017-07-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=24.0.0 |
| Dependencies | 15 |
| Unpacked size | 1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 1225 |
| Author | virk,adonisjs |
| Maintainers | romainlanz, virk, julien-r44 |

## Links

- npm: https://www.npmjs.com/package/@adonisjs/lucid
- Repository: https://github.com/adonisjs/lucid
- Homepage: https://github.com/adonisjs/lucid#readme
- Issues: https://github.com/adonisjs/lucid/issues
- npm.io page: https://npm.io/package/@adonisjs/lucid

## Dependencies (15)

- [knex](https://npm.io/package/knex.md) ^3.2.8
- [tarn](https://npm.io/package/tarn.md) ^3.0.2
- [kleur](https://npm.io/package/kleur.md) ^4.1.5
- [slash](https://npm.io/package/slash.md) ^5.1.0
- [deepmerge](https://npm.io/package/deepmerge.md) ^4.3.1
- [igniculus](https://npm.io/package/igniculus.md) ^1.5.0
- [@poppinss/qs](https://npm.io/package/@poppinss/qs.md) ^6.15.0
- [pretty-hrtime](https://npm.io/package/pretty-hrtime.md) ^1.0.3
- [@faker-js/faker](https://npm.io/package/@faker-js/faker.md) ^10.4.0
- [@poppinss/hooks](https://npm.io/package/@poppinss/hooks.md) ^7.3.0
- [@poppinss/utils](https://npm.io/package/@poppinss/utils.md) ^7.0.1
- [fast-deep-equal](https://npm.io/package/fast-deep-equal.md) ^3.1.3
- [@adonisjs/presets](https://npm.io/package/@adonisjs/presets.md) ^3.0.0
- [@poppinss/macroable](https://npm.io/package/@poppinss/macroable.md) ^1.1.2
- [knex-dynamic-connection](https://npm.io/package/knex-dynamic-connection.md) ^5.0.1

## Recent versions

- 22.4.2 (latest) — 2026-04-05
- 22.0.0-next.9 (next) — 2026-02-10
- 6.3.0 (legacy) — 2021-03-26
- 10.0.0 (alpha) — 2020-12-01
- 22.4.1 — 2026-03-31
- 22.4.0 — 2026-03-30
- 22.3.0 — 2026-03-28
- 22.2.0 — 2026-03-23
- 22.1.1 — 2026-03-12
- 22.1.0 — 2026-03-06
- 22.0.0 — 2026-02-25
- 22.0.0-next.8 — 2026-02-04
- 22.0.0-next.7 — 2026-01-15
- 21.8.2 — 2026-01-12
- 22.0.0-next.6 — 2026-01-11
- … 171 more at https://npm.io/package/@adonisjs/lucid/versions

## README

# @adonisjs/lucid

<br />

[![gh-workflow-image]][gh-workflow-url] [![npm-image]][npm-url] ![][typescript-image] [![license-image]][license-url]

## Introduction
SQL ORM for AdonisJS built on top of Knex. Comes with a db query builder, Active record ORM, migrations, seeders and model factories.

## Official Documentation
The documentation is available on the [Lucid website](https://lucid.adonisjs.com/docs/introduction)

## Contributing
One of the primary goals of AdonisJS is to have a vibrant community of users and contributors who believes in the principles of the framework.

We encourage you to read the [contribution guide](https://github.com/adonisjs/.github/blob/main/docs/CONTRIBUTING.md) before contributing to the framework.

### Run tests locally
Easiest way to run tests is to launch the redis cluster using docker-compose and `docker-compose.yml` file.

```sh
docker-compose up -d
npm run test
```

## Code of Conduct
In order to ensure that the AdonisJS community is welcoming to all, please review and abide by the [Code of Conduct](https://github.com/adonisjs/.github/blob/main/docs/CODE_OF_CONDUCT.md).

## License
AdonisJS Lucid is open-sourced software licensed under the [MIT license](LICENSE.md).

[gh-workflow-image]: https://img.shields.io/github/actions/workflow/status/adonisjs/lucid/checks.yml?style=for-the-badge
[gh-workflow-url]: https://github.com/adonisjs/lucid/actions/workflows/checks.yml "Github action"

[npm-image]: https://img.shields.io/npm/v/@adonisjs/lucid/latest.svg?style=for-the-badge&logo=npm
[npm-url]: https://www.npmjs.com/package/@adonisjs/lucid/v/latest "npm"

[typescript-image]: https://img.shields.io/badge/Typescript-294E80.svg?style=for-the-badge&logo=typescript

[license-url]: LICENSE.md
[license-image]: https://img.shields.io/github/license/adonisjs/lucid?style=for-the-badge

---
_Source: https://npm.io/package/@adonisjs/lucid · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
