Key Concepts
Gemini CLI, command-line interface, AI agent, interactive mode, single-shot requests, Gemini Code Assist, cursor competitor, free access, Gemini 2.5 Pro, token context window, MCP servers, customized prompts, task automation, Google search integration, code fixing, AIdriven task development, Gemini markdown file, memory, schema updates, Nex.js project creation.
Gemini CLI Overview
Google released Gemini CLI, an open-source AI agent accessible through the terminal, positioning it as a direct competitor to tools like Claude and Cursor. The tool offers both interactive and single-shot request modes. The interactive mode allows users to chat with the AI agent, while the single-shot mode enables quick question answering.
Gemini Code Assist
Google also has Gemini Code Assist, a direct competitor to Cursor, allowing users to chat within their IDE and make code changes.
Free Access and Token Usage
Individual developers get free access to Gemini 2.5 Pro, including 60 requests per minute and 1,000 requests per day. Gemini 2.5 Pro has a 1 million token context window, which would normally cost $3 per request. This free access provides significant value, potentially up to $180 worth of tokens per day.
Features and Capabilities
Google Search Integration
Gemini CLI integrates with Google Search, enabling users to perform searches directly from the terminal.
MCP Server Integration
The tool supports MCP (Modular Computation Platform) servers, allowing users to connect to services like Notion and Gmail directly from the terminal. An example given is creating a video of a cat using MCP tools for image creation and video conversion.
Customization and Automation
Users can customize prompts using a Gemini.mmarkdown file and automate tasks by integrating Gemini CLI into existing scripts.
Setting up Gemini CLI
- Install Node.js.
- Run
npm install -g @google/generative-ai-clito install Gemini CLI globally. - Log in using a Google personal account to access free credits.
- Alternatively, use a Gemini API key stored in a
.envfile asGEMINI_API_KEY.
Customization Options
The tool offers various customization options accessible via forward slash (/), including:
- Changing the theme.
- Selecting an editor (e.g., Cursor).
- Listing available tools (e.g., web search, file search, Google search).
Code Examples and Testing
Simple Code Fix
The first test involved fixing a scrolling issue on a profile page. Gemini CLI identified the problem as a styling issue and suggested a fix involving the overflow property. The user could apply the change directly or modify it in an external editor like Cursor. The tool also allows updating its memory to prioritize certain commands (e.g., npm lint).
Medium-Sized Task: Adding a Memory Tab
The second test involved adding a new "Memory" tab to an AI chat application. The goal was to create a CRUD (Create, Read, Update, Delete) table for storing text memories, which would then be included as context in all AI chat messages.
- Task Definition: The user provided a screenshot and a task template to Gemini CLI, outlining the desired functionality.
- Plan Generation: Gemini CLI generated a multi-stage plan, including creating a memories table, a memories page, and updating the chat API.
- Schema Update: The user reminded Gemini CLI to update the database schema to include a new memory table.
- Document Creation: Gemini CLI created a detailed task document in the AI docs folder, outlining the plan, text stack, API changes, and front-end components.
- Implementation: The user instructed Gemini CLI to implement the plan phase by phase, reviewing the results after each phase.
The AI successfully implemented the feature, including database migrations, UI updates, and API modifications, in a matter of minutes. The new memory tab allowed users to add, edit, and delete text memories, which were then included as context in all AI chat messages.
New Project Creation: Landing Page
The third test involved creating a brand new landing page for the YouTube channel "AI with Brandon" using Next.js. The user instructed Gemini CLI to research the channel and create a beautiful and modern website.
- Initial Attempt: Gemini CLI created a basic Next.js project but failed to produce a visually appealing landing page.
- Feedback and Iteration: The user provided feedback and a screenshot, instructing Gemini CLI to redo the landing page with a focus on UI/UX design.
- Final Result: Despite the feedback, the final result was still underwhelming. While some animations were added, the overall design was not visually appealing.
Conclusion
Gemini CLI is a powerful tool for code fixing and adding new features to existing projects, especially when provided with sufficient context. It struggles with creating brand new projects from scratch, particularly in generating visually appealing UIs. The tool thrives with context and is best used for incremental improvements and feature additions to existing codebases. The free access to Gemini 2.5 Pro makes it an attractive option for individual developers.
AI summaries can miss context or contain errors. Check important details against the original video.