Put lasting instructions in GEMINI.md
Gemini CLI uses GEMINI.md context files for project instructions, persona guidance, and coding style. Define instructions there once instead of repeating them in each prompt (Gemini CLI context files).
Use the global ~/.gemini/GEMINI.md for defaults across projects. Repository context files can hold shared project guidance (Gemini CLI context files, Gemini CLI memory).
Keep project and personal notes in the right place
Gemini CLI routes shared project instructions to repository GEMINI.md files, private project notes to a per-project private memory folder, and cross-project preferences to the global file (Gemini CLI memory).
Its memory guidance recommends concise durable instructions and avoiding duplicate facts across memory tiers (Gemini CLI memory).
Use hierarchical context for specific guidance
Gemini CLI searches configured workspace directories and parent directories for context files, concatenates the files it finds, and sends them with each prompt (Gemini CLI context files).
It can also scan for GEMINI.md when a tool accesses a file or directory, allowing component-specific instructions to load when relevant (Gemini CLI context files).
Check which instructions Gemini CLI loaded
Run /memory show to inspect the concatenated instructional context supplied to the model. The CLI footer also displays the number of loaded context files (Gemini CLI context files).
After changing context files, run /memory reload to make Gemini CLI rescan and reload them (Gemini CLI context files).
KnowMan for saved articles and links
KnowMan's local stdio MCP server has tools for searching saved items, reading one item, answering with citations, and saving a URL with an optional note.
KnowMan documents client configurations for Claude Desktop, Claude Code, and Cursor. A Gemini CLI configuration is not documented.
Where KnowMan fits
Use Gemini CLI context files for standing instructions. KnowMan keeps saved articles and links, reads and tags them, answers questions with citations, and keeps claims, decisions, and playbooks (KnowMan MCP guide, guide to giving your AI context).
KnowMan's MCP server runs locally over stdio and is documented for Claude Desktop, Claude Code, and Cursor.
Questions people ask
Where should I put instructions that apply to every Gemini CLI project?
Use the global ~/.gemini/GEMINI.md file for default instructions across projects. Repository GEMINI.md files hold shared project guidance (Gemini CLI context files, Gemini CLI memory).
How can I inspect Gemini CLI’s current instructions?
Run /memory show to display the concatenated context supplied to the model. The CLI footer also shows how many context files are loaded (Gemini CLI context files).
Can Gemini CLI search and read my saved KnowMan articles?
KnowMan provides local stdio MCP tools for searching saved items and reading one item. Its documented client configurations cover Claude Desktop, Claude Code, and Cursor, not Gemini CLI.
Can KnowMan save a link from Gemini CLI?
KnowMan's kb_save tool saves a URL to Inbox or Knowledge Base with an optional note. Gemini CLI use of that tool is not documented.