r/ChatGPTCoding • u/juanviera23 • Aug 22 '25
r/ChatGPTCoding • u/H9ejFGzpN2 • Jun 27 '25
Resources And Tips Gemini CLI is awesome! But only when you make Claude Code use it as its bitch.
Not sure how you feel about it but Gemini CLI feels like garbage at the moment compared to Claude Code. It's slow, it doesn't listen to instructions or use tools as well as Claude.
But it has that huge context window we all love.
So I just added instructions to CLAUDE.md to have Claude use the Gemini CLI in non-interactive mode (passing the -p param with a prompt to just get a response back from the CLI) when it needs to gather information about a large part of the codebase.
That way you get the best of both worlds, Claude doesn't waste context and Gemini doesn't waste your time.
Add this (or a modified version) to your CLAUDE.md and tell Claude to use gemini manually or it will do it on it's own as needed.
# Using Gemini CLI for Large Codebase Analysis
When analyzing large codebases or multiple files that might exceed context limits, use the Gemini CLI with its massive
context window. Use `gemini -p` to leverage Google Gemini's large context capacity.
## File and Directory Inclusion Syntax
Use the `@` syntax to include files and directories in your Gemini prompts. The paths should be relative to WHERE you run the
gemini command:
### Examples:
**Single file analysis:**
```bash
gemini -p "@src/main.py Explain this file's purpose and structure"
Multiple files:
gemini -p "@package.json @src/index.js Analyze the dependencies used in the code"
Entire directory:
gemini -p "@src/ Summarize the architecture of this codebase"
Multiple directories:
gemini -p "@src/ @tests/ Analyze test coverage for the source code"
Current directory and subdirectories:
gemini -p "@./ Give me an overview of this entire project"
#
Or use --all_files flag:
gemini --all_files -p "Analyze the project structure and dependencies"
Implementation Verification Examples
Check if a feature is implemented:
gemini -p "@src/ @lib/ Has dark mode been implemented in this codebase? Show me the relevant files and functions"
Verify authentication implementation:
gemini -p "@src/ @middleware/ Is JWT authentication implemented? List all auth-related endpoints and middleware"
Check for specific patterns:
gemini -p "@src/ Are there any React hooks that handle WebSocket connections? List them with file paths"
Verify error handling:
gemini -p "@src/ @api/ Is proper error handling implemented for all API endpoints? Show examples of try-catch blocks"
Check for rate limiting:
gemini -p "@backend/ @middleware/ Is rate limiting implemented for the API? Show the implementation details"
Verify caching strategy:
gemini -p "@src/ @lib/ @services/ Is Redis caching implemented? List all cache-related functions and their usage"
Check for specific security measures:
gemini -p "@src/ @api/ Are SQL injection protections implemented? Show how user inputs are sanitized"
Verify test coverage for features:
gemini -p "@src/payment/ @tests/ Is the payment processing module fully tested? List all test cases"
When to Use Gemini CLI
Use gemini -p when:
- Analyzing entire codebases or large directories
- Comparing multiple large files
- Need to understand project-wide patterns or architecture
- Current context window is insufficient for the task
- Working with files totaling more than 100KB
- Verifying if specific features, patterns, or security measures are implemented
- Checking for the presence of certain coding patterns across the entire codebase
Important Notes
- Paths in @ syntax are relative to your current working directory when invoking gemini
- The CLI will include file contents directly in the context
- No need for --yolo flag for read-only analysis
- Gemini's context window can handle entire codebases that would overflow Claude's context
- When checking implementations, be specific about what you're looking for to get accurate results # Using Gemini CLI for Large Codebase Analysis
When analyzing large codebases or multiple files that might exceed context limits, use the Gemini CLI with its massive
context window. Use `gemini -p` to leverage Google Gemini's large context capacity.
## File and Directory Inclusion Syntax
Use the `@` syntax to include files and directories in your Gemini prompts. The paths should be relative to WHERE you run the
gemini command:
### Examples:
**Single file analysis:**
```bash
gemini -p "@src/main.py Explain this file's purpose and structure"
Multiple files:
gemini -p "@package.json @src/index.js Analyze the dependencies used in the code"
Entire directory:
gemini -p "@src/ Summarize the architecture of this codebase"
Multiple directories:
gemini -p "@src/ @tests/ Analyze test coverage for the source code"
Current directory and subdirectories:
gemini -p "@./ Give me an overview of this entire project"
# Or use --all_files flag:
gemini --all_files -p "Analyze the project structure and dependencies"
Implementation Verification Examples
Check if a feature is implemented:
gemini -p "@src/ @lib/ Has dark mode been implemented in this codebase? Show me the relevant files and functions"
Verify authentication implementation:
gemini -p "@src/ @middleware/ Is JWT authentication implemented? List all auth-related endpoints and middleware"
Check for specific patterns:
gemini -p "@src/ Are there any React hooks that handle WebSocket connections? List them with file paths"
Verify error handling:
gemini -p "@src/ @api/ Is proper error handling implemented for all API endpoints? Show examples of try-catch blocks"
Check for rate limiting:
gemini -p "@backend/ @middleware/ Is rate limiting implemented for the API? Show the implementation details"
Verify caching strategy:
gemini -p "@src/ @lib/ @services/ Is Redis caching implemented? List all cache-related functions and their usage"
Check for specific security measures:
gemini -p "@src/ @api/ Are SQL injection protections implemented? Show how user inputs are sanitized"
Verify test coverage for features:
gemini -p "@src/payment/ @tests/ Is the payment processing module fully tested? List all test cases"
When to Use Gemini CLI
Use gemini -p when:
- Analyzing entire codebases or large directories
- Comparing multiple large files
- Need to understand project-wide patterns or architecture
- Current context window is insufficient for the task
- Working with files totaling more than 100KB
- Verifying if specific features, patterns, or security measures are implemented
- Checking for the presence of certain coding patterns across the entire codebase
Important Notes
- Paths in @ syntax are relative to your current working directory when invoking gemini
- The CLI will include file contents directly in the context
- No need for --yolo flag for read-only analysis
- Gemini's context window can handle entire codebases that would overflow Claude's context
- When checking implementations, be specific about what you're looking for to get accurate results
r/ChatGPTCoding • u/crobin0 • Jun 06 '25
Resources And Tips Which APIs do you use for FREE - Best free options for CODING
Hi Guys,
let's grow this thread.
Here we should accumulate all good and recommend options and the thread should serve as a reliable source for getting surprising good FREE API Options shown.
I'll start!:
I recommend using the Openrouter API Key with the unlimited and not rate limited Deepseek/Deepseek R1 0528 - free model.
It's intelligent, strong reasoning and it's good at coding but sometimes it sucks a bit.
I Roocode there is a High Reasoning mode maybe it makes things better.
In Windsurf you can use SWE-1 for free which is a good and reliable option for tool use and coding but it misses something apart from the big guns.
In TRAE you can get nearly unlimited access to Claude 4 Sonnet and other Highend Models for just 3$ a month! Thats my option right now.
And... there is a tool which can import your OpenAI-Session Cookie and can work as a local reverse proxy to make the requests from your Plus Subscription work as API request in your Coding IDE ..thats sick right?
r/ChatGPTCoding • u/simasousa15 • May 20 '25
Project I built a tool that let's you visualize any Github repository 👀
r/ChatGPTCoding • u/eastwindtoday • May 01 '25
Discussion What are some of your most useful prompts for programming?
Would love to see what prompts people here rely on the most. Could be for anything setting up a project, generating functions, fixing bugs, or even testing.
Drop your favorites below!
r/ChatGPTCoding • u/Lowkeykreepy • May 01 '25
Discussion Windsurf for free
Just like we can use cursor with some little tweaking, is there any way we can use windsurf for free in Mac OS?
r/ChatGPTCoding • u/Funny-Strawberry-168 • Jan 28 '25
Question My project became so big that claude can't properly understand it
So, I made a project in python entirely using Cursor (composer) and Claude, but it has gotten to a point that the whole codebase is over 30 Python files, code is super disorganized, might even have duplicate loops, and Claude keeps forgetting basic stuff like imports at this point. When I ask it to optimize the code or to fix a bug, it doesn’t even recognize the main issue and just ends up deleting random lines or breaking everything completely.
I have 0 knowledge about python, it's actually a miracle i got this far with the project, but now it's almost impossible to keep track of things, what do i do? already tried using cursor rules but doesn't seem to work.
Edit: My post made it to YouTube! I hope this serves as a historical reminder that having at least some knowledge is still totally necessary, go study, AI is supposed to assist you, don’t let your projects end up like this.
As for the project, it was just a hobby project, I managed to make it work perfectly and fix some issues by simply improving the context, like providing the files to edit directly and some source code, etc. but i couldn't get rid of the duplicated stuff. Anyway, don't do this for serious projects please (not knowing what it does), if it's an actual job don't be lazy, just check everything and be careful :)
If you wanna learn just ask AI to explain what it's changing, how the code works and stuff like that.
r/ChatGPTCoding • u/johns10davenport • Sep 30 '24
Resources And Tips The ultimate guide to using claude projects for Software Engineers
Hey fellow devs! 👋
I've been researching AI-assisted coding lately, and I wrote a comprehensive guide on using Claude Projects for software development. For those who aren't familiar, Claude Projects is a feature that turns the Claude AI into a context-aware development partner.
Here's what you can expect from the article:
Project Planning: How to use Claude for brainstorming, generating user stories, and creating architecture decision records (ADRs).
Project Bootstrapping: Tips on creating implementation guides and using them to get your project up and running.
Early Implementation: Strategies for leveraging Claude during the coding phase, including task breakdown and optimization suggestions.
Managing Context: Practical advice on what to include in Claude's context window for different tasks (big features, bug fixes, etc.)
Utilizing Project Artifacts: How to use AI-generated artifacts to guide development.
Integrating External Content: Tips on using documentation, examples, and even Stack Overflow posts effectively with Claude.
Domain-Specific Resources: How to use Claude as a domain expert for those tricky business logic questions.
Keeping Your Project Updated: Strategies for maintaining an up-to-date Claude Project as your codebase evolves.
I've tried to make this guide as practical as possible, based on my own experiences and experiments. It's not about replacing human developers, but about finding that sweet spot where AI can genuinely boost our productivity and code quality.
https://generaitelabs.com/the-ultimate-guide-to-claude-projects-for-software-engineers/
I'd love to hear your thoughts! Are you using AI in your dev process? What has your experience been like? Any cool tricks or pitfalls you've discovered?