A terminal AI assistant powered by Google Gemini. Helps with text refinement, command suggestions, Git commit messages, and ad-hoc questions about whatever's on your screen.
Not affiliated with Google's
gemini-cli. This is a separate project that predates Google's tool of the same name.
WebCmd represents the web command which starts a web server for AI interactions. It provides both a web UI and a REST API endpoint for asking questions to the AI.
The server automatically attempts to open the web interface in the default browser.
gemini-cli web
GENAI_PORT - Custom port to run the server on (defaults to 8080)
POST http://localhost:8080/answer Request Body: {"message": "your question", "history": {"previous question": "previous answer", ...}} Response: {"message": "AI response"}
The web interface provides a user-friendly chat experience, while the API allows for programmatic interaction with the AI assistant.
git clone https://github.com/4nkitd/gemini-cli.git
cd gemini-cli
go build -o gemini-cli .For easier access, move the binary to your PATH:
mv gemini-cli /usr/local/bin/Before using gemini-cli, set your Gemini API key and default model as environment variables:
export GENAI_API_KEY=your_api_key
export GENAI_DEFAULT_MODEL="gemini-2.0-flash-exp"You can obtain your API key from Google AI Studio.
Add these to your .bashrc, .zshrc, or equivalent for persistence.
Revise text to make it more professional:
gemini-cli writer "Hey, can we meet to discuss the project?"
gemini-cli revise "Hey, can we meet to discuss the project?" # aliasSpecial formatting options:
- Use
[length=X]to specify approximate word count - Use
[type=email]to format as a professional email
Example:
gemini-cli writer "Need to reschedule our meeting tomorrow. Sorry for late notice." [type=email]Ask questions and get command suggestions:
gemini-cli cli "how do I find large files in this directory?"
gemini-cli ask "how do I find large files in this directory?" # aliasThe command will:
- Process your query
- Show a response
- Suggest a terminal command
- Ask if you want to run the command
Generate AI-powered commit messages:
gemini-cli commit
gemini-cli c # aliasYou can also specify a repository path:
gemini-cli commit /path/to/repoOr customize the prompt:
gemini-cli commit --prompt "Write a detailed commit message explaining the following changes:"Get assistance with anything on your screen:
gemini-cli assist "explain this error message"
gemini-cli a "explain this error message" # alias
gemini-cli copilot "suggest improvements for this code" # alias
gemini-cli assistant "what does this output mean?" # aliasThe Co Pilot feature analyzes text from your terminal and provides helpful explanations, suggestions, or guidance based on the content.
Example:
gemini-cli assist "What's wrong with this command: grep -l 'function' | xargs sed 's/old/new/g'"Contributions are welcome! Please feel free to submit a Pull Request.

