💎 Gemini CLI Proxy Configuration Guide

Complete guide to configure Gemini CLI with v98store proxy API

Gemini CLI is an open-source command-line AI tool provided by Google that brings Gemini's powerful capabilities directly to your terminal. It provides a lightweight way to access Gemini, offering the most direct path from prompts to models. By configuring a proxy (transit), you can use Gemini CLI services normally even in network-restricted environments.

🚀 Why Choose Gemini CLI?

🧠 Powerful Gemini 2.5 Pro

Access to 1 million token context window

🔧 Built-in Tools

Google Search basics, file operations, Shell commands, web scraping

🔌 Extensible

Supports MCP (Model Context Protocol) for custom integrations

💻 Terminal First

Designed specifically for developers working in the command line

🛡️ Open Source

Apache 2.0 license

📦 Installation Methods

Quick Installation

Using npx (Run instantly without installation)

# Using official repository npx https://github.com/google-gemini/gemini-cli

Using npm (Global installation)

npm install -g @google/gemini-cli

Using Homebrew (macOS/Linux)

brew install gemini-cli

System Requirements:

  • Node.js version 20 or higher
  • macOS, Linux, or Windows

⚙️ Proxy (Transit) Configuration

1. Set Environment Variables

Before using the proxy, you need to configure the following environment variables:

Linux/Unix/macOS:

# Set API key export GEMINI_API_KEY=sk-xxxxx # Set API proxy address export GOOGLE_GEMINI_BASE_URL=https://v98store.com

Windows CMD:

set GEMINI_API_KEY=sk-xxxxx set GOOGLE_GEMINI_BASE_URL=https://v98store.com

Windows PowerShell:

$env:GEMINI_API_KEY = "sk-xxxxx" $env:GOOGLE_GEMINI_BASE_URL = "https://v98store.com"

Note: You can also add these environment variables to .bashrc, .zshrc, or other shell configuration files so they are automatically set every time you start your terminal.

🚀 Quick Start

Basic Usage

Start in current directory

gemini

Include multiple directories

gemini --include-directories ../lib,../docs

Use specific model

gemini -m gemini-2.5-flash

Script non-interactive mode

Get simple text response:

gemini -p "Explain the architecture of this codebase"

Get structured JSON output:

gemini -p "Explain the architecture of this codebase" --output-format json

Quick Examples

Start new project

cd new-project/ gemini > Write a Discord bot for me that answers questions using the FAQ.md file I provide

Analyze existing code

git clone https://github.com/google-gemini/gemini-cli cd gemini-cli gemini > Give me a summary of all changes from yesterday

📋 Main Features

Code Understanding & Generation

  • Query and edit large codebases
  • Use multimodal capabilities to generate new apps from PDFs, images, or sketches
  • Debug issues and troubleshoot using natural language

Automation & Integration

  • Automate operational tasks like querying pull requests or handling complex rebase operations
  • Use MCP servers to connect new features
  • Run non-interactively in scripts for workflow automation

Advanced Features

  • Use built-in Google Search to get real-time information
  • Conversation checkpoints to save and restore complex sessions
  • Custom context files (GEMINI.md) to customize behavior for your project

💻 Common Commands and Examples

Explore Codebase

> Describe the main components of this system architecture > What security mechanisms are in place? > Provide a step-by-step onboarding document for new developers

Handle Existing Code

> Implement a draft for GitHub issue #123 > Help me migrate this codebase to the latest version of Java. Make a plan first

Automate Workflows

> Make a slide deck showing the git history of the past 7 days, grouped by feature and team member > Make a full-screen web app for wall display showing our most interacted GitHub issues

System Interaction

> Convert all images in this directory to png and rename them using dates from exif data > Organize my PDF invoices by spending month

🔗 GitHub Integration

Use Gemini CLI GitHub Action to integrate Gemini CLI directly into your GitHub workflows:

  • Pull Request Reviews: Automatic code reviews with contextual feedback and suggestions
  • Issue Classification: Automatically tag and prioritize GitHub issues based on content analysis
  • On-Demand Help: Mention @gemini-cli in issues and pull requests for debugging, explanations, or task delegation
  • Custom Workflows: Build automation, scheduled, and on-demand workflows tailored to your team's needs

🔧 Troubleshooting

If you encounter issues during use, refer to the following points:

  1. Check if environment variables are set correctly:
    echo $GEMINI_API_KEY echo $GOOGLE_GEMINI_BASE_URL
  2. Check if network connection is stable and proxy is accessible:
    curl -I https://v98store.com
  3. Check for error messages - these usually indicate the problem
  4. If using SOCKS proxy, ensure the proxy format is correct, e.g., socks5://<user>:<pass>@<proxy>:<port>
  5. Use built-in command to report issues:
    # Report bug directly in CLI /bug

📌 Version Release Notes

Preview Version

New preview versions are released every Tuesday at UTC 23:59. Install using the preview tag:

npm install -g @google/gemini-cli@preview

Stable Version

New stable versions are released every Tuesday at UTC 20:00. Install using the latest tag:

npm install -g @google/gemini-cli@latest

Nightly Version

Nightly versions are released daily at UTC 00:00. Install using the nightly tag:

npm install -g @google/gemini-cli@nightly

🔌 MCP Server Usage

Configure MCP servers in ~/.gemini/settings.json to extend Gemini CLI's custom tools:

> @github List my open pull requests > @slack Send a summary of today's commits to #dev channel > @database Run a query to find inactive users

📚 Related Resources

  • Official Roadmap: View upcoming features
  • NPM Package: Package registry
  • GitHub Issues: Report bugs or request features
  • Security Advisories: Security updates