opencode icon indicating copy to clipboard operation
opencode copied to clipboard

feat: install local plugin dependencies from package.json

Open elithrar opened this issue 3 weeks ago • 3 comments

Enables local plugins and custom tools to use external npm dependencies by running bun install after adding @opencode-ai/plugin.

  • local plugins in .opencode/plugin/ previously could not use external npm packages. If a plugin imported a package like shescape, it would SILENTLY fail because dependencies were not installed and the tool would throw.
  • we now also run bun install to install any additional dependencies defined in the config directory's package.json.

usage:

Add a package.json to your .opencode/ directory:

{
  "dependencies": {
    "shescape": "^2.1.0"
  }
}

elithrar avatar Dec 28 '25 16:12 elithrar