// "Use Gemini CLI for analyzing large codebases or multiple files that exceed context limits. Leverage Google Gemini's massive context window with `gemini -p` and `@` syntax for file/directory inclusion to verify implementations, check patterns, and understand project-wide architecture."
| name | gemini-cli |
| description | Use Gemini CLI for analyzing large codebases or multiple files that exceed context limits. Leverage Google Gemini's massive context window with `gemini -p` and `@` syntax for file/directory inclusion to verify implementations, check patterns, and understand project-wide architecture. |
When you need to analyze large codebases, multiple files, or entire directories that might exceed your context window, use the Gemini CLI. This tool provides access to Google Gemini's large context capacity, allowing you to:
Use the @ syntax to include files and directories in your Gemini prompts. Important: Paths are relative to WHERE you run the gemini command.
gemini -p "@src/main.py Explain this file's purpose and structure"
gemini -p "@package.json @src/index.js Analyze the dependencies used in the code"
gemini -p "@src/ Summarize the architecture of this codebase"
gemini -p "@src/ @tests/ Analyze test coverage for the source code"
gemini -p "@./ Give me an overview of this entire project"
Or use the --all_files flag:
gemini --all_files -p "Analyze the project structure and dependencies"
gemini -p "@src/ @lib/ Has dark mode been implemented in this codebase? Show me the relevant files and functions"
gemini -p "@src/ @middleware/ Is JWT authentication implemented? List all auth-related endpoints and middleware"
gemini -p "@src/ Are there any React hooks that handle WebSocket connections? List them with file paths"
gemini -p "@src/ @api/ Is proper error handling implemented for all API endpoints? Show examples of try-catch blocks"
gemini -p "@backend/ @middleware/ Is rate limiting implemented for the API? Show the implementation details"
gemini -p "@src/ @lib/ @services/ Is Redis caching implemented? List all cache-related functions and their usage"
gemini -p "@src/ @api/ Are SQL injection protections implemented? Show how user inputs are sanitized"
gemini -p "@src/payment/ @tests/ Is the payment processing module fully tested? List all test cases"
Use gemini -p when:
@ syntax are relative to your current working directory when invoking gemini--yolo flag for read-only analysis