❯ Guillaume Laforge

Gemini-Cli

A Simple Coding Agent in a Loop with LangChain4j, Jbang, and Gemini

A few days ago, Max Rydahl Andersen published a fascinating article about nanocode: a minimalist Claude Code alternative implemented in just 260 lines of Java (inspired from a 250-line Python equivalent). It was a masterclass in “leanness,” using raw HTTP calls and Jackson JSON parsing, an OpenRouter or Anthropic LLM endpoint, to create an autonomous coding loop.

I loved the concept, but I had a very practical motivation to take it in a different direction: I don’t have a Claude subscription. 😃

Read more...

Creating a Wikipedia MCP Server in Java in a Few Prompts with Skills

Since I started using Model Context Protocol (MCP) to equip my AI agents with useful tools, I’ve been looking for ways to quickly build and iterate on local servers. A few weeks ago, I shared how to easily build a local MCP server in Java with a custom skill in Gemini CLI. Today, I wanted to put that skill to the test by creating a Wikipedia MCP server.

What’s impressive is that I didn’t even have to leave my terminal or read documentation. The entire process was a conversation with Gemini CLI, leveraging its ability to search the web, find libraries, and even check migration guides!

Read more...

Fixing AI Slop with a Skill in Gemini CLI

We all recognize AI writing when we see it. As language models get used for everything, their specific tics are everywhere. People call this “AI slop”. The grammar is fine, but the text is boring, repetitive, and lacks any real voice.

A site called tropes.fyi tracks these patterns. It lists the exact words and structures that give AI away. You’ll see callouts for overused adverbs like “deeply” and “arguably,” the dreaded “delve” family, and structural crutches like “It’s not X, it’s Y.”

Read more...

Easily Build a Local MCP Server in Java with a Skill inside Gemini CLI

Recently, I’ve been exploring the Model Context Protocol (MCP) and how to easily create custom servers to extend the capabilities of AI assistants like Gemini CLI which I use daily.

I wanted a way to build these servers in Java without the heavy boilerplate of a traditional Maven or Gradle project, or with a complex framework. The solution? Combining JBang, LangChain4j, and… 🥁… a custom Gemini CLI skill!

In this post, I’ll walk you through how I streamlined the creation of MCP STDIO servers, by creating an agent SKILL.md to replicate what I had learned in my previous article.

Read more...

How to Integrate Gemini CLI with Intellij Idea Using ACP

The Agent Client Protocol (ACP) allows you to connect external AI agents directly into IDEs and text editors that support that protocol (like JetBrains’ IntelliJ IDEA, PyCharm, or WebStorm, as well as Zed). This means you can bring the power of the Gemini CLI directly into your editor, allowing it to interact with your code, run terminal commands, and use Model Context Protocol (MCP) servers right from the AI Assistant chat window.

Read more...

Executable Markdown Files with gcli-mdrun & Gemini CLI

Have you ever wanted to turn your cool LLM prompts & tools, research notes, automation ideas, or even a simple “todo” list into an executable script? Inspired by a HackerNews post about executable Markdown, I’m happy to share gcli-mdrun, a smart little script that allows you to transform standard Markdown files into executable scripts powered by Gemini CLI.

This project allows you to create AI-driven automation, pipelines, and autonomous bots using mere Markdown text files. You can find the project on GitHub at https://github.com/glaforge/gcli-mdrun.

Read more...

The Sci-Fi naming problem: Are LLMs less creative than we think?

Like many developers, I’ve been exploring the creative potential of Large Language Models (LLMs). At the beginning of the year, I crafted a project to build an AI agent that could generate short science-fiction stories. I used LangChain4j to create a deterministic workflow to drive Gemini for the story generation, and Imagen for the illustrations. The initial results were fascinating. The model could weave narratives, describe futuristic worlds, and create characters with seemingly little effort. But as I generated more stories, a strange and familiar pattern began to emerge…

Read more...