Gemini CLI
| Target id | Package | Ship with |
|---|---|---|
gemini-cli |
@oiap/exporter-gemini-cli |
oiap sync (git install) or install-agent-plugin |
npx oiap build oiap.plugin.ts --target gemini-cli --out dist/gemini-clinpx install-agent-plugin <owner>/<repo> --plugin <plugin-id> --agent gemini-cliGemini CLI target exporter for Open Interoperable Agent Plugins.
This package lowers OIAP plugin primitives into Gemini CLI extension files. The generated bundle uses the documented Gemini extension layout:
gemini-extension.jsonGEMINI.mdcommands/<command>.tomlskills/<skill>/SKILL.mdagents/<agent>.mdhooks/hooks.jsonpolicies/oiap-policy.tomlMCP servers are embedded in gemini-extension.json, because Gemini CLI loads
extension MCP configuration from the manifest. Hook configuration calls the
generated .oiap/runtime/runner.mjs raw-JS hook runtime through
${extensionPath} variables.
Most authors should use the CLI:
bun run oiap build ./oiap.plugin.ts --target gemini-cli --out ./build/gemini-cliThe exporter records policy evidence in .oiap/policy.json and emits Gemini
Policy Engine TOML rules for supported deny and ask policies. Allow policies and
non-tool policy surfaces remain visible as degradations because extension policy
tiers cannot silently auto-approve tool calls.
Install paths
Section titled “Install paths”Where install-agent-plugin and installPlugin() write the bundle, from the target profile. --out <dir> overrides them.
| Scope | Path |
|---|---|
| Local (default) | ./.gemini/extensions/<plugin-id> |
Global (--global) |
~/.gemini/extensions/<plugin-id> |
Support matrix
Section titled “Support matrix”From the platform support matrix (see its legend).
| Profile | Package | Rules | Skills | Commands | Hooks | Agents | MCP | Runtime | Policy |
|---|---|---|---|---|---|---|---|---|---|
| core | Y | Y | Y | Y | Y | P | Y | F | Y |
Platform notes
Section titled “Platform notes”High-fidelity extension target. Gemini CLI extensions use root
gemini-extension.json, custom command TOML files under commands/, root or
manifest-listed context files such as GEMINI.md, Agent Skills under skills/,
preview sub-agent markdown under agents/, hooks/hooks.json, manifest
mcpServers, extension settings, and policy TOML under policies/. OIAP emits
native bundle artifacts for those surfaces and records degradations for preview
sub-agents, unsupported permission-request hooks, non-generated runtime modules,
and extension policy allow decisions that Gemini CLI intentionally ignores.