Skip to main content

Overview

While cmd’s agent mode can autonomously take on complex tasks, you might prefer to bring in an external agent.
Setting up Gemini CLI gives you access to powerful agentic capabilities through cmd’s native interface in Xcode.

Prerequisites

Before configuring Gemini CLI in cmd, you need to have Gemini CLI installed and set up on your system.
1

Install Gemini CLI

Follow the official setup guide to install Gemini CLI.
2

Verify Installation

Ensure Gemini CLI is working properly and that your version is higher or equal to 0.20.0:
gemini --version # Should be >= 0.20.0
3

Login in Gemini CLI

Launch Gemini CLI in your terminal to authenticate with your Google account or API key

Configuring Gemini CLI in cmd

Once Gemini CLI is installed and configured, you can enable it in cmd:
1

Open AI Provider Settings

Go to Settings > AI Providers in cmd
2

Configuration

cmd should automatically detect where Gemini CLI is installed on your system.Otherwise, or if you need specific launch arguments, you can manually specify how to launch Gemini CLI
  1. Click “Add Provider” or “Configure” for Gemini CLI
  2. Provide the path to the Gemini CLI binary
  3. Optionally, specify a custom command if you use a specific way to run Gemini CLI
If you have Gemini CLI installed in a specific location:
/usr/local/bin/gemini
If installed via npm globally:
npx @google/gemini-cli
If installed via Homebrew:
/opt/homebrew/bin/gemini
3

Enable Gemini CLI

Toggle “Enable” for Gemini CLI

Using Gemini CLI

Once enabled, Gemini CLI will appear in your model selection:
1

Select Gemini CLI

In the cmd interface, open the model selector and choose “Gemini CLI”
2

Start Using

You can now use Gemini CLI’s advanced agentic capabilities:
  • Multi-step task execution
  • Integrates with your existing Gemini CLI configuration, including GEMINI.md
  • Rich native UI in cmd
Gemini CLI appears in the model selector just like any other AI model, but as an external agent it provides advanced capabilities that go beyond simple chat interactions.