Skip to content

feat: integrate OpenCLI as a Gemini CLI extension (TOML + Agent Skill approach)#274

Open
dull-bird wants to merge 1 commit intojackwener:mainfrom
dull-bird:feat/gemini-cli-plugin
Open

feat: integrate OpenCLI as a Gemini CLI extension (TOML + Agent Skill approach)#274
dull-bird wants to merge 1 commit intojackwener:mainfrom
dull-bird:feat/gemini-cli-plugin

Conversation

@dull-bird
Copy link

@dull-bird dull-bird commented Mar 22, 2026

Description:

📝 Summary

This PR establishes the formal integration architecture for OpenCLI as an extension for Gemini CLI. By adopting a declarative TOML configuration for command definitions and combining it with Agent Skills for expert workflow guidance, we enable Gemini CLI to natively support OpenCLI's features and empower AI agents with autonomous web interaction capabilities.

🛠️ Key Changes

  • Declarative Command Definitions: Added commands/opencli.toml, which explicitly defines the OpenCLI command set and associated prompts, ensuring Gemini CLI can precisely identify and invoke various website adapters.
  • Agent Skill Expert Guidance: Integrated skills/opencli/SKILL.md via a symlink. This provides AI agents with expert operational standards, experience-based insights, and workflow context for executing complex tasks using OpenCLI.
  • Extension Metadata Management: Created gemini-extension.json as the core metadata file to define the extension's identity, versioning, and functional description.
  • Automated Version Synchronization: Configured a version lifecycle hook in package.json. Whenever npm version is executed (or a version bump is triggered), the version in gemini-extension.json automatically syncs with package.json and is staged for the commit, ensuring version consistency across the project.

📦 Installation & Discovery

⚠️ Important: GitHub Topics Requirement
The Gemini CLI extension crawler discovers and registers plugins in the official marketplace via the GitHub Topic: gemini-cli-extensions. Please add this topic to the repository after merging this PR.

Once the extension is indexed or installed, you can invoke OpenCLI directly within Gemini CLI:

/opencli help me find videos about Karpathy on YouTube

You can also activate the opencli skill to allow the AI agent to perform automated browser interaction tasks.

- Added `gemini-extension.json` and `commands/opencli.toml` to register OpenCLI as a command-line tool extension for Gemini CLI using a declarative configuration.
- Added `skills/opencli/SKILL.md` (via symlink) to provide the AI agent with specific instructions and workflow context on how to use OpenCLI.
- Dropped the experimental programmatic tools implementation in favor of this simpler, maintainable architecture.
@dull-bird dull-bird force-pushed the feat/gemini-cli-plugin branch from e62e8bf to bf2db9c Compare March 22, 2026 17:23
@dull-bird dull-bird changed the title feat: 将 OpenCLI 集成为 Gemini CLI 扩展 (采用 TOML + Agent Skill 方案) feat: integrate OpenCLI as a Gemini CLI extension (TOML + Agent Skill approach) Mar 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant