gemini-cli
Command-Line AI Assistant powered by Google Gemini.
Links
README
From the repo.
Gemini Command-Line 🤖
gem-cli is a command-line AI assistant powered by Google Gemini.
Demo

🚀 Installation
Follow these steps to install gem-cli on your system.
- Download the script:
curl -LO https://raw.githubusercontent.com/jorexdeveloper/gemini-cli/main/gem-cli - Make it executable:
chmod +x gem-cli - Move it into your
PATH:sudo mv gem-cli /usr/local/bin/
📋 Requirements
- Bash 4+
- curl
- jq
- fmt
- bat (for pretty output)
- xclip or xsel (for clipboard support)
🔧 Configuration
Configure gem-cli to work with your Google Gemini API key and preferences.
🔑 API Key
Set your Gemini API key via environment variable or file.
-
Get free API key here
-
Environment Variable:
export GEMINI_API_KEY="your_api_key_here" -
Key File (
~/.gemini.key):echo "your_api_key_here" > ~/.gemini.key
⚙️ Preferences
- Chat History
Stored at
~/.local/share/gem-cli/history/chat.jsonby default. - Response Saving
Saved at
~/.local/share/gem-cli/responses/when enabled. - Log Level
Adjust verbosity with
-L(0–5).
💡 Usage
Invoke gem-cli with options and an optional prompt.
gem-cli [OPTIONS] [PROMPT]
🌐 Global Options
| Flag | Description |
|---|---|
-m NAME | Set the API model (e.g., gemini-2.5-flash). |
-i | Force interactive mode. |
-c | Print current chat history. |
-n | Backup and start a new chat. |
-N | Start new chat without backup. |
-p | Private chat (disable history & response saving). |
-d | Disable chat history. |
-s | Show separator between messages. |
-r | Prefer raw output (no pretty printing). |
-R | Prefer raw input (disable slash commands). |
-j | JSON output (implies raw output). |
-q | Quiet mode (suppress startup messages). |
-Q | Quiet + raw output. |
-l | List supported API models. |
-L INT | Set log level (0=NONE to 5=DEBUG). |
-v | Print version and exit. |
-h | Print help and exit. |
🖥️ Interactive Mode
Launch a REPL chat session. Omit a prompt or use -i to force interactive mode.
gem-cli
Key commands in session:
/help– Show available commands./model NAME– Switch API model./raw– Toggle raw output mode./clear– Clear current chat./list– List supported models./exit– End the session.
📨 Non-Interactive Mode
Send a single prompt and exit.
gem-cli "Explain quantum computing in simple terms."
Combine with flags:
gem-cli -j -m gemini-2.5-flash "Generate a meal plan for a vegetarian."
📂 Chat History & Responses
Manage conversation logs and responses with ease.
- View History
gem-cli -c - New Chat with Backup
gem-cli -n - New Chat without Backup
gem-cli -N
🔄 Listing Supported Models
Fetch and display models supported for generation.
gem-cli -l
Add -j for a JSON list or use -ll to print simple model list.
🗒️ Common Use Cases
- Quick fact queries
- Multi-turn AI conversations
- Scripted API calls in shell pipelines
- Generating formatted reports or code snippets
📜 License
gem-cli is licensed under GPL v3+. © 2025 Jore – GitHub/jorexdeveloper/gemini-cli
Collected info
- ★ 2 stars
- Language: Shell
- Source updated: 5/6/2026
Config for your environment
Replace {MCP_ENDPOINT_URL} with this MCP’s endpoint URL (from its repo or docs above). No API key — you connect directly.
Tool
OS
Config file: ~/.cursor/mcp.json
{
"mcpServers": {
"mcp-server": {
"url": "{MCP_ENDPOINT_URL}"
}
}
}Paste into mcpServers in the config file. Restart Cursor after saving.
If this MCP is also published on mcpchannel.ai, you can subscribe from Browse and use the gateway config there instead.