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.md and 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.md discovery 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

Sources