Support Gemini CLI extensions (MCP prompts) in headless/non-interactive mode
What would you like to be added?
If I've configured extensions with Gemini CLI extensions. I want to be able to invoke these extension commands headlessly in automated, non-interactive contexts.
- Consider the Gemini CLI extensions in this blog post,
/security:analyzeand/deploy: https://cloud.google.com/blog/products/ai-machine-learning/automate-app-deployment-and-security-analysis-with-new-gemini-cli-extensions - Assume I have configured these extensions in my gemini installations.
- Run `gemini -p "/security:analyze Analyze the .jar files in the artifacts/ directory"
I'm happy to implement this or expand on this (I work in Google Cloud as well, happy to chat about a practical use case).
Why is this needed?
This adds another access point for Gemini CLI extensions, allowing them to be leveraged in non-interactive, automated contexts (think CICD workflows, particularly ones that are not necessarily Github-native, or locally scripted workflows).
Additional context
No response
This should have been addressed in https://github.com/google-gemini/gemini-cli/issues/5435 - cc @capachino
Hi @codrienne
#5435 fixes this for custom slash commands and has reached preview and nightly.
However, it does not yet support MCP prompts, which will likely be a problem as many of our extensions are shipping with those.
I don't think that will be too difficult to add, but let me take a quick look.
Thanks!
Thanks @capachino 🙏🏾
#10194 is ready for review
What's the general timeline/SLO for PRs to get reviewed? @capachino
Checking in again @capachino
Hi @codrienne the fix has landed in nightly and preview. Feel free to give it a try, and let us know if you run into any issues.