{"id":21344507,"url":"https://github.com/s00d/vue3-migrate","last_synced_at":"2025-06-17T02:39:06.203Z","repository":{"id":187431618,"uuid":"676939276","full_name":"s00d/vue3-migrate","owner":"s00d","description":null,"archived":false,"fork":false,"pushed_at":"2023-08-11T13:40:47.000Z","size":113,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-26T20:15:45.526Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/s00d.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-08-10T11:09:07.000Z","updated_at":"2023-09-05T09:50:05.000Z","dependencies_parsed_at":"2023-08-10T11:54:02.143Z","dependency_job_id":null,"html_url":"https://github.com/s00d/vue3-migrate","commit_stats":null,"previous_names":["s00d/vue3-migrate"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/s00d/vue3-migrate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s00d%2Fvue3-migrate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s00d%2Fvue3-migrate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s00d%2Fvue3-migrate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s00d%2Fvue3-migrate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/s00d","download_url":"https://codeload.github.com/s00d/vue3-migrate/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s00d%2Fvue3-migrate/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260279049,"owners_count":22985393,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-22T01:19:30.616Z","updated_at":"2025-06-17T02:39:06.156Z","avatar_url":"https://github.com/s00d.png","language":"TypeScript","funding_links":["https://www.paypal.me/s00d"],"categories":[],"sub_categories":[],"readme":"[![npm version](https://badge.fury.io/js/vue3-migrate.svg)](https://badge.fury.io/js/vue3-migrate)\n[![npm downloads](https://img.shields.io/npm/dw/vue3-migrate)](https://badge.fury.io/js/vue3-migrate)\n[![NPM license](https://img.shields.io/npm/l/vue3-migrate)](https://github.com/s00d/vue3-migrate/blob/master/LICENSE)\n[![donate](https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif)](https://www.paypal.me/s00d)\n[![GitHub Repo stars](https://img.shields.io/github/stars/s00d/vue3-migrate?style=social)](https://github.com/s00d/vue3-migrate)\n\n# Vue.js Code Migration Tool\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/s00d/vue3-migrate/blob/main/Screenshot.png?raw=true\" alt=\"logo\"\u003e\n\u003c/p\u003e\n\nThis is a command-line tool that utilizes ChatGPT to automatically refactor Vue.js code from version 2 to version 3. It helps developers migrate their code by transforming it to use Typescript with the Composition API.\n\n## Usage\n\n### Installation\n\n```bash\nnpm install -g vue3-migrate\n```\n\n### Refactor a Single Vue File\n\nTo refactor a single Vue file, use the `convert` command:\n\n```shell\n$ vue3-migrate convert \u003cfilename\u003e [options]\n```\n\nReplace `\u003cfilename\u003e` with the path to the Vue file you want to refactor.\n\n#### Options\n\n- `-t, --token \u003ctoken\u003e`: Specify the GPT token (required)\n- `-m, --model \u003cmodel\u003e`: Specify the GPT model to use (default: gpt-3.5-turbo-16k, optional)\n- `-p, --prompt \u003cprompt\u003e`: Specify the path to the prompt file (optional)\n- `-mt, --max_tokens \u003cmax_tokens\u003e`: The GPT max tokens (default: 4096, optional).\n- `-r, --replace`: replace exist refactor files.\n\nsee help: `vue3-migrate convert -h`\n\n### Refactor All Vue Files in a Directory\n\nTo refactor all Vue files in a directory, use the `directory` command:\n\n```shell\n$ vue3-migrate directory \u003cdirectory\u003e [options]\n```\n\nReplace `\u003cdirectory\u003e` with the path to the directory containing the Vue files you want to refactor.\n\n#### Options\n\n- `-t, --token \u003ctoken\u003e`: Specify the GPT token (required)\n- `-m, --model \u003cmodel\u003e`: Specify the GPT model to use (default: gpt-3.5-turbo-16k, optional)\n- `-p, --prompt \u003cprompt\u003e`: Specify the path to the prompt file (optional)\n- `-t, --timeout \u003ctimeout\u003e`: The `timeout` option allows you to specify the timeout duration in milliseconds between each refactoring request when using the `directory` command. It determines the waiting time before sending the next request to the OpenAI API (default: 20 seconds, optional).\n- `-mt, --max_tokens \u003cmax_tokens\u003e`: The GPT max tokens (default: 4096, optional).\n- `-r, --replace`: replace exist refactor files.\n\nsee help: `vue3-migrate convert -h`\n\n## Examples\n\nRefactor a single Vue file:\n\n```shell\n$ vue3-migrate convert /path/MyView.vue --token=sk-...\n```\n\nRefactor all Vue files in a directory:\n\n```shell\n$ vue3-migrate directory /path/src/components --token=sk-...\n```\n\n## Configuration\n\nBefore running the tool, make sure to set up the following:\n\n1. Obtain a GPT token from OpenAI. You can sign up for an API key at https://openai.com/.\n2. Create a prompt text file (md for example, default: prompt.md) that contains the instructions for the refactoring process. This file should specify the rules and guidelines for the refactoring.\n\n## Notes\n\n- The tool uses the OpenAI GPT API for code refactoring. Make sure you have a valid API key and appropriate permissions.\n- It's recommended to review the refactored code manually to ensure correctness and make any necessary adjustments.\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs00d%2Fvue3-migrate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fs00d%2Fvue3-migrate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs00d%2Fvue3-migrate/lists"}