[FEATURE]: Augment custom tools with an optional install hook #3105

Open
opened 2026-02-16 17:38:40 -05:00 by yindo · 2 comments
Owner

Originally created by @DamianB-BitFlipper on GitHub (Nov 25, 2025).

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

When writing a custom tool that invokes another programming language (ie python), unless the tool is trivial, often times extra python libraries are needed.

For one tool, I had to manually create a venv and then use that in the Bun.$ command. I was thinking it would be greatly beneficial to have the installation happen automatically, making custom tools much more portable and shareable.

My idea is to have the tool optionally provide an install function which gets called and installs whatever is needed in the .../plugin/<tool_name> directory. If this directory already exists, the install is a no-op.

I'd be happy to implement this feature since it is one I found the need for.

Originally created by @DamianB-BitFlipper on GitHub (Nov 25, 2025). ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request When writing a custom tool that invokes another programming language (ie python), unless the tool is trivial, often times extra python libraries are needed. For one tool, I had to manually create a venv and then use that in the Bun.$ command. I was thinking it would be greatly beneficial to have the installation happen automatically, making custom tools much more portable and shareable. My idea is to have the tool optionally provide an install function which gets called and installs whatever is needed in the .../plugin/<tool_name> directory. If this directory already exists, the install is a no-op. I'd be happy to implement this feature since it is one I found the need for.
yindo added the discussion label 2026-02-16 17:38:40 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Nov 25, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #2802: Allow running custom tools without external dependencies
  • #2768: Support for using additional npm packages in custom tools
  • #1849: opencode cli should have install/uninstall support for plugins

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Nov 25, 2025): This issue might be a duplicate of existing issues. Please check: - #2802: Allow running custom tools without external dependencies - #2768: Support for using additional npm packages in custom tools - #1849: opencode cli should have install/uninstall support for plugins Feel free to ignore if none of these address your specific case.
Author
Owner

@mlanza commented on GitHub (Dec 5, 2025):

I believe it makes more sense to tie the install to the plugin (#1849) and not tool use, but your idea is well received. Having an install is definitely helpful.

@mlanza commented on GitHub (Dec 5, 2025): I believe it makes more sense to tie the install to the plugin (#1849) and not tool use, but your idea is well received. Having an install is definitely helpful.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3105