Gemini CLI
Gemini CLI is Google's terminal coding-agent harness. This entry describes its context-file behavior, not behavior inherent to the underlying Gemini model.
Summary
Gemini CLI is Google's terminal coding-agent harness. This entry describes its context-file behavior, not behavior inherent to the underlying Gemini model.
Instruction files
GEMINI.md
Repository-level instruction files this harness reads. Treat their effective permissions as part of the setup.
Recommended
- Put durable project guidance in
GEMINI.mdand keep it concise, specific, and current. - Include real project commands, conventions, and validation expectations.
- Use Gemini CLI's memory inspection commands when debugging which context was loaded.
Avoid
- Attributing
GEMINI.mddiscovery or precedence to the underlying model. - Repeating conflicting instructions across global, project, and subdirectory context files.
Context & tool use
The default context filename is configurable. Gemini CLI loads context hierarchically and can combine global, project, ancestor, and subdirectory guidance.
Known limitations
Context discovery behavior can be changed by Gemini CLI settings. Confirm the configured context filename when a project does not use the default.
Evidence
official
- officialGemini CLI loads hierarchical instructional context from files named GEMINI.md by default.
Gemini CLI configuration — context files ↗ - officialGemini CLI can inspect, refresh, and reload its combined context through memory commands.
Gemini CLI configuration — context files ↗