Parent: OpenHands/OpenHands-CLI#407 ([PRD] OpenHands CLI Plugin Support)
Summary
Implement CLI commands for installing, uninstalling, enabling, and disabling plugins from registered marketplaces. This provides persistent plugin management so users don't need to specify --plugin flags every time.
Background
With M1 providing explicit plugin loading and M2-Marketplace providing marketplace registration, users need commands to:
- Install plugins from marketplaces for persistent use
- Enable/disable plugins without removing them
- Search for plugins across registered marketplaces
- View installed plugin status
Requirements
Plugin Commands
# Search for plugins
oh plugin search formatter
oh plugin search --marketplace company-tools
# Install a plugin
oh plugin install code-formatter@company-tools
oh plugin install code-formatter # Uses default/only marketplace
# List installed plugins
oh plugin list
oh plugin list --enabled
oh plugin list --disabled
# Enable/disable plugins
oh plugin disable code-formatter@company-tools
oh plugin enable code-formatter@company-tools
# Uninstall a plugin
oh plugin uninstall code-formatter@company-tools
# Show plugin details
oh plugin info code-formatter@company-tools
Plugin Identification
Plugins are identified as plugin-name@marketplace-name:
code-formatter@company-tools - Fully qualified
code-formatter - Shorthand (if unambiguous)
Storage
Installed plugins are stored in ~/.openhands/plugins.json:
{
"installed": {
"code-formatter@company-tools": {
"enabled": true,
"installed_at": "2024-01-15T10:30:00Z",
"version": "1.2.0",
"resolved_ref": "abc123def456"
},
"linter@community": {
"enabled": false,
"installed_at": "2024-01-14T09:00:00Z",
"version": "2.0.1"
}
}
}
CLI Output Examples
Searching for plugins:
$ oh plugin search formatter
Searching marketplaces...
code-formatter (v1.2.0) @ company-tools
Format code using team standards
Commands: format, check
pretty-print (v0.5.0) @ community
Pretty print JSON, YAML, and XML
Commands: format, validate
Use 'oh plugin install <name>@<marketplace>' to install.
Installing a plugin:
$ oh plugin install code-formatter@company-tools
Installing 'code-formatter' from company-tools...
Plugin 'code-formatter@company-tools' installed!
Version: 1.2.0
Commands: format, check
The plugin is enabled and will be loaded in new conversations.
Listing plugins:
$ oh plugin list
Installed plugins:
code-formatter@company-tools (v1.2.0) [enabled]
Installed: 2 days ago
Commands: format, check
linter@community (v2.0.1) [disabled]
Installed: 3 days ago
Commands: lint, fix
2 plugins installed (1 enabled, 1 disabled)
Plugin info:
$ oh plugin info code-formatter@company-tools
Plugin: code-formatter
Marketplace: company-tools
Version: 1.2.0
Status: enabled
Installed: 2024-01-15T10:30:00Z
Description:
Format code using team standards and best practices.
Commands:
/code-formatter:format - Format code in specified path
/code-formatter:check - Check formatting without changes
Skills: 2
Hooks: 1
MCP Servers: 0
Behavior
- Installed & enabled plugins are automatically loaded on
oh run
- Disabled plugins remain installed but are not loaded
- Uninstalling removes the plugin from storage
- Version conflicts across marketplaces warn the user
Acceptance Criteria
Dependencies
References
Parent: OpenHands/OpenHands-CLI#407 ([PRD] OpenHands CLI Plugin Support)
Summary
Implement CLI commands for installing, uninstalling, enabling, and disabling plugins from registered marketplaces. This provides persistent plugin management so users don't need to specify
--pluginflags every time.Background
With M1 providing explicit plugin loading and M2-Marketplace providing marketplace registration, users need commands to:
Requirements
Plugin Commands
Plugin Identification
Plugins are identified as
plugin-name@marketplace-name:code-formatter@company-tools- Fully qualifiedcode-formatter- Shorthand (if unambiguous)Storage
Installed plugins are stored in
~/.openhands/plugins.json:{ "installed": { "code-formatter@company-tools": { "enabled": true, "installed_at": "2024-01-15T10:30:00Z", "version": "1.2.0", "resolved_ref": "abc123def456" }, "linter@community": { "enabled": false, "installed_at": "2024-01-14T09:00:00Z", "version": "2.0.1" } } }CLI Output Examples
Searching for plugins:
$ oh plugin search formatter Searching marketplaces... code-formatter (v1.2.0) @ company-tools Format code using team standards Commands: format, check pretty-print (v0.5.0) @ community Pretty print JSON, YAML, and XML Commands: format, validate Use 'oh plugin install <name>@<marketplace>' to install.Installing a plugin:
Listing plugins:
$ oh plugin list Installed plugins: code-formatter@company-tools (v1.2.0) [enabled] Installed: 2 days ago Commands: format, check linter@community (v2.0.1) [disabled] Installed: 3 days ago Commands: lint, fix 2 plugins installed (1 enabled, 1 disabled)Plugin info:
$ oh plugin info code-formatter@company-tools Plugin: code-formatter Marketplace: company-tools Version: 1.2.0 Status: enabled Installed: 2024-01-15T10:30:00Z Description: Format code using team standards and best practices. Commands: /code-formatter:format - Format code in specified path /code-formatter:check - Check formatting without changes Skills: 2 Hooks: 1 MCP Servers: 0Behavior
oh runAcceptance Criteria
oh plugin search QUERYsearches across marketplacesoh plugin install NAME@MARKETPLACEinstalls a pluginoh plugin listshows installed plugins with statusoh plugin enable/disabletoggles plugin loadingoh plugin uninstallremoves a pluginoh plugin infoshows detailed plugin informationoh run~/.openhands/plugins.jsonDependencies
References