How to permanently bind a local system prompt alias? #22298
-
|
I find myself repeating 'Act as a Senior Python Developer who prioritizes type hinting and docstrings' frequently. Is there an officially supported way in the current settings.json or .geminirc to bind a permanent alias so I don't have to rewrite this system prompt every time I initialize a session? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
To permanently set a local system prompt alias, you need to add it to your configuration file located at ~/.geminicli/config.toml or your project level .gemini/config.toml. Under the prompts block, you can map an arbitrary name to either an inline string or a path pointing to a markdown file containing the system instructions. This ensures that every time you initialize the CLI with that flag, the instructions are dynamically loaded into the context window. It makes structuring reusable workflows significantly faster since you only have to specify the alias name as an argument. |
Beta Was this translation helpful? Give feedback.
To permanently set a local system prompt alias, you need to add it to your configuration file located at ~/.geminicli/config.toml or your project level .gemini/config.toml.
Under the prompts block, you can map an arbitrary name to either an inline string or a path pointing to a markdown file containing the system instructions. This ensures that every time you initialize the CLI with that flag, the instructions are dynamically loaded into the context window.
It makes structuring reusable workflows significantly faster since you only have to specify the alias name as an argument.