← Discover MCPs and Agents
g
MCPAI & MLGitHub

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

Demo Image

🚀 Installation

Follow these steps to install gem-cli on your system.

  1. Download the script:
    curl -LO https://raw.githubusercontent.com/jorexdeveloper/gemini-cli/main/gem-cli
    
  2. Make it executable:
    chmod +x gem-cli
    
  3. 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.json by 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

FlagDescription
-m NAMESet the API model (e.g., gemini-2.5-flash).
-iForce interactive mode.
-cPrint current chat history.
-nBackup and start a new chat.
-NStart new chat without backup.
-pPrivate chat (disable history & response saving).
-dDisable chat history.
-sShow separator between messages.
-rPrefer raw output (no pretty printing).
-RPrefer raw input (disable slash commands).
-jJSON output (implies raw output).
-qQuiet mode (suppress startup messages).
-QQuiet + raw output.
-lList supported API models.
-L INTSet log level (0=NONE to 5=DEBUG).
-vPrint version and exit.
-hPrint 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.