Gemini CLI 2.0: Coolest Features You Need to Try Today! (+Cursor)

Mervin PraisonAbout 4 min readAug 20, 2025Watch original
THE SUMMARYAI-generated

Gemini CLI Updates: Integration with Cursor/VS Code, Features, and Automation

Key Concepts:

  • Gemini CLI: A command-line interface for interacting with Google's Gemini models.
  • Cursor/VS Code Integration: Connecting Gemini CLI with code editors for enhanced functionality.
  • Context Compression: Reducing the size of chat history to lower costs.
  • GitHub Actions: Automating code review, debugging, and task assignment using Gemini CLI.
  • Multimodal Content: Handling various types of data, including text and images.
  • Responsive Terminal UI: A user interface that adapts to different terminal sizes.
  • Reverse Command Search: Finding previously used commands.
  • Multi-directory Support: Working with multiple directories in a project.
  • Custom Sandbox: A secure environment for running terminal commands.

Installation and Setup

  1. Install Gemini CLI Companion Extension: In Cursor (or VS Code), search for and install the "Gemini CLI companion" extension.
  2. Install Gemini CLI via npm: Open the terminal and run npm install -g @google/gemini-cli. Ensure npm is installed (nodejs.org).
  3. Login to Google: Type gemini in the terminal, then /login and choose "Login with Google." Authenticate using your Gmail account.
  4. Verify IDE Integration: Type ide status in the Gemini CLI terminal to confirm connection to Cursor (or VS Code). For VS Code, ide install can be used.

Core Functionality and Features

  • File Awareness: Gemini CLI automatically detects the currently open file in Cursor/VS Code.
    • Example: Asking "explain about this file" will analyze the open file.
  • Selection-Based Analysis: Gemini CLI can analyze selected code snippets.
    • Example: Selecting a function and asking "explain me" will provide details about the selection.
  • Code Modification: Gemini CLI can make changes to the code directly within the editor.
    • Example: Asking "Add a mock test in this same file inside a new function" will generate and propose code changes.
    • Changes can be approved or rejected directly from the CLI.
  • Google Search Integration: Gemini CLI has built-in Google search capabilities.
    • Example: Asking "search about praise and AI and integrate it here" will perform a search and incorporate the results into the code.
    • Terminal commands triggered by search require user approval (can be set to "allow always").
  • Context Compression: Reduces the size of the chat history to lower costs.
    • Command: /compress
    • Example: Compressing 14,000 tokens to 863 tokens.
  • Statistics and Tools: The /stats command provides information about model usage, requests, errors, and latency. The /tools command lists available tools.

Configuration and Customization

  • Project-Specific Instructions: Create a gemini.md file in the project's root folder to provide custom instructions for Gemini CLI.
    • Example: gemini.md can contain instructions like "always search the web for the most up-to-date information" or "write in few lines as possible."
  • Settings: Store settings in a settings.json file within a .gemini folder in the project's root or the user's home directory.
  • Custom Sandbox: Create a secure environment where terminal commands won't affect the computer.

GitHub Actions Integration

  • Automated Code Review: Gemini CLI can be integrated with GitHub Actions to automate code review, debugging, and task assignment.
  • Available Actions:
    • Gemini CLI review: Reviews code changes.
    • Gemini CLI explain the code: Explains the code.
    • Gemini CLI implement this feature: Plans and implements a feature.
    • Suggest improvements: Suggests improvements to the code.
    • Help me debug this error: Helps debug errors in the code.
    • Write unit test: Writes unit tests for the code.
  • Task Assignment: Assign tasks to Gemini CLI directly from GitHub.
    • Example: @Gemini CLI implement this feature

Key Arguments and Perspectives

  • CLI vs. Cloud Code: The speaker suggests that Gemini CLI might be better than Cloud Code due to its speed, automation capabilities, and direct integration with GitHub/GitLab.
  • Automation Benefits: CLI-based automation simplifies repetitive tasks and integrates AI into the development workflow.

Pricing and Availability

  • Gemini CLI is free up to 60 model requests per minute and 1,000 model requests per day.
  • The CLI is open source.

Conclusion

The updated Gemini CLI offers powerful features for code analysis, modification, and automation, especially when integrated with code editors like Cursor and VS Code. Its GitHub Actions integration enables automated code review and task assignment, streamlining the development process. The CLI's speed, customization options, and free availability make it a compelling tool for developers.

AI summaries can miss context or contain errors. Check important details against the original video.

Go a little deeper.

Have a question about this video? Load its transcript to open the video chat.