This document provides instructions for setting up your development environment and contributing to the Cloud SQL for SQL Server Observability Gemini CLI Extension project.
Before you begin, ensure you have the following:
- Gemini CLI: Install the Gemini CLI version v0.6.0 or above. Installation
instructions can be found on the official Gemini CLI documentation. You can
verify your version by running
gemini --version. - Cloud SQL for SQL Server Instance: For testing data plane tools, you will need access to an active Cloud SQL for SQL Server instance.
The core logic for this extension is handled by a pre-built toolbox binary. The development process involves installing the extension locally into the Gemini CLI to test changes.
-
Clone the Repository:
git clone https://github.com/gemini-cli-extensions/cloud-sql-sqlserver-observability.git cd cloud-sql-sqlserver-observability -
Download the Toolbox Binary: The required version of the
toolboxbinary is specified intoolbox_version.txt. Download it for your platform.# Read the required version VERSION=$(cat toolbox_version.txt) # Example for macOS/amd64 curl -L -o toolbox https://storage.googleapis.com/genai-toolbox/geminicli/v$VERSION/darwin/amd64/toolbox chmod +x toolbox
Adjust the URL for your operating system (
linux/amd64,darwin/arm64,windows/amd64). -
Link the Extension Locally: Use the Gemini CLI to install the extension from your local directory.
gemini extensions link .The CLI will prompt you to confirm the linking. Accept it to proceed.
-
Testing Changes: After linking, start the Gemini CLI (
gemini). You can now interact with thecloud-sql-sqlserver-observabilitytools to manually test your changes against your connected database.
A GitHub Actions workflow (.github/workflows/presubmit-tests.yml) is triggered
for every pull request. This workflow primarily verifies that the extension can
be successfully installed by the Gemini CLI.
Currently, there are no automated unit or integration test suites within this repository. All functional testing must be performed manually. All tools are currently tested in the MCP Toolbox GitHub.
- License Header Check: A workflow ensures all necessary files contain the proper license header.
- Conventional Commits: This repository uses Release Please to manage releases. Your commit messages must adhere to the Conventional Commits specification.
- Dependency Updates: Renovate is configured to automatically create pull requests for dependency updates.
The "build" process for this extension involves packaging the extension's
metadata files (gemini-extension.json, cloud-sql-sqlserver-observability.md, LICENSE) along with the
pre-built toolbox binary into platform-specific archives (.tar.gz or .zip).
This process is handled automatically by the
package-and-upload-assets.yml
GitHub Actions workflow when a new release is created. Manual building is not
required.
The primary maintainers for this repository are defined in the
.github/CODEOWNERS file:
@gemini-cli-extensions/senseai-eco@gemini-cli-extensions/cloud-sql-sqlserver-maintainers
The release process is automated using release-please. It consists of an automated changelog preparation step followed by the manual merging of a Release PR.
Before a Release PR is even created, a special workflow automatically mirrors
relevant changelogs from the core googleapis/genai-toolbox dependency. This
ensures that the release notes for this extension accurately reflect important
upstream changes.
The process is handled by the mirror-changelog.yml workflow:
- Trigger: The workflow runs automatically on pull requests created by
Renovate for
toolboxversion updates. - Parsing: It reads the detailed release notes that Renovate includes in the PR body.
- Filtering: These release notes are filtered to include only changes
relevant to this extension. The relevance is determined by a keyword (e.g.,
mssql), passed as an environment variable in the workflow file. - Changelog Injection: The script formats the filtered entries as
conventional commits and injects them into the PR body within a
BEGIN_COMMIT_OVERRIDEblock. - Release Please: When the main Release PR is created,
release-pleasereads this override block instead of the standardchore(deps): ...commit message, effectively mirroring the filtered upstream changelog into this project's release notes.
Note for Maintainers: The filtering script is an automation aid, but it may occasionally produce "false positives" (e.g., an internal logging change that happens to contain the keyword). Before merging a
toolboxdependency PR, maintainers must review the generatedBEGIN_COMMIT_OVERRIDEblock and manually delete any lines that are not relevant to the end-users of this extension. The curated override block is the final source of truth for the release changelog.
- Release PR: When commits with conventional commit headers (e.g.,
feat:,fix:) are merged into themainbranch,release-pleasewill automatically create or update a "Release PR". - Merge Release PR: A maintainer approves and merges the Release PR. This
action triggers
release-pleaseto create a new GitHub tag and a corresponding GitHub Release. - Package and Upload: The new release triggers the
package-and-upload-assets.ymlworkflow. This workflow builds the platform-specific extension archives and uploads them as assets to the GitHub Release.