Two ways to ship a plugin
You write the plugin once in oiap.plugin.ts. How users get it depends on the
host.
Commit host files with oiap sync |
Build at install time with install-agent-plugin |
|
|---|---|---|
| How it works | You run oiap sync and commit the generated host files; the OIAP GitHub Action fails pull requests when they are out of date. |
Users run npx install-agent-plugin owner/repo --agent <target>, which builds the bundle from your source on their machine. You can also wrap it in your own CLI with installPlugin(). |
| Users install with | Each host’s own command: claude plugin marketplace add owner/repo, codex plugin marketplace add, copilot plugin marketplace add, gemini extensions install, agy plugin install |
install-agent-plugin, or your CLI |
| Updates | The host’s own update, from your default branch | Users run the installer again |
| Best for | Hosts that install from git: Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot CLI, VS Code Copilot, Antigravity, OpenClaw | Hosts that read files from the user’s project: Cline, Windsurf, OpenCode; installing into a specific project or user directory |
Most plugins use both: commit synced files so each host’s native install works,
and document install-agent-plugin for project-local hosts.
1. Commit host files with oiap sync
Section titled “1. Commit host files with oiap sync”Most agent hosts install plugins straight from a git repository and read their
own manifest and component files from the default branch. oiap sync generates
those files from your definition, the same way a lockfile or generated client is
committed next to its source.
npx oiap sync # reads oiap.plugin.ts, writes host files; commit the resultnpx oiap sync --check # CI: exit 1 if the committed files are out of dateThen check every pull request with the GitHub Action:
- uses: fboldo/oiap@v0.4.0 with: plugin: oiap.plugin.tsRead more: Ship with oiap sync,
GitHub Action.
2. Build at install time with install-agent-plugin
Section titled “2. Build at install time with install-agent-plugin”Cline, Windsurf, OpenCode and other hosts that read files from the user’s
project do not install from git. install-agent-plugin discovers the
definePlugin(...) declarations in your repository, builds the selected one for
the requested target on the user’s machine, and writes it to the target’s
install path.
npx install-agent-plugin your-org/your-plugin --listnpx install-agent-plugin your-org/your-plugin --plugin review-guard --agent clineIt works for every target, so it is also the way to install into a specific project or user directory.
Read more: install-agent-plugin, Your own installer CLI.
Checklist for plugin authors
Section titled “Checklist for plugin authors”- Export a
definePlugin(...)declaration fromoiap.plugin.ts. - Keep the manifest
id,version,authorandsupportedTargetsaccurate. Bumpversionwhen you release: Codex, Antigravity, and Claude Code (when the manifest has a version) only update installed plugins when it changes. - Run
oiap syncand commit the generated files; add the OIAP GitHub Action so pull requests fail when they are out of date. - Document each host’s install command, and
npx install-agent-plugin <owner>/<repo> --plugin <id> --agent <target>for project-local hosts.