A demonstration of building a CLI Coding Agent in Kotlin using the official Google Gemini Java SDK.
This project showcases how to build an intelligent CLI agent that leverages Google's Gemini API to understand and execute coding tasks. It demonstrates the integration of Kotlin with the Gemini Java SDK, including:
- Direct integration with Gemini 2.5 Flash model
- Custom tool registration using Java reflection
- Function calling capabilities for tool invocation
- CLI interface for interaction
- Java 21 or later
- Gradle (included via Gradle wrapper)
- Google Gemini API key
./gradlew buildThis creates a fat JAR with the ShadowJar plugin:
./gradlew shadowJarSet your Gemini API key:
export GOOGLE_API_KEY=your-api-key-hereRun the application:
java -jar build/libs/rabbit-coding-agent-0.0.1-SNAPSHOT.jarThis project is licensed under the MIT License - see the LICENSE.md file for details.