@ichisay/opencode-agy-plugin
v0.5.1
Published
OpenCode plugin + provider that routes LLM prompts to agy (Google Antigravity CLI)
Downloads
394
Maintainers
Readme
@ichisay/opencode-agy-plugin
An OpenCode plugin and provider that connects the agy CLI to OpenCode. Select and use models exposed by agy directly from OpenCode.
This project is developed entirely through vibe coding.
This project originated as a fork of raultov/opencode-agy-bridge:main.
Quick Start
Prerequisites
- Latest
agyCLI installed (compatibility verified with1.1.13) agyauthenticated- OpenCode installed
Run agy once in a terminal to complete authentication.
Install From npm
Install the package from npm:
npm install @ichisay/opencode-agy-pluginThen add @ichisay/opencode-agy-plugin to the plugin list in ~/.config/opencode/opencode.json or opencode.jsonc as shown below:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@ichisay/opencode-agy-plugin"],
"provider": {
"agy": {
"npm": "@ichisay/opencode-agy-plugin",
"name": "Antigravity",
"options": {
"binary": "agy",
"timeoutMs": 300000,
},
},
},
}Restart OpenCode, then run /model and select an agy/... model. The model list is loaded automatically from agy models at startup.
Update the Plugin
OpenCode caches npm plugins. To refresh the global installation to the latest version:
opencode plugin @ichisay/opencode-agy-plugin@latest --global --forceFor a project-local plugin configuration, omit --global. Quit and restart OpenCode after updating.
If the installed version is still old, clear only this plugin's OpenCode package cache and run the update again:
rm -rf ~/.cache/opencode/packages/@ichisay/opencode-agy-plugin \
~/.cache/opencode/packages/@ichisay/opencode-agy-plugin@latest
opencode plugin @ichisay/opencode-agy-plugin@latest --global --forceDo not edit files inside the OpenCode cache manually. OpenCode recreates them during plugin installation.
Use a Local Checkout
For local development or testing, use a local checkout of this package:
cd <repo-dir>
bun install
bun run build
bun testPoint plugin to the built file and npm to the checkout directory:
{
"plugin": ["/home/USER/workspace/<repo-dir>/dist/plugin.js"],
"provider": {
"agy": {
"npm": "/home/USER/workspace/<repo-dir>",
"name": "Antigravity",
},
},
}Permissions and Security
Every agy invocation uses --dangerously-skip-permissions. Changes made by agy and commands it executes are not mediated by OpenCode permission prompts. OpenCode system instructions, tool history, and file parts are not forwarded to agy. Use this plugin only in trusted workspaces and with trusted requests. This is intentional current plugin behavior.
Models and Variants
Automatic Model Discovery
If models is omitted, the plugin runs agy models and populates the model list.
- When two or more IDs share the same prefix before the final
-, the final tokens become variants. - Example:
gemini-3.7-flash-highandgemini-3.7-flash-lowbecomegemini-3.7-flashwithhighandlowvariants. - Automatically grouped base models use the first returned variant as effort when no variant is selected.
- If at least one manual
modelsentry exists, automatic discovery is skipped.
The available models can vary by account, region, and agy version.
Manual Model Configuration
Set models to pin the model list or define variant names explicitly:
{
"provider": {
"agy": {
"npm": "@ichisay/opencode-agy-plugin",
"models": {
"gemini-3.7-flash": {
"name": "Gemini 3.7 Flash",
"variants": {
"high": {},
"low": {},
},
},
},
},
},
}A variant appends its name to the base model ID and passes the result to agy --model without adding --effort.
An automatically grouped base model uses the first returned variant as --effort when no variant is selected.
Troubleshooting
If a model does not appear:
- Confirm that
agy modelsreturns the model. - If using manual
models, confirm that each ID is accepted byagy. - Restart OpenCode after confirming the model is available from
agy models.
If authentication has expired or agy models fails, the automatic list cannot be refreshed.
