This repository is a collection of my personal extensions, custom commands, and settings for the Google Gemini CLI. If you are looking for a cheat sheet, see the cheatsheet here.
You can install these configurations globally for all projects or locally for a single project.
Global Installation:
git clone --depth 1 https://github.com/philschmid/gemini-cli-extension.git ~/.gemini-tmp && rsync -av ~/.gemini-tmp/.gemini/ ~/.gemini/ && rm -rf ~/.gemini-tmp
Project-Specific Installation:
git clone --depth 1 https://github.com/philschmid/gemini-cli-extension.git .gemini-tmp && rsync -av .gemini-tmp/.gemini/ ./.gemini/ && rm -rf .gemini-tmp
Note: Both methods may overwrite existing configuration files with the same name.
Custom commands allow you to create powerful, reusable prompts. They are defined in TOML files and stored in a commands
directory.
- Global commands:
~/.gemini/commands/
- Project-specific commands:
<project>/.gemini/commands/
Here is an example of a custom command definition in a .../commands/test/gen.toml
file:
# Invoked as: /test:gen "Create a test for the login button"
description = "Generates a unit test based on a description."
prompt = """
You are an expert test engineer. Based on the following requirement, please write a comprehensive unit test using the Jest testing framework.
Requirement: {{args}}
"""
See the custom commands guide for more details.
Extensions allow you to bundle tools, context, and configurations. Each extension is a directory with a gemini-extension.json
file.
- Global extensions:
~/.gemini/extensions/
- Project-specific extensions:
<workspace>/.gemini/extensions/
An extension is defined by a gemini-extension.json
file inside its own directory, for example <workspace>/.gemini/extensions/my-extension/gemini-extension.json
:
{
"name": "my-extension",
"version": "1.0.0",
"mcpServers": {
"my-server": {
"command": "node my-server.js"
}
},
"contextFileName": "GEMINI.md",
"excludeTools": ["run_shell_command"]
}
For more details, see the extensions guide.
You can customize the Gemini CLI's behavior by creating a settings.json
file.
- Project-level:
.gemini/settings.json
- User-level:
~/.gemini/settings.json
- System-level:
/etc/gemini-cli/settings.json
{
"theme": "GitHub",
"autoAccept": false,
"sandbox": "docker",
"checkpointing": {
"enabled": true
},
"fileFiltering": {
"respectGitIgnore": true
},
"usageStatisticsEnabled": true
}
All details are in the configuration guide.
Use GEMINI.md
files to provide instructions and context to the model for your projects. The CLI loads these files hierarchically.
- Global context:
~/.gemini/GEMINI.md
- Project/Ancestor context:
GEMINI.md
files from the current directory up to the root.
You can use imports to modularize your context: @./path/to/another.md
.
# Main Project Context: My Awesome App
## General Instructions
- All Python code must be PEP 8 compliant.
- Use 2-space indentation for all new files.
## Component-Specific Style Guides
@./src/frontend/react-style-guide.md
@./src/backend/fastapi-style-guide.md