Blogs/AI

How to install Gemini CLI and use it?

Written bySharmila Ananthasayanam
Jun 29, 2026
4 Min Read
How to install Gemini CLI and use it? Hero

AI coding assistants are evolving beyond browser tabs and editor plugins. Developers now want AI tools directly inside the terminal, where coding, testing, Git workflows, and deployments already happen. Google Gemini CLI is built for exactly that shift.

Released in June 2025, Gemini CLI brings Google Gemini models into the command line to help with coding, debugging, automation, and understanding large codebases without breaking your workflow. It turns the terminal into a smarter workspace where you can move faster and solve tasks in one place.

In this guide, I’ll explain what Gemini CLI is, how to install it, and how to start using it effectively.

What is Gemini CLI?

Gemini CLI is an AI-powered command-line assistant from Google that runs directly inside your terminal. It is built for developers who want help with coding, debugging, scripting, and project workflows without leaving the command line.

Unlike a standard chatbot, Gemini CLI can understand development tasks, inspect files, generate code, explain errors, assist with Git operations, and automate repetitive commands. It uses a reasoning-and-action approach, allowing it to analyze requests, decide the next step, and interact with local tools or connected servers when needed.

In simple terms, Gemini CLI turns your terminal into a smarter workspace, helping you build and troubleshoot faster while staying inside your normal workflow.

How to Get Started and Install Google CLI?

Before installing Gemini CLI, make sure Node.js version 18 or higher is installed on your system. You can verify this by running:

Option 1: Use without installing

You can try it instantly using:

npx https://github.com/google-gemini/gemini-cli

No setup required.

Option 2: Install it globally

If you plan to use it often, install Google CLI globally so you can launch Gemini anytime from your terminal.

sudo npm install -g @google/gemini-cli

After installation, just type gemini in your terminal to launch it. 

Installing Gemini globally

Select your desired theme and press Enter.

When Gemini CLI opens for the first time, it will guide you through authentication. Once completed, you’re ready to start using AI commands directly from your terminal.

Authentication Options for Using Gemini CLI

When Gemini CLI starts for the first time, you’ll be asked to sign in. You can choose from three authentication methods depending on your setup and usage needs.

Getting Started with Google Gemini CLI
Learn how to install and use Google Gemini CLI for model interaction, scripting, and automation.
Murtuza Kutub
Murtuza Kutub
Co-Founder, F22 Labs

Walk away with actionable insights on AI adoption.

Limited seats available!

Calendar
Saturday, 11 Jul 2026
10PM IST (60 mins)

1. Sign in with Google

The easiest option for most users. It gives access to Gemini with a free usage tier.

  • 60 requests per minute
  • 1,000 requests per day

2. Use a Gemini API Key

Best for developers who want direct API access or higher limits. Add your API key in a .env file:

GEMINI_API_KEY=your_api_key

Or export it directly in your terminal:

export GEMINI_API_KEY=your_api_key

Free Tier:

  • Flash model only
  • 10 requests per minute
  • 250 requests per day

Paid Tier:

  • Higher quotas based on your plan

3. Use Vertex AI

Best for enterprise teams already using Google Cloud. It supports production workloads with quotas based on your Google Cloud tier.

Choose the option that matches your workflow, casual use, developer testing, or enterprise deployment.

What Can Gemini CLI Do?

Gemini CLI is more than a terminal chatbot. It can actively assist with real development and workflow tasks directly from the command line. Here are some of its most useful capabilities:

1. Understand Large Codebases

Ask questions about your project files, trace logic across folders, explain unfamiliar code, or quickly understand large repositories without manual digging.

2. Generate Apps from PDFs or Sketches

Use Gemini’s multimodal abilities to turn documents, wireframes, or rough designs into working code and project scaffolds.

3. Automate DevOps Tasks

Handle repetitive engineering work such as pull requests, rebases, shell commands, deployment scripts, and environment setup using simple prompts.

4. Extend with Tools and MCP Servers

Connect external tools and model context servers (MCPs) to unlock workflows like image generation, media creation, or custom automation.

Use built-in Google Search integration to fetch fresh information, documentation, and web context directly inside your terminal workflow.

Getting Started with Google Gemini CLI
Learn how to install and use Google Gemini CLI for model interaction, scripting, and automation.
Murtuza Kutub
Murtuza Kutub
Co-Founder, F22 Labs

Walk away with actionable insights on AI adoption.

Limited seats available!

Calendar
Saturday, 11 Jul 2026
10PM IST (60 mins)

6. Write, Debug, and Refactor Code

Generate functions, fix bugs, optimize code, and refactor existing files without leaving the command line.

Conclusion

Gemini CLI brings AI directly into the terminal, helping developers code, debug, automate tasks, and understand projects without leaving their workflow. Its combination of command-line speed, multimodal capabilities, and Google-powered intelligence makes it a practical tool for modern development teams.

Whether you're working on side projects or production systems, Gemini CLI can help reduce repetitive work and improve productivity. For teams looking to go beyond tools and build custom AI products, partnering with an experienced AI development company can help turn ideas into scalable solutions faster.

Frequently Asked Questions

1. What is Gemini CLI?

Gemini CLI is Google’s AI-powered command-line tool that helps developers code, debug, automate tasks, and interact with projects directly from the terminal.

2. How do I install Gemini CLI?

You can run it instantly with npx or install it globally using npm install -g @google/gemini-cli on systems with Node.js 18 or higher.

3. Is Gemini CLI free to use?

Yes, Gemini CLI offers free usage options through Google login or API keys, with request limits depending on the authentication method used.

4. What can Gemini CLI do?

It can write code, explain files, debug errors, automate workflows, manage Git tasks, and answer technical questions inside your terminal.

5. Can Gemini CLI understand large codebases?

Yes, Gemini CLI is designed to analyze large projects and help developers navigate unfamiliar code faster.

6. Who should use Gemini CLI?

Developers, DevOps engineers, students, and technical teams who want AI assistance directly in the command line can benefit from Gemini CLI.

Author-Sharmila Ananthasayanam
Sharmila Ananthasayanam

I'm an AIML Engineer passionate about creating AI-driven solutions for complex problems. I focus on deep learning, model optimization, and Agentic Systems to build real-world applications.

Share this article

Phone

Next for you

How We Merged Two TTS Models Using Task Arithmetic Without Retraining Cover

AI

Jul 8, 20268 min read

How We Merged Two TTS Models Using Task Arithmetic Without Retraining

Too Long? Read This First - Task arithmetic lets you merge two fine-tuned models by treating their weight changes as vectors you can add together, no retraining required. - It only works if both models were fine-tuned from the same base checkpoint, different architectures or base models can't be merged this way. - We merged a female-voice TTS model with an Indian-English-accent male model into one checkpoint that kept the female voice and the correct pronunciation. - The merge is pure arithmetic

OpenAI Privacy Filter: How to Detect and Redact PII Locally Cover

AI

Jul 6, 20267 min read

OpenAI Privacy Filter: How to Detect and Redact PII Locally

Too Long? Read This First - OpenAI Privacy Filter is a small (1.5B params, 50M active), open-weight model built specifically to detect and redact PII, not a general-purpose LLM. - It runs locally and handles long inputs (128K tokens), so sensitive data can be masked before it ever reaches an external AI model or database. - It detects 8 categories: names, addresses, emails, phone numbers, URLs, dates, account numbers, and secrets like API keys and passwords. - It's a token-classification model t

How to Build a Custom AI Agent for Your Business Workflow Cover

AI

Jul 6, 202614 min read

How to Build a Custom AI Agent for Your Business Workflow

Too Long? Read This First - An AI agent takes a goal and works toward it autonomously, unlike a chatbot (waits for messages) or traditional automation (fixed logic, breaks on unexpected input). - Build one when a task is high-volume, moderately complex, and has enough variation that scripts keep breaking, not when it needs deep expertise or errors are hard to reverse. - The 10-step process: define the workflow and its boundaries, map decisions explicitly, prepare the knowledge base, pick the sim