Files
everything-claude-code/.opencode/index.ts
Affaan Mustafa 6d440c036d feat: complete OpenCode plugin support with hooks, tools, and commands
Major OpenCode integration overhaul:

- llms.txt: Comprehensive OpenCode documentation for LLMs (642 lines)
- .opencode/plugins/ecc-hooks.ts: All Claude Code hooks translated to OpenCode's plugin system
- .opencode/tools/*.ts: 3 custom tools (run-tests, check-coverage, security-audit)
- .opencode/commands/*.md: All 24 commands in OpenCode format
- .opencode/package.json: npm package structure for opencode-ecc
- .opencode/index.ts: Main plugin entry point

- Delete incorrect LIMITATIONS.md (hooks ARE supported via plugins)
- Rewrite MIGRATION.md with correct hook event mapping
- Update README.md OpenCode section to show full feature parity

OpenCode has 20+ events vs Claude Code's 3 phases:
- PreToolUse → tool.execute.before
- PostToolUse → tool.execute.after
- Stop → session.idle
- SessionStart → session.created
- SessionEnd → session.deleted
- Plus: file.edited, file.watcher.updated, permission.asked, todo.updated

- 12 agents: Full parity
- 24 commands: Full parity (+1 from original 23)
- 16 skills: Full parity
- Hooks: OpenCode has MORE (20+ events vs 3 phases)
- Custom Tools: 3 native OpenCode tools

The OpenCode configuration can now be:
1. Used directly: cd everything-claude-code && opencode
2. Installed via npm: npm install opencode-ecc
2026-02-05 05:14:33 -08:00

72 lines
1.6 KiB
TypeScript

/**
* Everything Claude Code (ECC) Plugin for OpenCode
*
* This package provides a complete OpenCode plugin with:
* - 12 specialized agents (planner, architect, code-reviewer, etc.)
* - 24 commands (/plan, /tdd, /code-review, etc.)
* - Plugin hooks (auto-format, TypeScript check, console.log warning, etc.)
* - Custom tools (run-tests, check-coverage, security-audit)
* - 16 skills (coding-standards, security-review, tdd-workflow, etc.)
*
* Usage:
*
* Option 1: Install via npm
* ```bash
* npm install opencode-ecc
* ```
*
* Then add to your opencode.json:
* ```json
* {
* "plugin": ["opencode-ecc"]
* }
* ```
*
* Option 2: Clone and use directly
* ```bash
* git clone https://github.com/affaan-m/everything-claude-code
* cd everything-claude-code
* opencode
* ```
*
* @packageDocumentation
*/
// Export the main plugin
export { ECCHooksPlugin, default } from "./plugins/index.js"
// Export individual components for selective use
export * from "./plugins/index.js"
// Version export
export const VERSION = "1.0.0"
// Plugin metadata
export const metadata = {
name: "opencode-ecc",
version: VERSION,
description: "Everything Claude Code plugin for OpenCode",
author: "affaan-m",
features: {
agents: 12,
commands: 24,
skills: 16,
hookEvents: [
"file.edited",
"tool.execute.before",
"tool.execute.after",
"session.created",
"session.idle",
"session.deleted",
"file.watcher.updated",
"permission.asked",
"todo.updated",
],
customTools: [
"run-tests",
"check-coverage",
"security-audit",
],
},
}