Introducing the OpenCode D Dev Plugin
Justin
a year ago
Summary
I explain the problem that AI and LLM‑generated bash commands run on the host machine, which breaks when developers use isolated environments like ddev. To fix this, I created the OpenCode ddev plugin that tells the AI to execute all commands inside the active ddev container, ensuring Composer, npm, PHPStan, PHPCS and other tools run correctly. I show a side‑by‑side demo of two OpenCode windows – one with the plugin and one without – highlighting that the plugin maps commands to the container and prevents failures caused by missing host tools. I also describe how the plugin injects the ddev context only when needed, reducing token consumption and keeping the AI prompt clean. The plugin is open‑source, free, currently works only with OpenCode, and I invite feedback and contributions while outlining future ideas such as reading ddev logs and improving path mapping.