Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

docs gemini cli

Ishaan Jaff329f8ec7a60a
diff --git a/docs/my-website/docs/tutorials/litellm_gemini_cli.md b/docs/my-website/docs/tutorials/litellm_gemini_cli.md
index df484b9df55..ff638e4de90 100644
--- a/docs/my-website/docs/tutorials/litellm_gemini_cli.md
+++ b/docs/my-website/docs/tutorials/litellm_gemini_cli.md
@@ -1,30 +1,68 @@
# Use LiteLLM with Gemini CLI
-Quickstart
+This tutorial shows you how to integrate the Gemini CLI with LiteLLM Proxy, allowing you to route requests through LiteLLM's unified interface.
+## Prerequisites
-### 1. Install Gemini CLI
+Before you begin, ensure you have:
+- Node.js and npm installed on your system
+- A running LiteLLM Proxy instance
+- A valid LiteLLM Proxy API key
+- Git installed for cloning the repository
+
+## Quick Start Guide
+
+### Step 1: Install Gemini CLI
+
+Clone the Gemini CLI repository and navigate to the project directory:
```bash
git clone https://github.com/ishaan-jaff/gemini-cli.git
cd gemini-cli
```
-### 2. Point Gemini CLI to LiteLLM Proxy
+Install the required dependencies:
+
+```bash
+npm install
+```
+
+### Step 2: Configure Gemini CLI for LiteLLM Proxy
-Set `BASE_URL` to the LiteLLM Proxy URL and set `GEMINI_API_KEY` to your LiteLLM Proxy API key.
+Configure the Gemini CLI to point to your LiteLLM Proxy instance by setting the required environment variables:
```bash
export BASE_URL=http://localhost:4000
export GEMINI_API_KEY=sk-1234567890
```
-### 3. Run Gemini CLI
+**Note:** Replace the values with your actual LiteLLM Proxy configuration:
+- `BASE_URL`: The URL where your LiteLLM Proxy is running
+- `GEMINI_API_KEY`: Your LiteLLM Proxy API key
+
+### Step 3: Build and Start Gemini CLI
+
+Build the project and start the CLI:
```bash
npm run build && npm start
```
-### 4. Test it
+### Step 4: Test the Integration
+
+Once the CLI is running, you can send test requests. These requests will be automatically routed through LiteLLM Proxy to the configured Gemini model.
+
+The CLI will now use LiteLLM Proxy as the backend, giving you access to LiteLLM's features like:
+- Request/response logging
+- Rate limiting
+- Cost tracking
+- Model routing and fallbacks
+
+## Troubleshooting
+
+If you encounter issues:
+
+1. **Connection errors**: Verify that your LiteLLM Proxy is running and accessible at the configured `BASE_URL`
+2. **Authentication errors**: Ensure your `GEMINI_API_KEY` is valid and has the necessary permissions
+3. **Build failures**: Make sure all dependencies are installed with `npm install`
-Send a test request on Gemini CLI, this will get routed to LiteLLM Proxy and then to Gemini.