C:\>DOS to AI

C:\blog> more geminimd.txt

What is GEMINI.md? The notes file Gemini CLI reads before every prompt

4 min readby Ian Willis

I’m Ian, tech-obsessed since I was eight. Let’s get you up to speed, fast.

This post is for the Gemini users, or Claude users who are branching out. Google’s Gemini CLI is a coding agent that runs in your terminal, the same way Claude Code does, and it has the same good idea: a small notes file it reads before it does anything, so you write your rules once. In Gemini CLI that file is called GEMINI.md, and here’s where it looks for it, what to put in it, and the one setting that lets it share a file with your other tools.

What it is

GEMINI.md is a plain Markdown file, Markdown being plain text with a few simple marks like # for a heading and - for a bullet point, of instructions for Gemini CLI: what the project is, how you like things done, what to watch out for. There’s no special format. Here’s a short one for a simple website project:

# Site notes
Static site, plain HTML and CSS.
- Short sentences, plain words.
- Ask before deleting anything.
- Say what changed when you're done.

Gemini CLI finds the file on its own and sends its contents along with every prompt you type, so you don’t have to mention it.

Where it looks

This is the part worth knowing, because Gemini CLI looks in more than one place and joins everything it finds.

  • Your home folder: ~/.gemini/GEMINI.md. This one applies to every project, so it’s the place for the rules that never change.
  • Your project folder, and the folders above it. Start Gemini CLI in a project and it loads the GEMINI.md there, plus any in the parent folders.
  • Subfolders, when needed. When Gemini CLI reads or edits a file in a subfolder, it also picks up any GEMINI.md it finds on the way, so a sub-project can have its own notes.

All of those are stitched together into one set of instructions. The footer of the Gemini CLI window tells you how many context files it has loaded, which is a quick way to confirm your file was found.

Seeing what it loaded

Two commands cover it. Type /memory show to see the full text Gemini CLI is working from, exactly as it was sent. Edit a file, then type /memory reload and it re-reads everything without restarting. If a rule isn’t being followed, /memory show is the first thing to check, because it tells you whether the rule made it in at all.

One more trick: a GEMINI.md can include other files. Put @./notes/style.md on a line by itself and the contents of that file are pulled in, which keeps the main file short.

Sharing one file with other tools

If you also use OpenAI Codex, Cursor, Copilot or Claude Code on the same project, you may already have an AGENTS.md, the shared instructions file most of those tools read. You don’t need to keep two copies. Open Gemini CLI’s settings.json and set the context file name to a list:

"context": {
  "fileName": ["AGENTS.md", "GEMINI.md"]
}

Now Gemini CLI reads your AGENTS.md as well as any GEMINI.md, and every tool on the project works from the same notes.

What to remember

  • GEMINI.md is notes for Gemini CLI, sent with every prompt.
  • It looks in your home folder, your project, and the folders above it, and joins them all.
  • /memory show tells you what it loaded; /memory reload after you edit.
  • One line in settings.json makes it read AGENTS.md too.

The short video for this one is on YouTube at @DOS_to_AI (coming soon).

Hope you found this helpful. You’ll find more free prompts and articles on dos2ai.com.

Written in October 2026. Gemini CLI changes fast, so always check the latest in the Gemini CLI docs.

Not affiliated with or endorsed by Anthropic or Google. I’m an independent user.

Want the next one by email? Sign up for free lessons.