This repository contains the configuration files for the Gemini CLI, a powerful command-line tool for AI-assisted software development. It provides a structured, configuration-driven workflow that enables developers to analyze, plan, and execute coding tasks with the help of AI, ensuring consistency and high-quality output.
- Structured Development Workflow: Implements a
think,plan, andactmethodology for systematic feature development. - Expert Git Workflow: Provides
/repo:savefor rapid, local-only atomic checkpoints and/repo:syncfor intelligently synchronizing with remote repositories using best practices. - Automated Documentation: Commands to generate and maintain key project documents like
README.md,GEMINI.md, and system design documents. - Configuration-Driven: Command behavior is defined in simple
.tomlfiles, making it easy to customize and extend.
- Primary Language: TOML (for command configuration)
- Execution Environment: Gemini CLI
This repository provides a powerful set of configurations to enhance your Gemini CLI. Follow these steps to set up your environment.
- You must have the Gemini CLI installed and initialized.
- You should have a
~/.gemini/directory in your home folder.
First, clone this repository to a location of your choice on your local machine.
git clone https://github.com/ksprashanth/gemini-cli-config.git
cd gemini-cli-configYou have two options for installing these configurations. You can either copy the files directly or use symbolic links to automatically sync any changes from this repository.
This method is straightforward and involves copying the files into your Gemini configuration directory.
-
Copy the Core
GEMINI.mdTemplate: This file provides a foundational set of instructions for the AI.cp GEMINI.cp ~/.gemini/GEMINI.md -
Copy the Command Palettes: You can copy all command palettes or pick and choose the ones you want.
- To copy all commands:
cp -r commands/* ~/.gemini/commands/
- To copy specific command palettes (e.g.,
repoandmode):mkdir -p ~/.gemini/commands cp -r commands/repo ~/.gemini/commands/ cp -r commands/mode ~/.gemini/commands/ cp -r commands/setup ~/.gemini/commands/
- To copy all commands:
-
Copy the Settings File: This file includes pre-configured MCP (Multi-Context Prompt) servers for GitHub and Context7.
Warning: This will overwrite your existing
settings.json. If you have existing settings, you should merge the files manually.cp settings.json ~/.gemini/
This method links the configuration files from this repository directly to your Gemini setup. Any time you run git pull to get the latest updates, your CLI is instantly updated.
Note: Make sure you are in the root of this cloned repository before running these commands.
-
Link the Core
GEMINI.mdTemplate: This links the base AI instructions file.# Remove the copied file if it exists rm -f ~/.gemini/GEMINI.md # Create the symbolic link ln -s "$(pwd)/GEMINI.cp" ~/.gemini/GEMINI.md
-
Link Your Desired Command Palettes: Instead of linking the entire
commandsfolder, you can link specific command palettes. This allows you to choose which sets of commands you want to use.# Create the commands directory if it doesn't exist mkdir -p ~/.gemini/commands # Example: Link the 'repo', 'mode', and 'setup' palettes ln -s "$(pwd)/commands/repo" ~/.gemini/commands/repo ln -s "$(pwd)/commands/mode" ~/.gemini/commands/mode ln -s "$(pwd)/commands/setup" ~/.gemini/commands/setup
-
A Note on
settings.json: We do not recommend symlinking thesettings.jsonfile, as it contains your personal preferences which you don't want to overwrite. Instead, you should manually merge themcpServersconfiguration from this repository'ssettings.jsoninto your own~/.gemini/settings.jsonfile.
To use the powerful GitHub integration (which enables the AI to interact with GitHub repositories), you need to create a Personal Access Token (PAT).
-
Create a GitHub PAT:
- Go to github.com/settings/tokens and click "Generate new token".
- Give it a descriptive name (e.g., "gemini-cli").
- Set an expiration date.
- Under "Repository access", select "All repositories" or choose the specific ones you want the AI to access.
- Grant the following permissions under "Repository permissions":
Contents: Read & WritePull Requests: Read & WriteIssues: Read & WriteMetadata: Read-Only (this is the default)
- Click "Generate token" and copy the token immediately.
-
Set the Environment Variable: The
settings.jsonfile is configured to read the token from an environment variable namedGITHUB_PERSONAL_ACCESS_TOKEN. You need to add this to your shell's startup file.-
For Zsh (macOS default):
echo 'export GITHUB_PERSONAL_ACCESS_TOKEN="YOUR_TOKEN_HERE"' >> ~/.zshrc source ~/.zshrc
-
For Bash:
echo 'export GITHUB_PERSONAL_ACCESS_TOKEN="YOUR_TOKEN_HERE"' >> ~/.bash_profile source ~/.bash_profile
Remember to replace
YOUR_TOKEN_HEREwith the actual token you copied from GitHub. -
You're all set! Restart the Gemini CLI. Once it has loaded, type the following command in the Gemini CLI prompt to see if the new commands are available:
/help
You should see the new commands like /repo:save, /repo:sync, and /mode:think listed in the output.
This project does not contain an automated test suite. The configurations are tested by executing the commands within the Gemini CLI.
Contributions are welcome! If you have ideas for new commands or improvements to existing ones, please follow this workflow:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature-name). - Make your changes and commit them with a descriptive message.
- Push to the branch (
git push origin feature/your-feature-name). - Open a Pull Request.
This project is licensed under the MIT License.