This guide explains how to configure your shell to automatically use a project-specific system prompt for the Gemini CLI (gemini).
This "set it and forget it" approach ensures your custom project instructions are applied automatically without needing to remember special aliases.
The solution uses a "smart" shell function that overrides the default gemini command. When you run gemini, this function searches up the directory tree for a conventional prompt file (.gemini/system.md).