[PR #6302] feat: install local plugin dependencies from package.json #11824

Closed
opened 2026-02-16 18:16:45 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/6302

State: closed
Merged: Yes


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"
  }
}
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/6302 **State:** closed **Merged:** Yes --- 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: ```json { "dependencies": { "shescape": "^2.1.0" } } ```
yindo added the pull-request label 2026-02-16 18:16:45 -05:00
yindo closed this issue 2026-02-16 18:16:45 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11824