This is a WIP community resource, containing contribution from community members.
This section shows how to use Gemini CLI, a command-line interface for Google Gemini, to assist with various coding tasks directly in your terminal.
npm install -g @google/gemini-cligemini in your terminal.Login with Google.Ctrl+Shift+\ or go to Terminal → New TerminalAlt+F12 or go to View → Tool Windows → Terminalgemini to start a Gemini CLI session.@path/to/file. Typing @ allows you to select files using arrow keys and Enter.Yes, allow once or Yes, allow always, then press Enter.Here are some useful common commands you can use with Gemini CLI:
Describe the main pieces of this project
@path/to/file
Describe what this file and its methods do
@path/to/file
Help me write a method to calculate the Fibonacci sequence
@path/to/file
My Java code throws an error at line 42\. Here is the error...
Run Checkstyle on this Java file and fix any warnings
@path/to/file
Refactor this code to improve readability and performance
@path/to/file
Review this code and suggest improvements
@path/to/file
Generate Javadoc comments for this Java file
@path/to/file
Write unit tests for this Java file using JUnit
@path/to/file
Compile this Java project and fix any errors
Gemini CLI is still in its early stages. The gemini-2.5-pro model generally performs well, but due to rate limits, usage with gemini-2.5-flash may vary and lead to reduced reliability.