Registry / devops / vue3-migration-tool

vue3-migration-tool

JSON →
library1.1.5jsnpmunverified

AI-powered CLI tool for migrating Vue 2 projects to Vue 3, including Vue Router, Vuex, and Vuetify 3 support (v1.1.5). Uses OpenAI API for intelligent component transformations and codemods. Active development with frequent releases. Key differentiators: built-in support for 30+ package updates, modular migration steps with skip/only flags, custom migration rules overlay, and dry-run mode. Requires Node.js 16+, a Git repository, and an optional OpenAI API key for AI features.

npm install vue3-migration-tool
INSTALL
IMPORT
SIG · VUE3-MIGRATION-TOO
V
vue3-migration-tool
devopsjavascriptv1.1.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.

vue3-migrate
npx vue3-migration-tool
vue3-migration-tool
The CLI is invoked via npx or global install; not imported as a library.
vue3-migrate ai
vue3-migrate ai src/
vue3-migrate ai src --mode auto
The AI subcommand requires a target path and optional --mode; avoid using --mode without necessary arguments.
vue3-migrate --skip
vue3-migrate --skip update-dependencies
vue3-migrate -s update-dependencies
Use --skip or --only with step names; short flag -s is not supported.

Runs the migration tool in dry-run mode with non-interactive flags to preview changes without modifying files.

export OPENAI_API_KEY=sk-your-key-here npx vue3-migration-tool --dry-run --yes
Debug
Known issues
breakingNode.js 16+ required. Older versions will fail silently or throw obscure errors.
fix
Upgrade Node.js to version 16 or higher.
affects: <1.0
gotchaAI codemods require an OpenAI API key. If missing, AI steps are skipped with only a warning; users may expect migration without AI to still work without key.
fix
Set OPENAI_API_KEY environment variable or skip AI steps with --skip ai-codemods.
affects: >=1.0
deprecatedThe MIGRATION_RULES_PATH env var is replaced by --rules CLI flag as of v1.1.0.
fix
Use --rules flag instead of MIGRATION_RULES_PATH environment variable.
affects: >=1.1.0
gotchaThe tool assumes the project is a Git repository. If not, preflight step fails.
fix
Initialize a Git repository with `git init` before running the tool.
affects: >=1.0
breakingVuetify 2 to 3 migration is only partial; some components may not be automatically converted and require manual adjustment.
fix
Review all Vuetify components after migration; refer to official Vuetify 3 migration guide.
affects: >=1.0
gotchaThe OpenAI API may incur costs; there is no throttling or cost estimation built in.
fix
Monitor API usage and set budget alerts in your OpenAI account.
affects: >=1.0
gotchaCustom migration rules must be in Markdown format; invalid syntax may cause the tool to crash.
fix
Validate your .md file structure against the built-in MIGRATION_RULES.md in the package repository.
affects: >=1.1.0
Errors
Common errors & fixes
Error: Failed to detect package manager. Ensure you're in a project root with a lockfile.
The tool cannot find package-lock.json, yarn.lock, or pnpm-lock.yaml in the current directory.
fix
Run the tool from the root of your Vue 2 project where the lockfile exists.
OPENAI_API_KEY is not set. AI codemods will be skipped.
The required environment variable for OpenAI authentication is missing.
fix
Set OPENAI_API_KEY in your environment or .env file before running AI commands.
fatal: Not a git repository (or any of the parent directories): .git
The tool requires a Git repository for safety checks but none is found.
fix
Initialize a Git repository: git init
Error: The --only flag must be used with valid step names. Available: preflight, scan, update-dependencies, ai-codemods.
Specified step name does not exist or is misspelled.
fix
Use one of the valid step names: preflight, scan, update-dependencies, ai-codemods.
Error: Custom rules file not found: ./my-rules.md
The path provided to --rules does not point to an existing file.
fix
Check the path and ensure the file exists; use an absolute path if relative path fails.
Upgrade
Version history
1.1.5latest on npm
Audit
Dependencies
openaioptionalRequired for AI-powered codemods and transformations
Agent activity
11 hits · last 30 days
node
10
Amazon
1
Resources
vue3-migration-tool — npm install vue3-migration-tool · libregistry