Skip to main content
Gemini CLI is a command-line tool. To use it with NagaAI, you can use a community fork/branch that supports OpenRouter-compatible configuration, then point it at NagaAI.
This relies on a community fork/branch (not the official Gemini CLI). Review the repository before using it in production environments.

Setup

1

Clone the OpenRouter-compatible fork/branch

The upstream Gemini CLI may only support Google Gemini providers. Use the OpenRouter-compatible fork/branch:
git clone https://github.com/heartyguy/gemini-cli
cd gemini-cli
git checkout feature/openrouter-support
2

Configure environment variables for NagaAI

Set the base URL to NagaAI’s OpenAI-compatible API:
export OPENROUTER_BASE_URL="https://api.naga.ac/v1"
export OPENROUTER_API_KEY="YOUR_NAGAAI_API_KEY"
Need an API key? Get one from the NagaAI dashboard: https://naga.ac/dashboard (API Keys section). Also see our Quickstart.
3

Choose a tools-capable model

If you want agentic actions (file reads/edits, command execution), choose any model that supports function calling (tools):
4

Install & run

Requirements: Node.js 18+
npm install
npm start

Try it

  • “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.”