Thanks for your interest in contributing! This is a small, focused plugin — the bar for changes is intentionally high to keep things simple and reliable.
- Open an issue first for any change beyond a typo fix. This lets us discuss whether the change aligns with the project's scope before you write code.
- This plugin follows a "do one thing well" philosophy. Features that add configuration complexity will generally be rejected unless the use case is overwhelmingly common.
# Clone and install
git clone https://github.com/Cle2ment/opencode-windows-encoding.git
cd opencode-windows-encoding
npm install# Type check
npm run typecheck
# Build
npm run build
# Watch mode (auto-rebuild on change)
npm run devsrc/
└── utf8-encoding.ts # Single-file plugin — all logic lives here
The plugin is a single TypeScript file. Build output goes to dist/.
- Strict TypeScript —
tsconfig.jsonenforces strict mode. Noas any, no@ts-ignore. - Zero npm runtime dependencies — the plugin uses only Node.js built-ins
(
node:fs,node:os,node:path).@opencode-ai/pluginisimport typeonly (compile-time, erased from output). - Match existing patterns — follow the code already in
src/utf8-encoding.ts. - Debug logging goes to
$TMP/utf8-plugin.logand is gated behindOPENCODE_UTF8_DEBUG=1.
Follow Conventional Commits:
feat:— new featurefix:— bug fixdocs:— documentation onlyci:— CI/CD changeschore:— maintenance
Reference the source file directly in your opencode.jsonc:
Then exercise the plugin by running shell commands in OpenCode. Enable debug logs to inspect behavior:
$env:OPENCODE_UTF8_DEBUG = "1"- Fork the repo and create a branch.
- Make your changes, keeping them minimal and focused.
- Run
npm run typecheckandnpm run build— both must pass. - Open a PR against
main. Include:- What problem the change solves
- How you tested it
- Any breaking changes or considerations
By contributing, you agree that your contributions will be licensed under the AGPL-3.0.
{ "plugin": [ "/path/to/opencode-windows-encoding/src/utf8-encoding.ts" ] }