# @withstudiocms/kysely

> Type-safe database client and migration system for StudioCMS, built on top of Kysely

Latest version **0.2.1** (published 2026-03-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install @withstudiocms/kysely
pnpm add @withstudiocms/kysely
yarn add @withstudiocms/kysely
bun add @withstudiocms/kysely
```

## Health

**Score 50/100 (C)** — status: stable.

Positive: no vulnerabilities; high maintenance score.

Warnings: low downloads; no types; no esm support; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2026-03-10 |
| First published | 2025-11-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 830 |
| Author | withstudiocms |
| Maintainers | adammatthiesen |

## Links

- npm: https://www.npmjs.com/package/@withstudiocms/kysely
- Repository: https://github.com/withstudiocms/studiocms
- Homepage: https://studiocms.dev
- Issues: https://github.com/withstudiocms/studiocms/issues
- npm.io page: https://npm.io/package/@withstudiocms/kysely

## Recent versions

- 0.2.1 (latest) — 2026-03-10
- 0.0.0-beta.0 (prepare) — 2025-11-25
- 0.2.0 — 2026-01-27
- 0.1.0 — 2026-01-15
- 0.1.0-beta.1 — 2025-12-17

## README

# @withstudiocms/kysely

[![codecov](https://codecov.io/github/withstudiocms/studiocms/graph/badge.svg?token=RN8LT1O5E2&component=withstudiocms_kysely)](https://codecov.io/github/withstudiocms/studiocms)


A type-safe database client and migration system for StudioCMS, built on top of [Kysely](https://kysely.dev/). Provides a unified interface for working with libSQL, MySQL, and PostgreSQL databases with runtime schema management and migrations.

**Note:** This is an internal StudioCMS package. It is not intended to be used directly outside of the StudioCMS ecosystem.

## Features

- 🔒 **Type-Safe Database Operations** - Full TypeScript support with Kysely's type-safe query builder
- 🗄️ **Multi-Database Support** - Works with libSQL (Turso), MySQL, and PostgreSQL
- 🔄 **Runtime Schema Management** - Dynamic schema creation and validation
- 🛡️ **Error Handling** - Custom error types for better debugging
- 🚀 **TypeScript-Based Migrations** - File-based migrations with automatic tracking
- 🔍 **Schema Introspection** - Inspect and validate database schemas at runtime
- ⚡ **Effect-ts Integration** - Functional programming patterns with Effect-ts

## License

[MIT Licensed](./LICENSE)

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