> ## Documentation Index
> Fetch the complete documentation index at: https://docs.routeway.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Gemini CLI

> Use Gemini CLI with Routeway through a community fork that supports OpenAI-compatible providers.

Gemini CLI can work with Routeway through a community fork that supports OpenRouter-style configuration. This lets you use Gemini CLI with any Routeway model.

<Warning>
  This integration depends on a community fork, not the official Gemini CLI release. Review the repository before using it in production.
</Warning>

<Note>
  Requires a valid Routeway API key. Get yours from the [dashboard](https://routeway.ai/dashboard/api-keys).
</Note>

***

## Setup

<Steps>
  <Step title="Clone the OpenRouter-compatible fork">
    Use the community fork with OpenRouter support:

    ```bash theme={null}
    git clone https://github.com/heartyguy/gemini-cli
    cd gemini-cli
    git checkout feature/openrouter-support
    ```
  </Step>

  <Step title="Configure environment variables">
    Point the fork at Routeway's OpenAI-compatible endpoint:

    <CodeGroup>
      ```bash Shell (macOS / Linux / WSL) theme={null}
      export OPENROUTER_BASE_URL="https://api.routeway.ai/v1"
      export OPENROUTER_API_KEY="YOUR_ROUTEWAY_API_KEY"
      ```

      ```powershell Windows PowerShell theme={null}
      $env:OPENROUTER_BASE_URL="https://api.routeway.ai/v1"
      $env:OPENROUTER_API_KEY="YOUR_ROUTEWAY_API_KEY"
      ```
    </CodeGroup>
  </Step>

  <Step title="Choose a tools-capable model">
    If you want repo search, file edits, or command execution, choose a model that supports function calling. Browse available options at [routeway.ai/models](https://routeway.ai/models).
  </Step>

  <Step title="Install dependencies and start the CLI">
    Requires Node.js 18+:

    ```bash theme={null}
    npm install
    npm start
    ```
  </Step>

  <Step title="Verify the setup">
    Ask the CLI to inspect the current project or explain a file. If it answers normally and can use tools when needed, the Routeway connection is working.
  </Step>
</Steps>

***

## Notes

* **Base URL**: `https://api.routeway.ai/v1`
* **Auth**: Standard Routeway API key
* This setup may drift as the community fork evolves

***

## Example Prompts

Try these once you're connected:

* *"Summarize the project structure and key modules."*
* *"Find the code responsible for X and explain how it works."*
* *"Propose a refactor plan for module Y and list the files to change."*
