π Generate a new OpenCode plugin in seconds!
This is a generator repository for creating new OpenCode plugins. It provides a starter template with all the scaffolding you need to build powerful OpenCode plugins.
[!WARNING] Deprecated. use zenobi-us/bun-module instead
Click "Use this template" on GitHub or clone it:
git clone https://github.com/zenobi-us/opencode-plugin-template.git my-plugin
cd my-plugin
./setup.sh
The generator will ask for:
my-awesome-plugin)cd my-plugin
bun install
mise run build
After running the generator, you'll have:
The generator cleans itself up - no template files or setup script left behind!
# Generate a new plugin (interactive prompts)
./setup.sh generate
# Show help
./setup.sh help
# Show version
./setup.sh version
Generated plugins have this structure:
my-plugin/
βββ src/
β βββ index.ts # Plugin entry point
β βββ version.ts # Version info
β βββ commands/ # Your plugin commands
βββ .github/
β βββ workflows/ # CI/CD workflows
βββ package.json # Dependencies and scripts
βββ tsconfig.json # TypeScript config
βββ README.md # Your plugin's documentation
bun install # Install dependencies
mise run setup # Initial setup
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
mise run pkgjsonlint # Lint package.json
mise run prepare # Prepare for release
mise run publish # Publish the plugin
mise run version # Manage version
See RELEASE.md for publishing and release management details.
TL;DR: Push single commits to main with conventional commit format. Release-please will accumulate changes in a release PR. When this release PR is merged, a new minor version is released. Until then, all other commits on main result in patch builds being published.
MIT
Need help?
29 commits
Shell
74.4%
TypeScript
20.4%
JavaScript
5.3%
π Generate a new OpenCode plugin in seconds!
This is a generator repository for creating new OpenCode plugins. It provides a starter template with all the scaffolding you need to build powerful OpenCode plugins.
[!WARNING] Deprecated. use zenobi-us/bun-module instead
Click "Use this template" on GitHub or clone it:
git clone https://github.com/zenobi-us/opencode-plugin-template.git my-plugin
cd my-plugin
./setup.sh
The generator will ask for:
my-awesome-plugin)cd my-plugin
bun install
mise run build
After running the generator, you'll have:
The generator cleans itself up - no template files or setup script left behind!
# Generate a new plugin (interactive prompts)
./setup.sh generate
# Show help
./setup.sh help
# Show version
./setup.sh version
Generated plugins have this structure:
my-plugin/
βββ src/
β βββ index.ts # Plugin entry point
β βββ version.ts # Version info
β βββ commands/ # Your plugin commands
βββ .github/
β βββ workflows/ # CI/CD workflows
βββ package.json # Dependencies and scripts
βββ tsconfig.json # TypeScript config
βββ README.md # Your plugin's documentation
bun install # Install dependencies
mise run setup # Initial setup
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
mise run pkgjsonlint # Lint package.json
mise run prepare # Prepare for release
mise run publish # Publish the plugin
mise run version # Manage version
See RELEASE.md for publishing and release management details.
TL;DR: Push single commits to main with conventional commit format. Release-please will accumulate changes in a release PR. When this release PR is merged, a new minor version is released. Until then, all other commits on main result in patch builds being published.
MIT
Need help?
29 commits
Shell
74.4%
TypeScript
20.4%
JavaScript
5.3%