Skip to content

feat(plugin): Add installed plugins management utilities#2031

Draft
xingyaoww wants to merge 1 commit intomainfrom
openhands/plugin-install-utils
Draft

feat(plugin): Add installed plugins management utilities#2031
xingyaoww wants to merge 1 commit intomainfrom
openhands/plugin-install-utils

Conversation

@xingyaoww
Copy link
Collaborator

@xingyaoww xingyaoww commented Feb 13, 2026

Summary

This PR adds utilities for managing plugins installed in the user's home directory (~/.openhands/skills/installed/), similar to how Claude Code manages plugins in ~/.claude/plugins/.

New Functions

  • install_plugin(source, ref, repo_path, installed_dir, force): Install plugins from GitHub repos (github:owner/repo), git URLs, or local paths
  • uninstall_plugin(name, installed_dir): Remove installed plugins by name
  • list_installed_plugins(installed_dir): List all installed plugins with metadata
  • load_installed_plugins(installed_dir): Load all installed plugins as Plugin objects
  • get_installed_plugin(name, installed_dir): Get info about a specific installed plugin
  • update_plugin(name, installed_dir): Update an installed plugin to the latest version

New Models

  • InstalledPluginInfo: Tracks metadata about a plugin installation (name, version, source, resolved_ref, install_path, installed_at)
  • InstalledPluginsMetadata: Metadata file for tracking all installed plugins

Usage Example

from openhands.sdk.plugin import (
    install_plugin,
    list_installed_plugins,
    uninstall_plugin,
    load_installed_plugins,
)

# Install a plugin from GitHub
info = install_plugin("github:owner/my-plugin", ref="v1.0.0")
print(f"Installed {info.name} v{info.version}")

# List all installed plugins
for plugin_info in list_installed_plugins():
    print(f"  - {plugin_info.name}: {plugin_info.description}")

# Load plugins for use with an agent
plugins = load_installed_plugins()

# Uninstall a plugin
uninstall_plugin("my-plugin")

This is part of the effort to support /plugin install {github_repo} command in OpenHands CLI (see OpenHands/OpenHands-CLI#405).

Checklist

  • If the PR is changing/adding functionality, are there tests to reflect this?
  • If there is an example, have you run the example to make sure that it works?
  • If there are instructions on how to run the code, have you followed the instructions and made sure that it works?
  • If the feature is significant enough to require documentation, is there a PR open on the OpenHands/docs repository with the same branch name?
  • Is the github CI passing?

@xingyaoww can click here to continue refining the PR


Agent Server images for this PR

GHCR package: https://github.com/OpenHands/agent-sdk/pkgs/container/agent-server

Variants & Base Images

Variant Architectures Base Image Docs / Tags
java amd64, arm64 eclipse-temurin:17-jdk Link
python amd64, arm64 nikolaik/python-nodejs:python3.12-nodejs22 Link
golang amd64, arm64 golang:1.21-bookworm Link

Pull (multi-arch manifest)

# Each variant is a multi-arch manifest supporting both amd64 and arm64
docker pull ghcr.io/openhands/agent-server:722065a-python

Run

docker run -it --rm \
  -p 8000:8000 \
  --name agent-server-722065a-python \
  ghcr.io/openhands/agent-server:722065a-python

All tags pushed for this build

ghcr.io/openhands/agent-server:722065a-golang-amd64
ghcr.io/openhands/agent-server:722065a-golang_tag_1.21-bookworm-amd64
ghcr.io/openhands/agent-server:722065a-golang-arm64
ghcr.io/openhands/agent-server:722065a-golang_tag_1.21-bookworm-arm64
ghcr.io/openhands/agent-server:722065a-java-amd64
ghcr.io/openhands/agent-server:722065a-eclipse-temurin_tag_17-jdk-amd64
ghcr.io/openhands/agent-server:722065a-java-arm64
ghcr.io/openhands/agent-server:722065a-eclipse-temurin_tag_17-jdk-arm64
ghcr.io/openhands/agent-server:722065a-python-amd64
ghcr.io/openhands/agent-server:722065a-nikolaik_s_python-nodejs_tag_python3.12-nodejs22-amd64
ghcr.io/openhands/agent-server:722065a-python-arm64
ghcr.io/openhands/agent-server:722065a-nikolaik_s_python-nodejs_tag_python3.12-nodejs22-arm64
ghcr.io/openhands/agent-server:722065a-golang
ghcr.io/openhands/agent-server:722065a-java
ghcr.io/openhands/agent-server:722065a-python

About Multi-Architecture Support

  • Each variant tag (e.g., 722065a-python) is a multi-arch manifest supporting both amd64 and arm64
  • Docker automatically pulls the correct architecture for your platform
  • Individual architecture tags (e.g., 722065a-python-amd64) are also available if needed

Add support for managing plugins installed in ~/.openhands/skills/installed/:

- install_plugin(): Install plugins from GitHub repos, git URLs, or local paths
- uninstall_plugin(): Remove installed plugins by name
- list_installed_plugins(): List all installed plugins with metadata
- load_installed_plugins(): Load all installed plugins as Plugin objects
- get_installed_plugin(): Get info about a specific installed plugin
- update_plugin(): Update an installed plugin to the latest version

This follows the Claude Code plugin pattern where plugins can be installed
from various sources and managed in a user-specific directory.

Includes comprehensive tests for all functionality.

Co-authored-by: openhands <openhands@all-hands.dev>
@github-actions
Copy link
Contributor

Coverage

Coverage Report •
FileStmtsMissCoverMissing
openhands-sdk/openhands/sdk/plugin
   installed.py1431390%161, 214, 288, 332, 335, 354, 361, 376–377, 406, 409, 434, 474
TOTAL18001537470% 

xingyaoww pushed a commit to OpenHands/OpenHands-CLI that referenced this pull request Feb 13, 2026
Add support for managing plugins installed in ~/.openhands/skills/installed/:

TUI Command:
- /plugin - Shows installed plugins and usage instructions

CLI Subcommand:
- openhands plugin list [--json] - List installed plugins
- openhands plugin install <source> [--ref] [--repo-path] [--force] - Install plugin
- openhands plugin uninstall <name> - Uninstall plugin
- openhands plugin update <name> - Update plugin to latest version

Supported sources:
- github:owner/repo - GitHub repository shorthand
- https://github.com/owner/repo - Full git URL
- /local/path - Local directory path

This uses the new installed plugins management utilities from SDK PR #2031:
OpenHands/software-agent-sdk#2031

Closes #405

Co-authored-by: openhands <openhands@all-hands.dev>
@openhands-ai
Copy link

openhands-ai bot commented Feb 13, 2026

Looks like there are a few issues preventing this PR from being merged!

  • GitHub Actions are failing:
    • Pre-commit checks

If you'd like me to help, just leave a comment, like

@OpenHands please fix the failing actions on PR #2031 at branch `openhands/plugin-install-utils`

Feel free to include any additional details that might help me get this PR into a better state.

You can manage your notification settings

@enyst enyst added behavior-initiative This is related to the system prompt sections and LLM steering. and removed behavior-initiative This is related to the system prompt sections and LLM steering. labels Feb 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments