Skip to content

Add 'getting started' extensions documentation#9536

Merged
chrstnb merged 4 commits into
mainfrom
cb/fixgettinstarted
Sep 26, 2025
Merged

Add 'getting started' extensions documentation#9536
chrstnb merged 4 commits into
mainfrom
cb/fixgettinstarted

Conversation

@chrstnb

@chrstnb chrstnb commented Sep 25, 2025

Copy link
Copy Markdown
Contributor

TLDR

Also updated the MCP server example because it was kind of borked. I'd like to add readmes to each of those directories... that can come later :)

Dive Deeper

Reviewer Test Plan

Testing Matrix

🍏 🪟 🐧
npm run
npx
Docker
Podman - -
Seatbelt - -

Linked issues / bugs

@chrstnb chrstnb requested a review from a team as a code owner September 25, 2025 02:40
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @chrstnb, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces essential documentation to guide users through the process of developing Gemini CLI extensions, making it easier to get started with custom functionalities. Concurrently, it addresses and rectifies issues within the existing mcp-server example, ensuring its operational integrity and buildability. The changes also include an enhancement to the extension creation utility to guarantee accurate copying of template files, thereby streamlining the initial setup experience for developers.

Highlights

  • New Documentation for Extensions: A comprehensive 'Getting Started with Gemini CLI Extensions' guide has been added, detailing how to create, configure, and use extensions, including custom tools, commands, and context files.
  • Updated MCP Server Example: The mcp-server example has been updated to be functional and buildable, including new package.json and tsconfig.json files, and modifications to gemini-extension.json to reflect a build step and correct execution path.
  • Improved Extension Template Copying: The gemini extensions new command's logic for copying example templates has been refined to ensure all files and subdirectories are correctly transferred to the new extension directory.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a 'getting started' guide for creating Gemini CLI extensions and updates the mcp-server example to be a complete, buildable TypeScript project. The changes are a great improvement, especially the new documentation. I've found a couple of issues: a critical bug in one of the code examples in the new documentation that would prevent it from running, and a confusing hardcoded name in the updated mcp-server example that creates an inconsistency with the documentation. My review includes suggestions to fix these points.

'fetch_posts',
{
description: 'Fetches a list of posts from a public API.',
inputSchema: z.object({}).shape,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The inputSchema for the fetch_posts tool is defined as z.object({}).shape. The .shape property of a Zod object schema returns the raw shape definition (in this case, an empty object {}), not the Zod schema instance itself. The registerTool function expects a Zod schema. This will cause a runtime error for users following this guide. The schema should be passed directly.

Suggested change
inputSchema: z.object({}).shape,
inputSchema: z.object({}),

Comment thread packages/cli/src/commands/extensions/examples/mcp-server/gemini-extension.json Outdated
@github-actions

github-actions Bot commented Sep 25, 2025

Copy link
Copy Markdown

Size Change: +211 B (0%)

Total Size: 17.4 MB

ℹ️ View Unchanged
Filename Size Change
./bundle/gemini.js 17.4 MB +211 B (0%)
./bundle/sandbox-macos-permissive-closed.sb 1.03 kB 0 B
./bundle/sandbox-macos-permissive-open.sb 830 B 0 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB 0 B
./bundle/sandbox-macos-restrictive-closed.sb 3.29 kB 0 B
./bundle/sandbox-macos-restrictive-open.sb 3.36 kB 0 B
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB 0 B

compressed-size-action

chrstnb and others added 3 commits September 24, 2025 23:12
…i-extension.json

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@chrstnb chrstnb enabled auto-merge September 25, 2025 23:58
@chrstnb chrstnb added this pull request to the merge queue Sep 26, 2025
Merged via the queue into main with commit 7e2ffd7 Sep 26, 2025
17 of 18 checks passed
@chrstnb chrstnb deleted the cb/fixgettinstarted branch September 26, 2025 00:09
geoffdowns pushed a commit to geoffdowns/gemini-cli that referenced this pull request Sep 26, 2025
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
dtometzki pushed a commit to dtometzki/gemini-cli that referenced this pull request Sep 26, 2025
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
jkcinouye pushed a commit that referenced this pull request Sep 29, 2025
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
giraffe-tree pushed a commit to giraffe-tree/gemini-cli that referenced this pull request Oct 10, 2025
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
cocosheng-g pushed a commit that referenced this pull request May 6, 2026
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@sripasg sripasg added the size/l A large sized PR label Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/l A large sized PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants