DEV Community

Cover image for gemini-cli: My Local Hero for packer and systemd
Marcin Niemira
Marcin Niemira

Posted on

gemini-cli: My Local Hero for packer and systemd

The Local Hero: Automating the Boring Parts of AI Infrastructure

Lately, I’ve been working on an AI agent for a small translation company called insighter. At its core, it’s an agent equipped with some specialized tools and a rather extensive prompt.

Because the project requires stateful resources, I decided to accept "statefulness" as a lesser evil for this specific use case and deployed it to a Google Cloud Platform (GCP) VM. The setup itself is straightforward: Packer for the machine image and a standard deployment pipeline. Nothing too wild.

However, the part that truly impressed me was how easily I was able to do things right. The architecture has several moving parts: the mcp-toolbox, a Chroma vector database, a few other MCP servers, and my own supporting microservice*s* running on localhost. Naturally, these all need to start up in a specific order to function correctly.

I know how to write proper systemd services. I know how to pass environment variables and define startup dependencies. But the "mental tax" of recalling the exact syntax, crafting the manifests, and testing the logic usually takes more time than the quality of such a small solution seems to justify.

This is where gemini-cli became my local hero.

With just a few prompts, it analyzed the local environment, identified the necessary dependencies, and generated clean, production-ready systemd services in minutes. The real win here wasn't just the code generation. It was the ability to delegate the "boring" infrastructure tasks, ensuring the job was done correctly with minimal manual effort.


Key Takeaway

When doing things right is this cheap, taking shortcuts is no longer justifiable.

Top comments (0)