.geminiignore
.geminiignore tells the Gemini CLI which files to exclude from the context it reads about your project.
This week: 0% of 499 scanned repos had .geminiignore.See Radar #4 →
What it is
.geminiignore is a gitignore-style file used by Google’s Gemini CLI to skip matching files when building context for the model.
Why use it
It keeps secrets and noise out of Gemini’s view of your codebase, applied specifically to the AI tool rather than to git.
How to set it up
Create .geminiignore in your project root and add one glob pattern per line for files Gemini should not read.
.env
.env.*
*.pem
*.key
secrets/What to exclude
Common sensitive categories worth adding to .geminiignore:
FAQ
- Is .geminiignore related to .aiexclude?
- They serve a similar purpose for Google’s AI tools. .aiexclude is used by Gemini in IDEs such as Android Studio and Firebase, while .geminiignore is used by the Gemini CLI.
Check your own project
158 of 499 repos this week exposed sensitive paths to AI tools. Check yours in seconds:
Run the same local check with Offsend CLI:
brew install --cask offsend/tap/offsend-cli
offsend show
offsend prepare --dry-runEverything runs locally. No file contents are uploaded.