Gemini CLI: See Your Changes First

Paul Krill
2 Min Read

The Gemini CLI’s Plan mode ensures operations are limited to read-only tools, preventing file alterations beyond its internal planning documents.

Image source: Shutterstock / Jay Fog

Google has recently incorporated a new “plan mode” into its Gemini CLI, an open-source command-line interface designed for software engineering tasks.

Introduced on March 11, this plan mode allows the Gemini CLI to first concentrate on evaluating requests, developing strategies for intricate modifications, and comprehending the existing codebase or dependencies in a secure, read-only environment, thereby preventing unintended changes or executions. It will also pose clarifying questions to solidify objectives before presenting a user-reviewable approach. Google states that plan mode is now active by default for all users. Users can activate it anytime by entering /plan in the input area, cycling through approval modes with Shift+Tab, or simply instructing the agent to “commence a plan.”

According to Google, plan mode restricts the Gemini CLI to a select group of read-only utilities, such as read_file, grep_search, and glob, which are used to confirm assumptions. While this mode is active, the agent can explore a codebase, look for specific patterns, and consult documentation, but it is unable to alter any files other than its own internal planning documents. For instance, users can direct Gemini CLI to “investigate methods for migrating this database” or “devise a new feature,” and it will map out dependencies and suggest a solution without the hazard of immediate code alterations. Furthermore, a new ask_user utility has been implemented, enabling the agent to pause its analysis and ask specific questions to refine user objectives or collect any missing data.

Generative AIArtificial IntelligenceDevelopment ToolsSoftware Development
Share This Article
Leave a Comment

Leave a Reply

Your email address will not be published. Required fields are marked *