Regeln & Anweisungen Offiziell

GEMINI.md

Context files named GEMINI.md that give Gemini CLI project instructions, personas and style guides on every prompt.

Autor
Google
Funktioniert mit
Gemini CLI
Lizenz
Apache-2.0
Dokumentiert
Oct 2, 2026

Was GEMINI.md ist

GEMINI.md context files provide instructional context to the Gemini model so you do not repeat instructions in each prompt. Gemini CLI loads global, workspace and just-in-time files, concatenates them and sends them with every prompt.

Was es kann

Wie sich GEMINI.md einbinden lässt: welche Agenten es ausführen und was es ergänztLÄUFT INIhr AgentGemini CLIein Host dokumentiertRULES · OFFIZIELLGEMINI.mdProjektanweisungen, die der Agent…5 Installationsschrittekeine zusätzlichen Berechtigungen…Lizenz: Apache-2.0WAS ES ERGÄNZTWas es kannLoads global context from ~/.gemi…Searches workspace directories an…Loads just-in-time GEMINI.md file…Imports other files with @file.md…Agent → Erweiterung → neue Fähigkeit · aus dem offiziellen Repository oder der Dokumentation
Wo GEMINI.md läuft und was es ergänzt, laut Dokumentation
  • Loads global context from ~/.gemini/GEMINI.md
  • Searches workspace directories and parents for GEMINI.md
  • Loads just-in-time GEMINI.md files when a tool accesses a directory
  • Imports other files with @file.md syntax
  • /memory show and /memory reload inspect and refresh loaded context
  • File name configurable via context.fileName in settings.json

Wann Sie es einsetzen sollten

Gut geeignet

  • You want project coding style and instructions applied to every Gemini CLI prompt
  • You want component-specific instructions loaded only when relevant
  • You want one set of shared instructions via a custom file name such as AGENTS.md

Nicht geeignet für

  • Saving individual facts on demand: the docs point to the Memory tool

So installieren Sie GEMINI.md

Sie benötigen: Gemini CLI

  1. Create GEMINI.md at the project root (or ~/.gemini/GEMINI.md for global)
  2. Add general instructions and coding style as markdown
  3. Optionally import files with @./components/instructions.md
  4. Run /memory show to inspect the loaded context
  5. Optionally set context.fileName in settings.json
Konfigurationsbeispiel (aus der offiziellen Dokumentation)
{
  "context": {
    "fileName": ["AGENTS.md", "CONTEXT.md", "GEMINI.md"]
  }
}

Einschränkungen

  • All found files are concatenated and sent with every prompt, so size affects context

Tools, die es erweitert

Häufig gestellte Fragen

Where does Gemini CLI look for GEMINI.md?

~/.gemini/GEMINI.md, workspace directories and their parents, and just-in-time in directories tools access. Quelle

Can GEMINI.md import other files?

Yes, with @file.md syntax using relative or absolute paths. Quelle

Can Gemini CLI use AGENTS.md instead of GEMINI.md?

Yes, set context.fileName in settings.json to a list such as AGENTS.md, CONTEXT.md, GEMINI.md. Quelle

How do I see what GEMINI.md context is loaded?

Run /memory show; /memory reload re-scans the files. Quelle

Quellen und Lücken

Weitere Erweiterungen zum Ansehen