DEV Community

Cover image for Migration and Modernisation with Kiro CLI

Migration and Modernisation with Kiro CLI

Background

Once upon a time, there was a developer who needed to keep updating the dependencies of each tool/product/software. There is a dependabot which still helpful for updating minor versions. However, it will need a manual update/migration whenever a major version comes. Migrating to a major version is frustrating for me if I need to update it in bulk. Updating only one app is pretty fine, but how about multiple apps? I believe we will stop doing it.

AI Era

The AI (Artificial Intelligence) era has come. Much automation can be achieved by AI. I have a good belief that I can migrate much more easily whenever I use AI. Not like the old age, which needs many manual changes, especially the breaking changes!

Migration as Vibes

I'm starting the migration as vibes. So, I only put a simple prompt to know how the AI will work. In this case, I tested Kiro CLI as an example.

I have many legacy codes which still being used with Vue CLI. Vue CLI is in Maintenance Mode, so many tools are deprecated and cannot adapt to the newer version of Typescript, Node, etc. It was frustrating while trying to migrate it to Vite. Many dependencies need to be changed.

Surprisingly, I am amazed by the result of the simple prompt. It was a success to migrate a bunch of my repos, and at least it produced a basic migration.

Example simple prompt:

Migrate to Vite from Vue CLI.

Well, that simple prompt is not recommended. :)

Lesson Learned

I learned how to create a good prompt. I tried a basic/simple prompt in multiple repositories. The result? I need to change some code manually multiple times. I'm using a library that will raise an error by Vite, I "can" suppress the error as a warning, but I forgot to apply it in multiple projects. So I need to apply it multiple times. I should add more specific extra instructions for migration so I don't need to update it manually frequently.

The list of repo

Migrating to Vite

Related to Upgrading version

Future

In the future, I will try to automate this and use a correct prompt. So, it should be automated; I only need to review and approve. :) Let's see.

Thank you for reading. I hope you get an insight.

Thanks GIF

Top comments (0)