What is GEMINI.md?
GEMINI.md is the context file Gemini CLI loads at the start of every session: how to run, test and style your project. This GEMINI.md generator writes one from a few choices, so Gemini CLI follows your stack and design from the first prompt in the terminal.
How to use the GEMINI.md generator
Pick your stack
Choose your framework, styling, language, package manager and test tool above.
Copy the file
Copy the generated GEMINI.md and save it at the root of your project.
Start Gemini CLI
Run gemini in the project. It loads GEMINI.md automatically.
Confirm it loaded
Run /memory show to see the context Gemini is using.
How GEMINI.md files are loaded
Gemini CLI reads GEMINI.md files in layers: a global one in ~/.gemini/GEMINI.md, one in the project root and its parent folders, and more in subfolders. It combines them into the context for the session.
After you edit GEMINI.md during a session, run /memory refresh to reload it. To share rules with other agents, you can set Gemini CLI to read AGENTS.md instead, using the contextFileName setting.
GEMINI.md generator vs /init
Running /init in Gemini CLI drafts a GEMINI.md from your existing code. It describes what is already there. This generator writes the rules you want Gemini to follow, which is better for new projects and for UI work where you want one consistent design. You can combine both: run /init, then add the design and working rules from here.
Keep the generated file short and add to it when Gemini repeats a mistake. One new line in GEMINI.md, such as a folder it must not touch or a component it must reuse, fixes the behaviour for every future session in the project.
What makes a good GEMINI.md
Commands first
Gemini runs shell commands; list the exact dev, build and test commands.
A design source
Point at one design file so every page matches.
Short rules
Everything in GEMINI.md uses context in every session.
Layered files
Keep personal rules global and project rules in the project.
Common mistakes
Forgetting to refresh
Edits are not picked up mid-session until you run /memory refresh.
Duplicating rules
If you use AGENTS.md too, point Gemini at it instead of copying.
Describing instead of instructing
Write rules Gemini can follow, not background reading.
Design templates for Gemini CLI
The generated file points Gemini CLI at design/template.html. Save one of these templates there and every page it builds follows the same design.
Frequently asked questions
Where does GEMINI.md go?
At the root of your project. Gemini CLI also reads ~/.gemini/GEMINI.md and GEMINI.md files in subfolders.
Is this GEMINI.md generator free?
Yes. The generated file is free to copy. The full design rules template on the Gemini CLI templates page comes with a BrowserMoon licence.
How do I check what Gemini CLI loaded?
Run /memory show inside Gemini CLI to see the combined context from all GEMINI.md files.
Can Gemini CLI use AGENTS.md instead?
Yes. Set contextFileName in your Gemini CLI settings to AGENTS.md to share one file with other agents.
How long should GEMINI.md be?
Short, usually under 100 lines of rules Gemini can act on.
Does GEMINI.md work in Gemini Code Assist?
Gemini Code Assist agent mode in VS Code is built on Gemini CLI and uses GEMINI.md context files too.
More free generators
Related