@oiap/cli
Command-line tooling for building Open Interoperable Agent Plugin bundles from a plugin definition file.
bun run oiap build ./oiap.plugin.tsBy default, the CLI builds every registered target into dist/oiap/<target>. The
current registered targets are Antigravity, Claude Code, Cline, Codex, Cursor,
Gemini CLI, GitHub Copilot CLI, OpenClaw, OpenCode, VS Code Copilot, and
Windsurf.
The target output directory is cleaned before each build so stale files from an older exporter run cannot remain in the generated plugin.
bun run oiap build ./oiap.plugin.ts --target antigravity --out ./build/antigravitybun run oiap build ./oiap.plugin.ts --target claude-code --out ./build/claudebun run oiap build ./oiap.plugin.ts --target cline --out ./build/clinebun run oiap build ./oiap.plugin.ts --target codex --out ./build/codexbun run oiap build ./oiap.plugin.ts --target cursor --out ./build/cursorbun run oiap build ./oiap.plugin.ts --target gemini-cli --out ./build/gemini-clibun run oiap build ./oiap.plugin.ts --target github-copilot-cli --out ./build/github-copilot-clibun run oiap build ./oiap.plugin.ts --target openclaw --out ./build/openclawbun run oiap build ./oiap.plugin.ts --target opencode --out ./build/opencodebun run oiap build ./oiap.plugin.ts --target vscode-copilot-chat --out ./build/vscode-copilotbun run oiap build ./oiap.plugin.ts --target windsurf --out ./build/windsurfSync a plugin repository
Section titled “Sync a plugin repository”oiap sync writes the files that git-installed hosts read into the current
repository, so users can install the plugin with each host’s own command. Commit
the result, and run oiap sync --check in CI (or the OIAP GitHub Action) to fail
when the committed files no longer match the definition.
bun run oiap sync # oiap.plugin.ts -> host files at the repository rootbun run oiap sync --check # exit 1 when files are missing, changed, or stalebun run oiap sync --layout plugins # movable hosts under plugins/<target>/bun run oiap sync --target claude-code,codexHosts that only install the repository root (Gemini CLI, Antigravity, OpenClaw)
always go at the root. Other hosts share the root unless one host would load
another host’s files, in which case they move to plugins/<target>/.
.oiap/sync.json records the generated files so later syncs remove stale ones;
files that a previous sync did not write are never overwritten without
--force.
Build options
Section titled “Build options”Plugin files can export the plugin as default or as a named plugin export.
Use --export <name> to choose another export.
import { allow, definePlugin, hook } from "@oiap/core";
export default definePlugin({ manifest: { id: "hello-claude", name: "Hello Claude", version: "0.0.0", description: "Small CLI build smoke plugin.", categories: ["example"], supportedTargets: ["claude-code"], }, hooks: [hook.beforeTool("allow-all", () => allow())],});The CLI writes generated bundle files only. It does not install the bundle into a host application.
Source: packages/cli · npm: @oiap/cli