feat(cli): add --plugin flag for loading plugins#414
Draft
timon0305 wants to merge 1 commit intoOpenHands:mainfrom
Draft
feat(cli): add --plugin flag for loading plugins#414timon0305 wants to merge 1 commit intoOpenHands:mainfrom
timon0305 wants to merge 1 commit intoOpenHands:mainfrom
Conversation
Add support for loading plugins from local paths or GitHub URLs via the -p/--plugin CLI flag. Plugins can provide skills, hooks, and MCP configurations that are merged into the agent at conversation start. - Add -p/--plugin argument to main_parser.py (supports multiple uses) - Add load_plugins() and merge_plugins_into_agent() in setup.py - Add PLUGINS_CACHE_DIR for caching fetched remote plugins - Thread plugin_sources through entrypoint, textual_app, and conversation_runner Usage: openhands --plugin ./my-plugin openhands --plugin github:owner/repo openhands -p ./plugin1 -p ./plugin2 Closes OpenHands#409
Contributor
|
@timon0305 Thanks for the contribution! |
Collaborator
|
Status update: SDK PR OpenHands/software-agent-sdk#2031 adds installed plugin management utilities (install/uninstall/list/get/load/update) under The SDK still has no enable/disable state; CLI should keep that state and pass enabled plugins into |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue: #409
Summary
-p/--pluginCLI flag for loading plugins from local paths or GitHub URLs--pluginflagsChanges
argparsers/main_parser.py- Add-p/--pluginargumentlocations.py- AddPLUGINS_CACHE_DIRconstantsetup.py- Addload_plugins(),merge_plugins_into_agent()tui/core/conversation_runner.py- Addplugin_sourcesparametertui/textual_app.py- Threadplugin_sourcesthrough appentrypoint.py- Passargs.pluginsto textual_mainTest plan
uv run pytest- All 1144 tests passopenhands --helpshows-p/--pluginflagTest Results
uv run pytest
================= 1144 passed, 3 warnings in 109.46s (0:01:49) =================
CLI Help Output