top of page
5d.png

Getting Started with Gemini CLI: An Open-Source AI Agent by Google

The Command-line interface (CLI) is a fast and efficient text-based method for interacting with a computer's operating system, where the real work gets done. Now, Google has brought AI directly to this familiar interface with the introduction of Gemini CLI, an open-source AI agent that could change how developers interact with their code and workflows. Gemini CLI is a purpose-built coding agent designed to live and work where developers are most comfortable, the command-line interface (CLI).



Gemini CLI: an open-source AI agent by Google:


According to Google, the Gemini CLI is a versatile AI agent for a wide array of tasks, from writing and debugging code to managing complex research and generating content. It's a lightweight AI agent that provides a direct line to the Gemini 2.5 Pro model, known for its large context window that can handle up to a million tokens of information. This means it can understand and work with large codebases, a huge advantage for developers working on complex projects.


One of the most notable aspects of Gemini CLI is its accessibility.


  • Individual developers can use it for free by logging in with a personal Google account, which grants them a Gemini Code Assist license. This free tier is generous, offering up to 60 model requests per minute and 1,000 requests per day, a higher limit than many other similar tools on the market.

  • For professionals with more demanding needs, there are options for usage-based billing through Google AI Studio or Vertex AI, as well as paid licenses for Gemini Code Assist.


Here are some of the key features of Gemini CLI:


  • Direct Terminal Integration: Gemini CLI brings AI capabilities directly into the command line, allowing developers to use simple prompts to perform a variety of tasks without leaving their primary work environment.

  • Open and Extensible: The tool is fully open-source under an Apache 2.0 license, which means developers can inspect, change, and contribute to the code. It's also designed to be extensible, supporting the Model Context Protocol (MCP) and allowing for custom prompts and configurations.

  • Powerful Built-in Tools: Gemini CLI comes with a set of built-in tools that enhance its functionality, including the ability to ground prompts with Google Search for real-time information, manipulate files, execute commands, and even progressively troubleshoot issues.

  • Shared Technology with Gemini Code Assist: The same technology that powers Gemini CLI is also integrated into Gemini Code Assist for VS Code. This gives a consistent experience for developers who switch between their command line and integrated development environment (IDE).


Getting started with Gemini CLI:


Step 1: Install Node.js version 18 or higher and give the required permissions to make changes.

Step 2: Paste one of the following command lines in your terminal. I used Windows PowerShell for this article.

Or

npm install -g @google/gemini-cli
gemini

Step 3: Once everything has been installed:

  • Select the theme.

Getting Started with Gemini CLI: An Open-Source AI Agent by Google
  • Authenticate by logging in with Google.

Getting Started with Gemini CLI: An Open-Source AI Agent by Google

Step 4: Start using the Gemini CLI as your coding agent to write code, debug issues, and simplify your workflow.

  • For this example, I have created a simple portfolio website using the Google Gemini CLI open-source AI agent.

Getting Started with Gemini CLI: An Open-Source AI Agent by Google

Conclusion:


Gemini CLI is a thoughtful way to integrate AI into the developer workflow. Google is making a compelling case for the future of AI-assisted development by providing a powerful, open, and accessible tool and meeting developers where they are—in the terminal. The Gemini CLI isn't the first of its kind, but its ultimate success will depend on its performance and the value it provides to the developer community.

4a.png
bottom of page