DEV Community

Cover image for With Gemini CLI, I'm able to keep my pet projects alive and kicking
Paulo Henrique
Paulo Henrique

Posted on

With Gemini CLI, I'm able to keep my pet projects alive and kicking

This is a submission for the Built with Google Gemini: Writing Challenge

What I Built with Google Gemini

It's 2023, and I'm trying to figure out how LLM APIs actually work. I don't like the idea of creating a "ChatGPT clone" that just talks to the OpenAI API. There are thousands out there. So I built a rough Next.js site to merge AI and SEO in a simple way. Out with the long prompts; the site would just do the work for you with minimal inputs.

It's 2024, and I'm loving being part of the DEV.to community, writing for fun, coding for fun. During a Hackathon, I decided to build a text-based RPG for a DEV.to challenge using AI, so every adventure and interaction would be different. I had a dream of using AI to create infinite ideas like the old "Choose Your Own Adventure" books and games from the 80s and 90s. I love a good pun, so "Choose Your Own AIdventure" was born. Unfortunately, given some time constraints, the site was rough, and I didn't win the challenge.

Both projects worked as MVPs. Both won their respective little battles. And, like most pet projects, they sat on a server and aged.

Code gets outdated. APIs change. You receive some alerts from GitHub or Vercel about outdated libraries or build variables. But you still need to work, or deal with adult things. And your cool idea just sits there, unchanged, cursed to never be what you know it could be.

Enter the Gemini CLI. I was already using it professionally, but one day I just thought: "What if I asked Gemini to evaluate my code and minimally update it to 2026 standards?"

Done.

Simple as that. I just had to approve some commands, and minutes later Choose your Own AIdventure was alive and kicking again.

This is where I decided to take those two legacy projects and use the Gemini CLI to not only do a minor update, but to refactor them exactly as I envisioned them the first time. Here is exactly how that went.

The old and the new

What I Built

I'm by nature a terminal person. This is where I spend most of my day. I access remote servers, I build automations, I execute shell scripts, and I test things locally before they ever see a browser. So, using the Gemini CLI to execute code was natural for me. I keep it running on the second monitor and provide inputs when needed. On my main monitor, I focus on other things.

The first project I refactored was Choose Your Own AIdventure. As I mentioned, originally it was supposed to be like the old solo RPG books, where you read part of a text and choose what to do based on limited options. Good choices led you to victory. Bad choices led to a bad ending.

The biggest upgrade here was fixing the layout. I still wanted it to look like an old videogame, so I asked Gemini to analyze the codebase and create a mockup of a new front-end. After a few rounds of manual changes and conversations with the tool, I asked the CLI to apply the final version. Then, I started a brainstorming session with Gemini to discuss ideas and how to implement them by priority and complexity.

After that, I asked it to create a markdown file with all the ideas and an execution plan. In my spare time, I could just boot the CLI and ask it to execute the plan from item X to item Y. Gemini was able to understand everything, ask questions, and even test the build to ensure that everything was in place.

For the SEO Toolbox, the Gemini CLI basically refactored the whole codebase, making it smaller, faster, and packed with new features. Originally, I only had two features: create some blog post ideas, and write a text about X. Now, it feels like a true toolbox, with half a dozen options, like Competitor Analysis, Meta Tag Generation, and more.

What I Learned

Years ago, I studied to be a teacher. Going through the Brazilian Magistério program and studying Paulo Freire, you learn very quickly that you don't teach by just handing over the final answer or by assuming that everyone is on the same page as you. You need to know how to let the student learn on their own terms, and guide the interaction with the subject.

Prompting an AI that has almost infinite access to your files feels exactly like that.

I had to unlearn the way I prompted before. This meant giving clear instructions on when to act and when to just review everything, and also reviewing Gemini's decisions before approval. Giving a bad prompt meant that Gemini would overthink the solution or act on its own, modifying things I didn't ask for. Because I had limited time for these personal projects, I had to create almost perfect prompts and ensure my GEMINI.md rules were on point.

My skills evolved, too, as I learned that talking to the web version of a model is entirely different from talking to the agentic version.

Also, I usually have thousands of ideas in my head, so even minor things can get lost if I'm not paying attention. One night, after forgetting to ask Gemini to save the changes we had made in the Changelog.txt and update the PLAN.md file, I started a new session to ask if I could create a "macro" where just one phrase would make it execute a series of steps. It automatically added the "That's all, folks!" command to the GEMINI.md file.

Now, I just need to type that, and it does everything for me.

Google Gemini Feedback

Building on top of a language model requires trial and error. And sometimes an error can be fatal.

The Gemini CLI is fast. Testing prompts and streaming responses without a frontend is a massive productivity boost. You can type your prompt and let the AI take care of it while you work on other things, or try to give some attention to your cats.

But Gemini has a distinct reasoning style. It tends to be overly helpful and act without authorization if it feels like it. So, you need to set strict boundaries.

Also, as the session gets longer and the codebase grows, Gemini can hallucinate. Nothing critical, but it might add code that isn't needed or enter a loop if for some reason the build won't finish.

I like to think of the Gemini CLI as a Junior Dev. He can make your life a lot easier. But he can also make your life a nightmare. That depends entirely on how you manage him.

Looking Forward

Having pet projects can be a problem when you still need to work, deal with adult life, and feed two cats. This can be even more problematic for neurodivergent brains like mine, where that cool idea never leaves your mind.

Revisiting these projects in the terminal proved to me that legacy code can be salvaged if you have the right tools to pry it open. Ideas can leave your mind and turn into real applications, even when you don't have enough time or energy.

Right now, I am designing even more features for those two projects, and also using the CLI to work on my new portfolio page. I can think high-level while the CLI does the heavy lifting.

Which means that, someday, my pet projects can actually be turned into real products.

What about yours?

Top comments (0)