Hey devs!
AI is transforming the way we work, and now it's coming directly to your command line. Google's Gemini is taking a major step forward with the Gemini CLI, a powerful tool that brings AI assistance right into your terminal.
Intrigued? Let's walk through how to get it set up and running.
Prerequisites
Before we begin, ensure you have Node.js v18 or higher installed on your system.
Getting Started with the Gemini CLI
Step 1: Install the CLI
Open your terminal and run one of the following commands:
# Using npx
npx @google/gemini-cli
# Or install globally with npm
npm install -g @google/gemini-cli
Step 2: Initial Setup
After the installation, simply type gemini
in your terminal. On the first run, you'll be prompted to choose a display theme for the CLI.
Step 3: Authenticate Your Account
Next, you'll need to authenticate. Follow the on-screen prompts to sign in with your Google account.
Step 4: Start Chatting!
That's it! You're all set. You can now enter your prompts and interact with Gemini directly from your command line.
Putting it to the Test
To see it in action, I opened an existing Angular workspace and asked Gemini to create a side-nav component. It handled the task perfectly, generating the necessary files and code.
Open Source and Accessible
The Gemini CLI is fully open-source (Apache 2.0), so you can inspect the code and understand how it works. For general use, the Gemini 1.5 Flash model offers a generous free tier. If you're a professional developer running multiple agents or need more power, you can provide a Google AI Studio or Vertex AI key for usage-based billing.
๐ Important Notes
Gemini 2.5 Pro allows:
- Up to 60 model requests per hour
- Up to 1,000 model requests per day โ at no cost
- If you're a professional developer running multiple agents or tasks concurrently, I recommend using a dedicated model via Google AI Studio or Vertex AI with usage-based billing.
Beyond the CLI: Gemini in Your IDE
The power of Gemini isn't limited to the terminal. The Gemini Code Assist extension is now available for VS Code, bringing the same AI capabilities directly into your editor.
Just install the extension, sign in, and you can start writing prompts in the chat window, getting code suggestions, explanations, and moreโall without leaving your development environment.
Summary Table
Feature | Gemini CLI | Gemini Web UI | Gemini Code Assist (IDE) |
---|---|---|---|
Best For | Quick terminal tasks & scripting | Research & complex conversation | Active coding & debugging |
Integration | High (Terminal) | None (Browser) | Highest (IDE) |
Local Context | Current directory | None (Copy/Paste) | Entire open project |
UI | Text-only | Rich & Interactive | Integrated into IDE |
Workflow | No context switching from terminal | Requires context switching | No context switching from code |
In short:
- Use the CLI for quick, terminal-based tasks.
- Use the Web UI for research, learning, and writing.
- Use Code Assist for almost everything else while you are actively coding.
Ready to get started? Check out the official GitHub repository for the Gemini CLI:
https://github.com/google-gemini/gemini-cli
โ๏ธ Author: Vetriselvan
๐จโ๐ป Frontend Developer | ๐ก Code Enthusiast | ๐ Lifelong Learner | โ๏ธ Tech Blogger | ๐ Freelance Developer
Top comments (0)