Skip to content

Latest commit

 

History

History
 
 

README.md

{{pluginName}}

{{description}}

An OpenCode plugin created from the opencode-plugin-template

Features

  • 🏗️ TypeScript-based plugin architecture
  • 🔧 Mise task runner integration
  • 📦 Bun/npm build tooling
  • ✨ ESLint + Prettier formatting
  • 🧪 Vitest testing setup
  • 🚀 GitHub Actions CI/CD
  • 📝 Release automation with release-please

Getting Started

  1. Clone this template:

    cp -r opencode-plugin-template your-plugin-name
    cd your-plugin-name
  2. Update package.json:

    • Change name to your plugin name
    • Update description
    • Update repository.url
  3. Install dependencies:

    bun install
  4. Implement your plugin in src/index.ts:

    import type { Plugin } from '@opencode-ai/plugin';
    
    export const YourPlugin: Plugin = async (ctx) => {
      return {
        tool: {
          // Your plugin tools here
        },
      };
    };
  5. Test your plugin:

    mise run test

Development

  • mise run build - Build the plugin
  • mise run test - Run tests
  • mise run lint - Lint code
  • mise run lint:fix - Fix linting issues
  • mise run format - Format code with Prettier

Installation in OpenCode

Create or edit ~/.config/opencode/config.json:

{
  "plugins": ["{{pluginName}}"]
}

Author

{{authorName}} <{{authorEmail}}>

Repository

{{repositoryUrl}}

Contributing

Contributions are welcome! Please file issues or submit pull requests on the GitHub repository.

License

MIT License. See the LICENSE file for details.