{"_id":"kysely-supabase","_rev":"3-a0f1bf71c5678f71c1cf19d12aeef609","name":"kysely-supabase","dist-tags":{"latest":"0.2.1"},"versions":{"0.1.0":{"name":"kysely-supabase","version":"0.1.0","keywords":["kysely","supabase","postgres","postgresql","typescript","types"],"author":{"name":"Igal Klebanov","email":"igalklebanov@gmail.com"},"license":"MIT","_id":"kysely-supabase@0.1.0","maintainers":[{"name":"igalklebanov","email":"igalklebanov@gmail.com"}],"homepage":"https://github.com/kysely-org/kysely-supabase","bugs":{"url":"https://github.com/kysely-org/kysely-supabase/issues"},"dist":{"shasum":"dbf30d8a26ae064a898f0596a155a9f90b6270f9","tarball":"https://registry.npmjs.org/kysely-supabase/-/kysely-supabase-0.1.0.tgz","fileCount":12,"integrity":"sha512-BYPKnUZntf7+MoPvoWjosTgmHT0o5no2FVhHGm9oVEWNUL+Ez9QtamPyCgDDvlhelz7x2QVjhCyxNr0dZBAIKg==","signatures":[{"sig":"MEUCIQDK2tKR7aYeK4KZN83c+G6Plh9cdyQTIiu8LrKDjd5KEQIge/tKhPzxhcdOd3TDBy763ArMEicvMB3r0DE4HbqmVjg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11994},"main":"./dist/cjs/index.js","_from":"file:kysely-supabase-0.1.0.tgz","types":"./dist/cjs/index.d.ts","module":"./dist/esm/index.js","exports":{".":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"scripts":{"fmt":"prettier --write .","lint":"eslint src --ext .ts","test":"pnpm build && pnpm test:typings","build":"tsup && node ./scripts/dist-fix.js","clean":"rm -rf dist","init:db":"supabase start && supabase db reset && supabase gen types typescript --local > schema.gen.ts","fmt:check":"prettier --check .","type-check":"tsc --noEmit","test:typings":"tsd tests/typings"},"_npmUser":{"name":"igalklebanov","email":"igalklebanov@gmail.com"},"_resolved":"/tmp/d719dd8381152f31afaee17ec4bcfba1/kysely-supabase-0.1.0.tgz","_integrity":"sha512-BYPKnUZntf7+MoPvoWjosTgmHT0o5no2FVhHGm9oVEWNUL+Ez9QtamPyCgDDvlhelz7x2QVjhCyxNr0dZBAIKg==","repository":{"url":"git+https://github.com/kysely-org/kysely-supabase.git","type":"git"},"_npmVersion":"9.7.2","description":"Kysely type translators for Supabase","directories":{},"sideEffects":false,"_nodeVersion":"20.4.0","_hasShrinkwrap":false,"devDependencies":{"tsd":"^0.31.0","tsup":"^8.0.2","eslint":"^8.57.0","kysely":"^0.27.3","esbuild":"^0.20.2","prettier":"^3.2.5","supabase":"^1.153.4","type-fest":"^4.15.0","typescript":"^5.4.4","@types/chai":"^4.3.14","@types/node":"^20.12.4","@types/mocha":"^10.0.6","@tsconfig/node20":"^20.1.4","prettier-plugin-pkg":"^0.18.1","eslint-plugin-import":"^2.29.1","@supabase/supabase-js":"^2.42.0","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.1.3","@typescript-eslint/parser":"^7.5.0","@typescript-eslint/eslint-plugin":"^7.5.0","prettier-plugin-organize-imports":"^3.2.4"},"peerDependencies":{"kysely":">= 0.24.0 < 1","supabase":">= 1.0.0 < 2","@supabase/supabase-js":">= 2.0.0 < 3"},"_npmOperationalInternal":{"tmp":"tmp/kysely-supabase_0.1.0_1712417652619_0.30388839913729204","host":"s3://npm-registry-packages"}},"0.2.0":{"name":"kysely-supabase","version":"0.2.0","keywords":["kysely","supabase","postgres","postgresql","typescript","types"],"author":{"name":"Igal Klebanov","email":"igalklebanov@gmail.com"},"license":"MIT","_id":"kysely-supabase@0.2.0","maintainers":[{"name":"igalklebanov","email":"igalklebanov@gmail.com"}],"homepage":"https://github.com/kysely-org/kysely-supabase","bugs":{"url":"https://github.com/kysely-org/kysely-supabase/issues"},"dist":{"shasum":"d3d3dfbc3c26d5be536acb1a7f2590092e46cb89","tarball":"https://registry.npmjs.org/kysely-supabase/-/kysely-supabase-0.2.0.tgz","fileCount":12,"integrity":"sha512-InDRSd2TD8ddCAcMzW2mIoIRqJgWy5qJe4Ydb37quKiijjERu5m1FhFitvfC8bVjEHd8S3xhl0y0DFPeIAwjTQ==","signatures":[{"sig":"MEQCIFaW+VuRRrPsIv9+tfHXmkEIjw487SgBYj7Em/uM6hYHAiBUh6a2vN5kXwlJUla263lFVAf7r476/xc2g/uolOLIIg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14107},"main":"./dist/cjs/index.js","_from":"file:kysely-supabase-0.2.0.tgz","types":"./dist/cjs/index.d.ts","module":"./dist/esm/index.js","exports":{".":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"scripts":{"fmt":"prettier --write .","lint":"eslint src --ext .ts","test":"pnpm build && pnpm test:typings","build":"tsup && node ./scripts/dist-fix.js","clean":"rm -rf dist","init:db":"supabase start && supabase db reset && supabase gen types typescript --local > schema.gen.ts","fmt:check":"prettier --check .","type-check":"tsc --noEmit","test:typings":"tsd tests/typings"},"_npmUser":{"name":"igalklebanov","email":"igalklebanov@gmail.com"},"_resolved":"/tmp/0096bbddeac2f6e8f41dff129229353a/kysely-supabase-0.2.0.tgz","_integrity":"sha512-InDRSd2TD8ddCAcMzW2mIoIRqJgWy5qJe4Ydb37quKiijjERu5m1FhFitvfC8bVjEHd8S3xhl0y0DFPeIAwjTQ==","repository":{"url":"git+https://github.com/kysely-org/kysely-supabase.git","type":"git"},"_npmVersion":"10.7.0","description":"Kysely type translators for Supabase","directories":{},"sideEffects":false,"_nodeVersion":"22.2.0","_hasShrinkwrap":false,"devDependencies":{"tsd":"^0.31.1","tsup":"^8.1.0","eslint":"^8.57.0","kysely":"^0.27.3","esbuild":"^0.23.0","prettier":"^3.3.2","supabase":"^1.178.2","type-fest":"^4.21.0","typescript":"^5.5.3","@types/chai":"^4.3.16","@types/node":"^20.14.9","@types/mocha":"^10.0.7","@tsconfig/node20":"^20.1.4","prettier-plugin-pkg":"^0.18.1","eslint-plugin-import":"^2.29.1","@supabase/supabase-js":"^2.44.2","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.1.3","@typescript-eslint/parser":"^7.15.0","@typescript-eslint/eslint-plugin":"^7.15.0","prettier-plugin-organize-imports":"^4.0.0"},"peerDependencies":{"kysely":">= 0.24.0 < 1","supabase":">= 1.0.0 < 2","@supabase/supabase-js":">= 2.0.0 < 3"},"_npmOperationalInternal":{"tmp":"tmp/kysely-supabase_0.2.0_1719962117491_0.2874020474008194","host":"s3://npm-registry-packages"}},"0.2.1":{"name":"kysely-supabase","version":"0.2.1","description":"Kysely type translators for Supabase","repository":{"type":"git","url":"git+https://github.com/kysely-org/kysely-supabase.git"},"homepage":"https://github.com/kysely-org/kysely-supabase","author":{"name":"Igal Klebanov","email":"igalklebanov@gmail.com","url":"https://github.com/igalklebanov"},"license":"MIT","main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"keywords":["kysely","supabase","postgres","postgresql","typescript","types"],"peerDependencies":{"kysely":">= 0.24.0 < 1","supabase":">= 1.0.0 < 3"},"devDependencies":{"@arethetypeswrong/cli":"^0.18.2","@biomejs/biome":"^2.2.0","@tsconfig/node24":"^24.0.1","@types/node":"^24.3.0","kysely":"^0.28.5","supabase":"^2.34.3","tsd":"^0.33.0","tsup":"^8.5.0","type-fest":"^4.41.0","typescript":"^5.9.2"},"sideEffects":false,"scripts":{"biome":"biome","build":"tsup","check:exports":"attw --pack .","check:types":"tsc --noEmit","init:db":"supabase start && supabase db reset && supabase gen types typescript --local > schema.gen.ts","lint":"biome check","test":"pnpm build && pnpm test:typings","test:typings":"tsd tests/typings"},"_id":"kysely-supabase@0.2.1","bugs":{"url":"https://github.com/kysely-org/kysely-supabase/issues"},"_integrity":"sha512-3oL6pLXACy4QfoidvwIBc+g+01fAx46sQGlIaEl4cScMskuIC/GbEDjzsSwPHzfw80XX0gYZ9eytXikfzV5oew==","_resolved":"/tmp/7851db7bc7b4fef49a04f904c1fefefe/kysely-supabase-0.2.1.tgz","_from":"file:kysely-supabase-0.2.1.tgz","_nodeVersion":"22.18.0","_npmVersion":"11.5.2","dist":{"integrity":"sha512-3oL6pLXACy4QfoidvwIBc+g+01fAx46sQGlIaEl4cScMskuIC/GbEDjzsSwPHzfw80XX0gYZ9eytXikfzV5oew==","shasum":"f420dfe9dca56308dc031f3f4e2c79dea6c80f98","tarball":"https://registry.npmjs.org/kysely-supabase/-/kysely-supabase-0.2.1.tgz","fileCount":7,"unpackedSize":11327,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/kysely-supabase@0.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDjQXuAzHJEfgFy8PIiVBWD+eHO60fF2Zo34pOcbstWSwIhAP2Nu2gyX1KKCkQocewHx+yHBsJOZuVH/w4iYaVbMWbE"}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:cef400a9-cc5b-4883-95a0-2af4f9ac1dbb"}},"directories":{},"maintainers":[{"name":"igalklebanov","email":"igalklebanov@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/kysely-supabase_0.2.1_1755733804209_0.7565553411131085"},"_hasShrinkwrap":false}},"time":{"created":"2024-04-06T15:34:12.618Z","modified":"2025-08-20T23:50:04.846Z","0.1.0":"2024-04-06T15:34:12.825Z","0.2.0":"2024-07-02T23:15:17.667Z","0.2.1":"2025-08-20T23:50:04.417Z"},"bugs":{"url":"https://github.com/kysely-org/kysely-supabase/issues"},"author":{"name":"Igal Klebanov","email":"igalklebanov@gmail.com","url":"https://github.com/igalklebanov"},"license":"MIT","homepage":"https://github.com/kysely-org/kysely-supabase","keywords":["kysely","supabase","postgres","postgresql","typescript","types"],"repository":{"type":"git","url":"git+https://github.com/kysely-org/kysely-supabase.git"},"description":"Kysely type translators for Supabase","maintainers":[{"name":"igalklebanov","email":"igalklebanov@gmail.com"}],"readme":"# kysely-supabase\n\nSupabase is a combination of open-source tools. They're building the features of Firebase using enterprise-grade, open-source products. If the tools and communities exist, with an MIT, Apache 2, or equivalent open license, they will use and support that tool. If the tool doesn't exist, they build and open-source it themselves. Supabase is not a 1-to-1 mapping of Firebase. Their aim is to give developers a Firebase-like developer experience using open-source tools.\n\nAs of Apr 6, 2024, `@supabase/supabase-js` (the client library) has 292,860 weekly downloads on npm, while `supabase` (the CLI) has 80,273 weekly downloads on npm. It is a popular all-in-one development platform for Node.js and TypeScript.\n\nTheir CLI supports TypeScript type generation from your Supabase-managed PostgreSQL database, and their client library provides a nice, albeit restrictive, auto-completion friendly, and type-safe developer experience. For anything beyond what the client library's API offers, you're left with writing raw SQL and using PostgreSQL drivers like `pg` or `postgres`, or some abstraction where you codegen or define schema/types again.\n\nKysely (pronounced “Key-Seh-Lee”) is a type-safe and autocompletion-friendly TypeScript SQL query builder. Inspired by Knex. Mainly developed for Node.js but also runs on Deno and in the browser.\n\n`kysely-supabase` is a toolkit (type translators for now) that allows using your existing Supabase setup with Kysely.\n\n## Installation\n\n```sh\nnpm i kysely @supabase/supabase-js\nnpm i -D kysely-supabase supabase\n```\n\nFor PostgreSQL:\n\n```sh\nnpm i pg\n```\n\nor\n\n```sh\nnpm i kysely-postgres-js postgres\n```\n\n## Usage\n\n### Types\n\nTranslate your Supabase-generated `Database` type to Kysely's `Database` interface via the `KyselifyDatabase` helper type.\n\n`src/types/database.ts`:\n\n```ts\nimport type {Database as SupabaseDatabase} from 'path/to/supabase/generated/types/file'\nimport type {KyselifyDatabase} from 'kysely-supabase'\n\nexport type Database = KyselifyDatabase<SupabaseDatabase>\n```\n\n### Kysely Instance\n\nCreate a Kysely instance. Pass to it your `Database` type.\n\n`src/kysely.ts`:\n\n```ts\nimport {Kysely, PostgresDialect} from 'kysely'\nimport {Pool} from 'pg'\nimport type {Database} from './types/database'\n\nexport const kysely = new Kysely<Database>({\n  dialect: new PostgresDialect({\n    pool: new Pool({\n      connectionString: process.env.DATABASE_URL,\n    }),\n  }),\n})\n```\n\nor when using `postgres` instead of `pg` as the underlying driver:\n\n```ts\nimport {Kysely} from 'kysely'\nimport {PostgresJSDialect} from 'kysely-postgres-js'\nimport postgres from 'postgres'\nimport type {Database} from './types/database'\n\nexport const kysely = new Kysely<Database>({\n  dialect: new PostgresJSDialect({\n    postgres: postgres(process.env.DATABASE_URL),\n  }),\n})\n```\n\n## Acknowledgements\n\n`KyselifyDatabase` helper type was inspired by [Gilbert](https://github.com/gilbert)'s [issue](https://github.com/kysely-org/kysely/issues/461).\n","readmeFilename":"README.md"}