The Gemini CLI for Developers
This repository contains the Geminid, a public fork of the official Gemini CLI. Our goal is to extend and customize the tool for specific development workflows, while maintaining compatibility for future updates from the original project.
Perfect for: Developers, researchers, content creators, and anyone who wants a well-configured Gemini CLI setup with powerful automation capabilities.
GEMINI.md files or make a simple request to permanently save instructions in Gemini’s context file.The Gemini CLI allows you to provide the AI with specific instructions and context through GEMINI.md files. These files act as a hierarchical knowledge base for the AI, influencing its responses and behavior. You can manage this instructional context using the /instruction command:
/instruction show: Displays the combined content of all GEMINI.md files currently loaded as instructional context. This is useful for verifying what information the AI is currently using.
/instruction show
/instruction add <text>: Adds a new instruction to your personal GEMINI.md context file. This is useful for providing the AI with persistent, user-specific guidelines or facts.
/instruction add "Always use TypeScript for new code."
/instruction refresh: Forces the CLI to re-scan and reload all GEMINI.md files from configured locations. Use this after you’ve made manual changes to your GEMINI.md files to ensure the AI has the latest instructions.
bash
/instruction refresh
For more detailed information on how context files work and their hierarchical loading, refer to the CLI Configuration documentation.✨ Geminid includes the following custom features:
✨ What I’m working on:
🎙️ Voice activated - Just say “hey gemini” to talk or send your request 📅 Natural Language Scheduling - Say “daily at 9am” to schedule recurring tasks 🏃 Background processing - Run long tasks in AFk mode while you do other work
Prerequisites Ensure you have Node.js version 20 or higher installed.
Run the CLI Execute the following command in your terminal to install and use the Geminid:
> npm install -g @hahnd/geminid
Then, run the CLI from anywhere:
> geminid
Or just prompt for a request:
> geminid "What's the weather like in London?"
🔑 Authenticate When prompted, sign in with your personal Google account. This will grant you up to 60 model requests per minute and 1,000 model requests per day using Gemini.
You’re ready to use the Geminid!
GEMINI_API_KEY="YOUR_API_KEY": Your Gemini API key. (optional)MICROSOFT_TTS_KEY: Your Microsoft Text-to-Speech API key. (optional)MICROSOFT_TTS_REGION: The Azure region for your TTS service (e.g., eastus). (optional)MICROSOFT_TTS_VOICE: The specific voice to use for responses (e.g., en-US-JennyNeural). (optional)MICROSOFT_TTS_THINKING: The specific voice to use for AI thinking narration (e.g., en-US-JennyNeural). (optional)The Narrator feature provides audio feedback for the Gemini CLI. You can configure its behavior using environment variables and control it with CLI commands or flags.
Set it as an environment variable in your terminal. Replace YOUR_API_KEY and MICROSOFT_TTS_REGION with your generated key and API region.
export MICROSOFT_TTS_KEY=”YOUR_API_KEY” export MICROSOFT_TTS_REGION=”eastus” export MICROSOFT_TTS_VOICE=”en-US-JennyNeural” export MICROSOFT_TTS_THINKING=”en-US-JennyNeural”
(Optional) Add to your .bashrc or .zshrc for persistence:
echo ‘export MICROSOFT_TTS_KEY=”YOUR_API_KEY”’ » ~/.bashrc echo ‘export MICROSOFT_TTS_REGION=”eastus”’ » ~/.bashrc echo ‘export MICROSOFT_TTS_VOICE=”en-US-JennyNeural”’ » ~/.bashrc echo ‘export MICROSOFT_TTS_THINKING=”en-US-JennyNeural”’ » ~/.bashrc source ~/.bashrc
You can switch between Narrator modes using the /narrator command:
/narrator off: Disables audio narration./narrator thinking: Narrates AI model actions (tool calls, thoughts) as they occur./narrator response: Narrates a summary, observation, or important warning about the AI model’s response.You can set the initial Narrator mode when starting the CLI using the --narrator flag:
Sets the initial narrator mode:
geminid –narrator [off thinking response]
For example, to start the CLI with AI thoughts narrated:
geminid –narrator thinking
The Gemini API offers a free tier with 100 requests per day using Gemini 2.5 Pro, control over which model you use, and access to higher rate limits (with a paid plan):
Set it as an environment variable in your terminal. Replace YOUR_API_KEY with your generated key.
export GEMINI_API_KEY=”YOUR_API_KEY”
(Optional) Add to your .bashrc or .zshrc for persistence:
echo ‘export GEMINI_API_KEY=”YOUR_API_KEY”’ » ~/.bashrc source ~/.bashrc
The Vertex AI API offers a free tier using express mode for Gemini 2.5 Pro, control over which model you use, and access to higher rate limits with a billing account:
Set it as an environment variable in your terminal. Replace YOUR_API_KEY with your generated key and set GOOGLE_GENAI_USE_VERTEXAI to true
export GOOGLE_API_KEY=”YOUR_API_KEY” export GOOGLE_GENAI_USE_VERTEXAI=true
For other authentication methods, including Google Workspace accounts, refer to the authentication guide.
Once the CLI is running, you can start interacting with Gemini from your shell.
You can start a project from a new directory:
> cd new-project/
> geminid
Write me a Gemini Discord bot that answers questions using a FAQ.md file I will provide
Or work with an existing project:
> git clone https://github.com/hermannhahn/gemini-cli
> cd gemini-cli
> geminid
Give me a summary of all of the changes that went in yesterday
Start by entering an existing or newly cloned repository and running geminid.
Describe the main parts of this system’s architecture. What security mechanisms are in place? Provide a step-by-step dev onboarding doc for developers new to the codebase. Summarize this codebase and highlight the most interesting patterns or techniques I could learn from. Identify potential areas for improvement or refactoring in this codebase, highlighting parts that appear fragile, complex, or hard to maintain. Which parts of this codebase might be challenging to scale or debug? Generate a README section for the [module name] module explaining what it does and how to use it. What kind of error handling and logging strategies does the project use? Which tools, libraries, and dependencies are used in this project?
Implement a first draft for GitHub issue #123. Help me migrate this codebase to the latest Java version. Start with a plan.
Use MCP servers to integrate your local system tools with your enterprise collaboration suite.
Create a slide deck showing the git history for the last 7 days, grouped by feature and team member. Create a full-screen web app for a wall display to show our most interacted GitHub issues.
Convert all images in this directory to png and rename them to use exif data dates. Organize my PDF invoices by expense month.
To uninstall the Geminid CLI:
> npm uninstall -g @hahnd/geminid
For details on the terms of service and privacy notice applicable to your use of the Gemini CLI, refer to the Terms of Service and Privacy Notice.