From acbb83d6ea3c6711b00b1d05b5c929ce2c75abdb Mon Sep 17 00:00:00 2001 From: Averi Kitsch Date: Fri, 10 Oct 2025 16:09:28 -0700 Subject: [PATCH 1/3] chore: add developer instructions --- DEVELOPER.md | 112 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 DEVELOPER.md diff --git a/DEVELOPER.md b/DEVELOPER.md new file mode 100644 index 0000000..279a71c --- /dev/null +++ b/DEVELOPER.md @@ -0,0 +1,112 @@ +# DEVELOPER.md + +This document provides instructions for setting up your development environment +and contributing to the PostgreSQL Gemini CLI Extension project. + +## Prerequisites + +Before you begin, ensure you have the following: + +1. **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`. +2. **PostgreSQL Cluster & Instance:** For testing data plane tools, you will need access to an active PostgreSQL + for PostgreSQL instance. + +## Developing the Extension + +### Running from Local Source + +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. + +1. **Clone the Repository:** + + ```bash + git clone https://github.com/gemini-cli-extensions/alloydb.git + cd alloydb + ``` + +2. **Download the Toolbox Binary:** The required version of the `toolbox` binary + is specified in `toolbox_version.txt`. Download it for your platform. + + ```bash + # Read the required version + VERSION=$(cat toolbox_version.txt) + + # Example for macOS/amd64 + curl -L -o toolbox https://storage.googleapis.com/genai-toolbox/v$VERSION/darwin/amd64/toolbox + chmod +x toolbox + ``` + Adjust the URL for your operating system (`linux/amd64`, `darwin/arm64`, `windows/amd64`). + +3. **Install the Extension Locally:** Use the Gemini CLI to install the + extension from your local directory. + + ```bash + gemini extensions install . + gemini extensions link . + ``` + The CLI will prompt you to confirm the installation. Accept it to proceed. + +4. **Testing Changes:** After installation, start the Gemini CLI (`gemini`). + You can now interact with the `alloydb` tools to manually test your changes + against your connected database. + +## Testing + +### Automated Presubmit Checks + +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](https://github.com/googleapis/genai-toolbox). + +### Other GitHub Checks + +* **License Header Check:** A workflow ensures all necessary files contain the + proper license header. +* **Conventional Commits:** This repository uses + [Release Please](https://github.com/googleapis/release-please) to manage + releases. Your commit messages must adhere to the + [Conventional Commits](https://www.conventionalcommits.org/) specification. +* **Dependency Updates:** [Renovate](https://www.mend.io/free-developer-tools/renovate/) + is configured to automatically create pull requests for dependency updates. + +## Building the Extension + +The "build" process for this extension involves packaging the extension's +metadata files (`gemini-extension.json`, `ALLOYDB.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/workflows/package-and-upload-assets.yml) +GitHub Actions workflow when a new release is created. Manual building is not +required. + +## Maintainer Information + +### Team + +The primary maintainers for this repository are defined in the +[`.github/CODEOWNERS`](.github/CODEOWNERS) file: + +* `@gemini-cli-extensions/senseai-eco` +* `@gemini-cli-extensions/alloydb-maintainers` + +### Releasing + +The release process is automated using `release-please`. + +1. **Release PR:** When commits with conventional commit headers (e.g., `feat:`, + `fix:`) are merged into the `main` branch, `release-please` will + automatically create or update a "Release PR". +2. **Merge Release PR:** A maintainer approves and merges the Release PR. This + action triggers `release-please` to create a new GitHub tag and a + corresponding GitHub Release. +3. **Package and Upload:** The new release triggers the + `package-and-upload-assets.yml` workflow. This workflow builds the + platform-specific extension archives and uploads them as assets to the + GitHub Release. From 8a4524d4493f57190c734ab80f21892d9501186e Mon Sep 17 00:00:00 2001 From: Averi Kitsch Date: Fri, 10 Oct 2025 16:41:12 -0700 Subject: [PATCH 2/3] update --- DEVELOPER.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/DEVELOPER.md b/DEVELOPER.md index 279a71c..83a5f77 100644 --- a/DEVELOPER.md +++ b/DEVELOPER.md @@ -10,8 +10,7 @@ Before you begin, ensure you have the following: 1. **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`. -2. **PostgreSQL Cluster & Instance:** For testing data plane tools, you will need access to an active PostgreSQL - for PostgreSQL instance. +2. **PostgreSQL Instance:** For testing data plane tools, you will need access to an active PostgreSQL instance and database. ## Developing the Extension @@ -22,8 +21,8 @@ The core logic for this extension is handled by a pre-built `toolbox` binary. Th 1. **Clone the Repository:** ```bash - git clone https://github.com/gemini-cli-extensions/alloydb.git - cd alloydb + git clone https://github.com/gemini-cli-extensions/postgres.git + cd postgres ``` 2. **Download the Toolbox Binary:** The required version of the `toolbox` binary @@ -49,7 +48,7 @@ The core logic for this extension is handled by a pre-built `toolbox` binary. Th The CLI will prompt you to confirm the installation. Accept it to proceed. 4. **Testing Changes:** After installation, start the Gemini CLI (`gemini`). - You can now interact with the `alloydb` tools to manually test your changes + You can now interact with the `postgres` tools to manually test your changes against your connected database. ## Testing @@ -78,7 +77,7 @@ are currently tested in the [MCP Toolbox GitHub](https://github.com/googleapis/g ## Building the Extension The "build" process for this extension involves packaging the extension's -metadata files (`gemini-extension.json`, `ALLOYDB.md`, `LICENSE`) along with the +metadata files (`gemini-extension.json`, `postgres.md`, `LICENSE`) along with the pre-built `toolbox` binary into platform-specific archives (`.tar.gz` or `.zip`). This process is handled automatically by the @@ -94,7 +93,7 @@ The primary maintainers for this repository are defined in the [`.github/CODEOWNERS`](.github/CODEOWNERS) file: * `@gemini-cli-extensions/senseai-eco` -* `@gemini-cli-extensions/alloydb-maintainers` +* `@gemini-cli-extensions/postgres-maintainers` ### Releasing From ab3d3ea4f9fd33f208b44b5c7b87afdd7e3d8ffe Mon Sep 17 00:00:00 2001 From: Averi Kitsch Date: Fri, 10 Oct 2025 16:49:27 -0700 Subject: [PATCH 3/3] update lint --- DEVELOPER.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEVELOPER.md b/DEVELOPER.md index 83a5f77..52ae1f0 100644 --- a/DEVELOPER.md +++ b/DEVELOPER.md @@ -71,7 +71,7 @@ are currently tested in the [MCP Toolbox GitHub](https://github.com/googleapis/g [Release Please](https://github.com/googleapis/release-please) to manage releases. Your commit messages must adhere to the [Conventional Commits](https://www.conventionalcommits.org/) specification. -* **Dependency Updates:** [Renovate](https://www.mend.io/free-developer-tools/renovate/) +* **Dependency Updates:** [Renovate](https://github.com/apps/forking-renovate) is configured to automatically create pull requests for dependency updates. ## Building the Extension