

This is a really trivial but useful example of how you can use Gemini CLI to execute development workflows for you.
I’m using Gemini CLI — and Google Code Assist in Agent Mode — on three different devices at home. Since I’m often tweaking my global Gemini CLI configuration and then having to replicate that configuration to the other machines, I figured it was time to create a private GitHub repo to manage my configuration.
Admittedly, this is a trivial task. But I wanted to demonstrate how useful Gemini CLI is at doing this sort of thing.
Let’s get to it!
I’ve created a git repo from my ~/.gemini
folder. This folder contains a bunch of stuff that I want to track, as well as stuff I don’t want to track.
(tree -L 2 --dirsFirst -a -F)
.gemini/
├── commands/
│ └── plan.toml
├── history/
│ └── stuff-i-dont-care-about
├── tmp/
│ └── stuff-i-dont-care-about
|
├── .env
├── .gitattributes
├── GEMINI.md
├── google_accounts.json
├── installation_id
├── oauth_creds.json
└── settings.json
My Gemini Context
My GEMINI.md
provides the global context that I want Gemini CLI to follow:
# Project: Dazbo's Global Gemini Configuration
---This configuration should apply to all Gemini CLI invocations, unless any particular rules are overridden by a more local rule.
---
## General Instructions:
- You are speaking to Dazbo, so feel free to occasionally use the name.
- My GitHub handle is derailed-dash.
- When running Python tools, prefer to use uvx where possible.
- When installing Python dependencies, prefer uv and ensure you are installing to a virtual environment.
- If a new dependency is required, please state the reason.
## Mandatory Tooling
To ensure Python code adheres to required standards, the following commands **must** be run before creating or modifying any `.py` files. These commands will automatically fix many common issues and flag any that require manual intervention. The commands must be run from the root of the project:
1. **Check and fix linting issues:**
```bash
uvx ruff@latest check --fix .
```
2. **Format the code:**
```bash
uvx ruff@latest format .
```
My Settings
The settings.json
is my Gemini configuration:
{
"theme": "GitHub",
"selectedAuthType": "oauth-personal",
"checkpointing": {"enabled": true},
"mcpServers": {
// --- Using remote GitHub MCP server ---
"github": {
"httpUrl": "https://api.githubcopilot.com/mcp/",
"headers": {
"Authorization": "${GITHUB_GEMINI_CLI_PAT}"
},
"timeout": 5000
},
"veo": {
"command": "mcp-veo-go",
"env": {
"MCP_REQUEST_MAX_TOTAL_TIMEOUT": "240000",
"MCP_SERVER_REQUEST_TIMEOUT": "30000",
"GENMEDIA_BUCKET": "${GOOGLE_STORAGE_BUCKET}",
"PROJECT_ID": "${GOOGLE_CLOUD_PROJECT}",
"LOCATION": "${GOOGLE_CLOUD_REGION}"
}
},
"imagen": {
"command": "mcp-imagen-go",
"env": {
"MCP_SERVER_REQUEST_TIMEOUT": "55000",
"GENMEDIA_BUCKET": "${GOOGLE_STORAGE_BUCKET}",
"PROJECT_ID": "${GOOGLE_CLOUD_PROJECT}",
"LOCATION": "${GOOGLE_CLOUD_REGION}"
}
},
"chirp3-hd": {
"command": "mcp-chirp3-go",
"env": {
"MCP_SERVER_REQUEST_TIMEOUT": "55000",
"GENMEDIA_BUCKET": "${GOOGLE_STORAGE_BUCKET}",
"PROJECT_ID": "${GOOGLE_CLOUD_PROJECT}",
"LOCATION": "${GOOGLE_CLOUD_REGION}"
}
},
"lyria": {
"command": "mcp-lyria-go",
"env": {
"MCP_SERVER_REQUEST_TIMEOUT": "55000",
"GENMEDIA_BUCKET": "${GOOGLE_STORAGE_BUCKET}",
"PROJECT_ID": "${GOOGLE_CLOUD_PROJECT}",
"LOCATION": "${GOOGLE_CLOUD_REGION}"
}
},
"avtool": {
"command": "mcp-avtool-go",
"env": {
"MCP_SERVER_REQUEST_TIMEOUT": "55000",
"PROJECT_ID": "${GOOGLE_CLOUD_PROJECT}",
"GENMEDIA_BUCKET": "${GOOGLE_STORAGE_BUCKET}",
"LOCATION": "${GOOGLE_CLOUD_REGION}"
}
},
"gas_web_apps": {
"command": "npx",
"args": [
"-y",
"mcp-remote", // Run npm install -g mcp-remote
"https://script.google.com/macros/s/AKfycbyey_zJ66yIv191UmJSeikrkZhwmU3COzTq3h7rXQG3NZZkULiKV8EcnTtZQWs2bZ89/exec?accessKey=${DAZBO_APPS_SCRIPTS_ACCESS_KEY}"
],
"env": {}
}
},
"excludeMCPServers": ["lyria", "gas_web_apps"] // list of MCP servers to exclude
}
In this file I’ve enabled checkpointing and added a bunch of MCP servers in order to interact with GitHub, AVtool (e.g. to facilitate interaction with ffmpeg
), and Google media generation (e.g. Imagen, Veo, etc). I’ve also disabled a couple of MCP servers, just for faster startup. I’ll enable them when I need them.
Custom Slash Commands
I’ve added a single custom command: /plan
. I got this idea from ’s article here.
I’ve been using Gemini CLI from the terminal a lot lately. But for this demo I’ll be using Gemini Code Assist in Agent Mode. It is powered by Gemini CLI and leverages your Gemini CLI configuration and tools, if you’ve configured them. I’m using the Gemini Code Assist extension in Visual Studio Code.
Create a .gitignore
First task: I want to create a .gitignore
.
Please create a .gitignore file for me. In my repo I only want to track GEMINI.md, settings.json and the commands directory.
I didn’t love the first result. It was set to ignore everything by default, and then explicitly added some things to include. To be fair, it *is* what I asked for. But I’d rather not do it this way.
Please change the .gitignore so that it doesn’t start with the “ignore everything”. Just explicitly ignore the things we don’t want to track.
The resulting .gitignore
is what I wanted:
# Ignore directories
/history/
/tmp/# Ignore files
google_accounts.json
installation_id
oauth_creds.json
Create a README
Every repo needs a README.md
, obviously!
Please create a readme
And so it does:
I then added some additional info to this starter-for-10 README.md
.
Create the GitHub Repo
I want to push this git repo as a new private GitHub repo called “Dazbo-Gemini-Config”. Please plan how you will do this, and then we will execute.
This looks pretty good. The agent has determined it should use the GitHub MCP tool to the work.
But hang on… I’ve already checked in those two files.
Yes, but I think I’ve already committed those two files
The agent checks:
And it concludes:
So now we can execute the plan:
Ooh, an error.
It turns out that it’s tried to push to a remote branch called main
but my local branch is called master
. It offers to push master
instead, but I’d rather rename the local to main
.
Actually, can we rename the local branch to main?
And it’s done! The new private repo has been created in GitHub!
Okay, my Gemini CLI configuration is now safely stored in GitHub. But what if I want to now apply this configuration on another machine where I already have Gemini CLI installed? I.e. where I already have a ~/.gemini
folder?
I’m on such a machine now. So let’s ask Gemini CLI!
Source Credit: https://medium.com/google-cloud/using-gemini-cli-to-create-a-gemini-cli-config-repo-519399e25d9a?source=rss—-e52cf94d98af—4