Registry / devops / lovable-migrate

lovable-migrate

JSON →
library0.3.5jsnpmunverified

CLI migration engine for Lovable.dev projects — auto-detects stack (React, Vite, Supabase, Tailwind, shadcn/ui), generates Dockerfile (multi-stage), GitHub Actions CI/CD workflows (ci.yml + release.yml), and a comprehensive deploy plan including Supabase migrations and edge functions. v0.3.5, stable, requires Node >=20.0.0. Key differentiators: zero modification of original project, automatic Supabase detection (auth, storage, realtime, migrations, functions), wizard and demo modes. Ships TypeScript types.

npm install lovable-migrate
INSTALL
IMPORT
SIG · LOVABLE-MIGRATE
L
lovable-migrate
devopsjavascriptv0.3.5
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

lovable-migrate (CLI)
npx lovable-migrate deploy ./path
npm install -g lovable-migrate && lovable-migrate deploy ./path
Global install is unnecessary; npx is the recommended way to run the CLI. If installed locally, use `npx lovable-migrate` or `./node_modules/.bin/lovable-migrate`.
API (programmatic usage)
import { migrate } from 'lovable-migrate'
const migrate = require('lovable-migrate')
The package exports an ESM-only API since v0.3.0. Use named imports, not CommonJS require.
Types (TypeScript)
import type { AnalysisResult } from 'lovable-migrate'
import { AnalysisResult } from 'lovable-migrate'
Type-only imports should use `import type` to avoid runtime inclusion. Available since v0.2.5.

Runs the full migration pipeline: analysis, plan generation, Dockerfile, GitHub Actions, and deploy instructions.

npx lovable-migrate deploy ./my-project --output ./output
Debug
Known issues
breakingNode.js >=20 is required; versions below 20 are unsupported.
fix
Upgrade Node.js to v20 or later (e.g., via nvm: `nvm install 20`).
affects: >=0.0.0
deprecatedUsing `lovable-migrate` without a stack preset (e.g., --stack react) is deprecated; auto-detection is now the default and the --stack flag will be removed in v1.0.
fix
Remove the --stack flag; let the CLI auto-detect your stack.
affects: >=0.3.0
gotchaThe CLI modifies files inside `--output` directory; it never touches the original project, but if the output directory already contains files, they may be overwritten without warning.
fix
Always specify a fresh output directory, or ensure you have backed up any existing content.
affects: >=0.0.0
gotchaSupabase detection depends on environment variables (VITE_SUPABASE_URL, VITE_SUPABASE_ANON_KEY) and config files (supabase/config.toml). Missing env vars may cause incomplete output.
fix
Ensure your project includes a .env file with the required variables, or run `lovable-migrate ui` for interactive setup.
affects: >=0.0.0
gotchaThe generated GitHub Actions workflows use `npm` as package manager by default. Projects using yarn or pnpm may require manual adjustments.
fix
Edit the generated `ci.yml` and `release.yml` to replace `npm` with `yarn` or `pnpm` as needed.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'lovable-migrate'
Running the CLI without npx or local install, or using a global install that isn't on PATH.
fix
Use `npx lovable-migrate ...` instead of `lovable-migrate ...` without npx.
lovable-migrate: command not found
Trying to run the globally installed binary without npx, but global install is not recommended.
fix
Run `npx lovable-migrate ...` or install locally with `npm install --save-dev lovable-migrate` and use `./node_modules/.bin/lovable-migrate`.
TypeError: migrate is not a function
Using default import instead of named import when using programmatic API.
fix
Use `import { migrate } from 'lovable-migrate'` instead of `import lovableMigrate from 'lovable-migrate'`.
Error: EISDIR: illegal operation on a directory, read
Passing a path to a non-existent or empty directory, or trying to read a directory as a file.
fix
Ensure the input project path exists and is a valid Lovable.dev project directory.
Upgrade
Version history
0.3.5latest on npm
Audit
Dependencies
noderequiredRuntime requirement: Node >=20.0.0
Agent activity
4 hits · last 30 days
node
4
Resources
lovable-migrate — npm install lovable-migrate · libregistry