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.

Example .geminiignore
.env
.env.*
*.pem
*.key
secrets/

Official Gemini CLI docs →

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-run

Everything runs locally. No file contents are uploaded.