feat(plugin): add marketplace management commands#415
Draft
timon0305 wants to merge 2 commits intoOpenHands:mainfrom
Draft
feat(plugin): add marketplace management commands#415timon0305 wants to merge 2 commits intoOpenHands:mainfrom
timon0305 wants to merge 2 commits intoOpenHands:mainfrom
Conversation
Add subcommands to manage plugin marketplaces (registries) for discovering and installing plugins: - - Add a marketplace - - List configured marketplaces - - Remove a marketplace - - Update marketplace indexes Marketplaces are stored in ~/.openhands/marketplaces.json Implements OpenHands#411
- Use name as primary identifier instead of URL for all operations - Add MarketplaceSource dataclass with support for github, git, url types - Add GitHub shorthand parsing (owner/repo → github:owner/repo) - Auto-generate default names from source URLs - Implement marketplace index fetching with HTTP support - Add local caching of fetched indexes - Show plugin count from cached indexes in list command - Update parser to use 'source' for add, 'name' for remove/update
Contributor
|
@timon0305 Thanks for the contribution! |
Collaborator
|
Whenever you're comfortable, feel free mark this PR as ready for review and request me + john mason as reviewers 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.
PR: Add Plugin Marketplace Management (#411)
Summary
This PR implements the Plugin Marketplace Management feature as specified in issue #411. It allows users to configure plugin marketplaces (registries) that can be used to discover and install plugins.
Changes
New Files Created
openhands_cli/plugins/__init__.pyopenhands_cli/plugins/marketplace_storage.pyopenhands_cli/plugins/marketplace_commands.pyopenhands_cli/argparsers/plugin_parser.pyModified Files
openhands_cli/locations.pyMARKETPLACES_FILEconstantopenhands_cli/argparsers/main_parser.pyopenhands_cli/entrypoint.pyCommands Implemented
Key Features
1. Name-Based Identification
company/plugins→company-pluginsgithub:owner/repo→owner-repohttps://gitlab.com/org/plugins.git→pluginshttps://example.com/marketplace.json→marketplace2. GitHub Shorthand Parsing
owner/repoformat that expands to GitHub raw content URLgithub:owner/repoprefix3. Marketplace Index Fetching
updatecommand fetches the marketplace index from source~/.openhands/marketplace_cache/4. Plugin Count Display
listcommand shows plugin count from cached indexesStorage Format
Marketplaces (
~/.openhands/marketplaces.json){ "marketplaces": { "company-plugins": { "source": { "source": "github", "repo": "company/plugins" }, "added_at": "2026-01-26T12:00:00", "last_updated": "2026-01-26T12:30:00", "auto_update": true } } }Cached Index (
~/.openhands/marketplace_cache/<name>.json)The fetched marketplace index JSON is cached locally for offline access.
CLI Help Output
Manual Testing Results
Source Parsing Tests
Add Marketplace
List Marketplaces
$ openhands plugin marketplace list Configured Plugin Marketplaces ┏━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━┓ ┃ Name ┃ Source ┃ Plugins ┃ Auto Update ┃ Added ┃ Last Updated ┃ ┡━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━┩ │ company-plugins │ github:company/… │ - │ Yes │ 2026-01-26 │ - │ │ test-httpbin │ https://httpbin… │ - │ Yes │ 2026-01-26 │ - │ └─────────────────┴──────────────────┴─────────┴─────────────┴────────────┴──────────────┘ 2 marketplace(s) configured. Plugins available: 0Update Marketplace (Fetch Index)
$ openhands plugin marketplace update test-httpbin Updating marketplace 'test-httpbin'... Updated: test-httpbin (0 plugins) Successfully updated 1 marketplace(s). $ openhands plugin marketplace list Configured Plugin Marketplaces ┏━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━┓ ┃ Name ┃ Source ┃ Plugins ┃ Auto Update ┃ Added ┃ Last Updated ┃ ┡━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━┩ │ test-httpbin │ https://ht… │ 0 │ Yes │ 2026-01-26 │ 2026-01-26 │ └──────────────┴─────────────┴─────────┴─────────────┴────────────┴──────────────┘ 1 marketplace(s) configured. Plugins available: 0Update with Failed Fetch (404 Error)
$ openhands plugin marketplace update company-plugins Updating marketplace 'company-plugins'... Failed: Failed to fetch marketplace index: HTTP 404 - Not Found Failed to update 1 marketplace(s).Remove Marketplace
$ openhands plugin marketplace remove company-plugins Removed marketplace 'company-plugins'Cached Index Verification
Automated Test Results
$ uv run pytest tests/ -v --tb=short --------------------------- snapshot report summary ---------------------------- 13 snapshots passed. ================= 1144 passed, 3 warnings in 116.60s (0:01:56) =================Test Plan
Marketplace Commands (#411)
openhands plugin marketplace add <source>adds marketplace with auto-generated nameopenhands plugin marketplace add <source> --name <name>adds with custom nameopenhands plugin marketplace listshows marketplaces with plugin countsopenhands plugin marketplace updatefetches and caches marketplace indexesopenhands plugin marketplace update <name>updates specific marketplaceopenhands plugin marketplace remove <name>removes marketplace by namecompany/plugins→github:company/plugins)Related Issues