A lightweight migration CLI library for Kysely, a TypeScript SQL query builder. Version 0.4.2 provides a `run()` function to build custom migration scripts with CLI commands (up, down, latest, create). Unlike full-fledged tools, it is a library that helps you create your own migration runner. Active development, supports ESM and CJS, integrates with Kysely's Migrator and FileMigrationProvider. Experimental no-script mode for Postgres with dotenv.
npm install kysely-migration-cliNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Basic migration script setup: connect to Postgres, configure Kysely, and run CLI commands.
Always pass the migration folder path explicitly.
Use `import.meta.url` to build the path in ESM environments.
Stick to the script-based approach for non-Postgres databases.
Check the latest documentation for template support.
Run `npm install kysely-migration-cli` and ensure the import statement matches the package name.
Use `import { run } from 'kysely-migration-cli'` (ESM only).Verify the folder exists and contains migration files. Use `path.join(__dirname, 'migrations')` for CJS or `new URL('./migrations', import.meta.url).pathname` for ESM.