🚀 Introducing the New and Improved Gemini CLI

by Sudipta Deb | Oct 6, 2025 | Artificial intelligence (AI), Google Cloud, Google Cloud Platform | 0 comments

Sudipta Deb

Sudipta Deb

Founder of Technical Potpourri, Co-Founder of Shrey Tech, Enterprise Cloud Architect

Google's Gemini CLI has received some exciting updates, making it an even more powerful tool for developers. This post will walk you through seven of the most notable new features, including a new Visual Studio Code extension, a memory function, and GitHub Actions integration. Against each feature, I have added the timestamp from my YouTube video so that you can jump into that section directly. Just in case. smile

Watch The Video Or Read The Article (Or Do Both smile)

The form you have selected does not exist.

1. Context-Aware Interaction with Gemini CLI Companion

The new Gemini CLI Companion is a Visual Studio Code extension that allows the Gemini CLI to be context-aware. This means it can understand what you're working on without you needing to explicitly provide file paths.

  • Logic of an Open File: You can now simply type a command like "tell me the logic of the file" and Gemini will analyze the open file and explain its purpose [00:35]. This is a significant improvement from the previous method, which required manually specifying the file path.
  • Highlighted Code Sections: Gemini can also understand the context of a highlighted code section. You can ask it to explain a specific block of code by using a command like "tell me the logic of the highlighted section" [01:45].

2. The Powerful "Memory" Feature

The "memory" feature allows you to store instructions that Gemini will remember and apply to future interactions across all your projects [02:24]. This is particularly useful for enforcing coding standards and best practices.

  • Adding a Memory: You can add an instruction to Gemini's memory using the command /memory add followed by your instruction [03:19]. For example, you can instruct it to "make sure all variable names should follow the lower camel case naming convention" [05:09].
  • Applying Stored Rules: After adding a rule to the memory, you can tell Gemini to apply it by using a command like "please follow my rules and update" [05:36]. Gemini will then review and update your code to adhere to the stored instructions.

3. Project Structure Awareness with /init

The /init command creates a gemini.md file that provides a foundational context of your project's directory structure and content [07:14]. This helps the Gemini agent be more efficient and use fewer tokens when responding to your requests.

  • Improved Efficiency: Instead of having to review your entire project every time, the Gemini agent can now refer to the gemini.md file for an overview of your project structure, making its responses faster and more accurate [07:41].
  • Foundation for Future Instructions: The gemini.md file serves as a reference point for all future interactions, allowing the agent to understand the project's layout and content without needing to re-analyze it [09:15].

4. Seamlessly Copy Files Across Workspaces

This feature allows you to copy files from one project to another, including the folder structure.

  • Adding Directories: You can add another project's directory to your current Gemini workspace using the command /dir add [11:36].
  • Copying with Folder Structure: After adding the directory, you can copy a file with its folder structure using a command like "please copy the file [file_name] and the folder structure to this project" [13:17].

5. Session-Specific Usage Statistics

You can now check the usage statistics of your current Gemini session.

  • Checking Stats: The command /stats model provides details on the number of requests, errors, and tokens used in the current session [13:57]. This is useful for monitoring your token usage, but remember it only shows data for the current session.

6. Saving and Resuming Your Chat History

The chat history feature allows you to save and resume conversations, including the context, across different sessions [14:56].

  • Saving a Chat: To save your conversation, use the command /chat save [chat_name] [15:34].

  • Resuming a Chat: You can resume a previously saved chat by using the command /chat resume [chat_name] [16:03].

7. Automated PR Reviews with GitHub Integration

This powerful integration automates the process of reviewing pull requests using Gemini.

  • Setting Up the Integration: The command /setup-github will walk you through the process of setting up your GitHub repository and creating the necessary secrets and workflows [17:16].

  • Automated PR Reviews: Once set up, Gemini will automatically review new pull requests, provide feedback, and confirm if all checks have passed [20:13]. This helps streamline your development workflow and ensures code quality.

Final Thoughts

These new features make the Gemini CLI a much more powerful and efficient tool for developers. You can find more information about these features and the Gemini CLI in general by checking out the video here: https://www.youtube.com/watch?v=c11INQTQDLk

Disclaimer

This article is not endorsed by Salesforce, Google, or any other company in any way. I shared my knowledge on this topic in this blog post. Please always refer to Official Documentation for the latest information.

0 Comments

Leave a Reply

Written by Sudipta Deb

Enterprise Cloud Architect, Content Creator, 20x Salesforce Certified, 1x Google Cloud Certified, 2x Copado Certified

Related Posts

0 Comments

Leave a Reply