How to Install and Set Up Google Gemini CLI for AI Development

How to Install and Set Up Google Gemini CLI for AI Development

June 26, 2025


Getting started with new AI tools can sometimes feel overwhelming, especially when initial setup steps seem convoluted. If you're diving into Google Gemini CLI for your AI and large language model (LLM) projects, this guide is here to streamline your process. We'll walk through the essential steps to install, configure, and activate the Gemini CLI, so you can focus on building and experimenting with language models rather than wrestling with setup.

Google Gemini CLI is an open-source tool designed to enhance AI development workflows. It enables developers to interact with large language models via command-line, manage virtual environments, and integrate models with various datasets and tools. Installing it properly lays the foundation for efficient, scalable AI projects.


Step-by-Step Guide to Installing Gemini CLI

1. Prerequisites

Before beginning, ensure your system meets these requirements:

  • Python 3.8 or higher
  • pip package manager
  • Git installed
  • A Google account (to get a free Gemini Code Assist license)

2. Clone the Gemini CLI Repository

Start by downloading the latest version of Gemini CLI from GitHub:

git clone https://github.com/google-gemini/gemini-cli.git
cd gemini-cli

This command fetches the codebase and prepares your environment for installation.

3. Create a Virtual Environment

Creating an isolated environment ensures your setup remains clean and manageable:

python -m venv gemini-env

Here, gemini-env is the name of your virtual environment.

4. Activate the Virtual Environment

Depending on your OS, activate the environment:

  • On Windows:
gemini-env\Scripts\activate
  • On macOS/Linux:
source gemini-env/bin/activate

Once activated, your terminal prompt should indicate the active environment.

5. Install Required Packages

With the virtual environment active, install the necessary dependencies:

pip install -r requirements.txt

This will install all the packages needed for Gemini CLI to function smoothly.


6. Set Up Your Google Gemini Account

To interact with Gemini, you'll need a Gemini Code Assist license:

Using these steps, you’ll have high request limits to experiment freely.


7. Verify the Installation

Ensure everything is correctly set up:

gemini --help

This command should display help information about Gemini CLI commands, confirming successful installation.


8. Start Using Gemini CLI

Now, you're ready to run commands, generate code, or manage models:

  • Generate HTML and JS code with Tailwind:
gemini prompt "Build me a landing page with a cat cafe in San Francisco."
  • Save facts with memory tool:
gemini memory save "Mun cats are adorable."
  • Access model search and image generation features via MCPs for advanced tasks.

Summary: Quick Reference Cheat Sheet

StepCommand / ActionNotes
Clone repogit clone https://github.com/google-gemini/gemini-cli.gitFetch latest Gemini CLI code
Create virtual environmentpython -m venv gemini-envIsolate dependencies
Activate environmentWindows: gemini-env\Scripts\activate macOS/Linux: source gemini-env/bin/activatePrepare for package installation
Install dependenciespip install -r requirements.txtSet up necessary packages
Verify installationgemini --helpConfirm CLI is working
Get licenseSign in to Google account and get Gemini licenseEnable API request limits

Setting up the Google Gemini CLI might seem daunting at first, but following these steps simplifies the process. Once configured, you'll unlock powerful capabilities like code generation, dataset access, and multi-model management—all from your terminal. This setup forms the backbone of productive AI development workflows, whether you're building LLM agents, experimenting with datasets, or deploying models.


More resources?

Summary with key points

Watch on Youtube

Written by

Felix Tran - Creator of TubeMemo



Frequently Asked Questions


Perfect for students, researchers, content creators and professionals

TubeMemo helps you turn any YouTube video into clear notes, summaries, and insights