MyNixOS website logo

Global context(s) for gemini-cli.

The attribute name becomes the filename, with a .md extension added automatically. Each value is either:

  • Inline content as a string
  • A path to a file containing the content

The configured files are written to ~/.gemini/.

Note: You can customize which context file names gemini-cli looks for by setting settings.context.fileName. For example:

settings = {
  context.fileName = ["AGENTS.md", "CONTEXT.md", "GEMINI.md"];
};
Declarations
Type
attribute set of (strings concatenated with "\n" or absolute path)
Default
{ }
Example
{
  GEMINI = ''
    # Global Context

    You are a helpful AI assistant for software development.

    ## Coding Standards

    - Follow consistent code style
    - Write clear comments
    - Test your changes
  '';

  AGENTS = ./path/to/agents.md;

  CONTEXT = ''
    Additional context instructions here.
  '';
}