{"id":23856511,"url":"https://github.com/wp-autoplugin/hub2wp","last_synced_at":"2026-03-12T02:03:35.429Z","repository":{"id":270496500,"uuid":"903597688","full_name":"WP-Autoplugin/hub2wp","owner":"WP-Autoplugin","description":"Browse, install, and update plugins hosted on GitHub directly from your WordPress dashboard.","archived":false,"fork":false,"pushed_at":"2025-02-24T02:48:26.000Z","size":1261,"stargazers_count":28,"open_issues_count":2,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-06-13T05:04:00.117Z","etag":null,"topics":["wordpress","wordpress-development","wordpress-plugin"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WP-Autoplugin.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-15T02:50:43.000Z","updated_at":"2025-06-12T10:44:37.000Z","dependencies_parsed_at":"2025-06-13T05:04:01.626Z","dependency_job_id":null,"html_url":"https://github.com/WP-Autoplugin/hub2wp","commit_stats":null,"previous_names":["wp-autoplugin/hub2wp"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/WP-Autoplugin/hub2wp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WP-Autoplugin%2Fhub2wp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WP-Autoplugin%2Fhub2wp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WP-Autoplugin%2Fhub2wp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WP-Autoplugin%2Fhub2wp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WP-Autoplugin","download_url":"https://codeload.github.com/WP-Autoplugin/hub2wp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WP-Autoplugin%2Fhub2wp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259584783,"owners_count":22880198,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["wordpress","wordpress-development","wordpress-plugin"],"created_at":"2025-01-03T01:41:33.500Z","updated_at":"2026-03-12T02:03:35.424Z","avatar_url":"https://github.com/WP-Autoplugin.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hub2wp\n\nhub2wp is a WordPress plugin that lets you discover, install, and update plugins and themes hosted on GitHub directly from your WordPress dashboard. By leveraging GitHub's ecosystem, it provides a straightforward way to extend your WordPress site beyond the resources available on WordPress.org.\n\nhub2wp does not require any changes to existing plugins or approvals from a central authority to make themes and plugins discoverable or updatable. All it takes is for developers to add the `wordpress-plugin`/`wordpress-theme` tag to their public GitHub repository. hub2wp automatically verifies that a repository is a valid WordPress extension. Thousands of valid plugins and themes are already available on GitHub, ready to be installed right away!\n\nPrivate repositories are also supported, and you can manually set up update monitoring for themes and plugins installed outside hub2wp.\n\n![GitHub Plugin Browsing](assets/hub2wp-screenshot-1.png)\n\nAlso check out the [hub2wp Plugin Repository](https://hub2wp.com/) a public website to browse, search, and explore WordPress plugins hosted on GitHub.\n\n---\n\n## Features\n\n- **Search GitHub Plugins and Themes**: Browse and search repositories on GitHub to find plugins and themes that meet your needs.\n- **Install with One Click**: Easily add GitHub-hosted plugins and themes to your site.\n- **Update Management**: Receive notifications and perform updates for GitHub plugins and themes directly from your admin panel, like you would for WordPress.org plugins.\n- **Optional GitHub Token Support**: Increase the GitHub API rate limit by adding a personal access token. Normal usage does not require a token, thanks to GitHub's generous API limits for unauthenticated requests.\n- **Caching**: Built-in caching minimizes API requests for faster performance and reduced API quota usage.\n- **Manual Update Monitoring**: Set up update monitoring for plugins and themes installed outside hub2wp.\n- **Private Repository Support**: Browse, install, and update plugins and themes from private GitHub repositories.\n- **Release-Based Updates**: When a repository has GitHub releases, hub2wp uses the latest release tag for version checks and downloads. This behavior can be disabled in settings to fall back to branch-based checking.\n- **Custom Branch Tracking**: Track a specific branch for updates instead of the repository's default branch.\n\n---\n\n## How It Works\n\n1. **Plugin and Theme Eligibility**:\n   To appear in hub2wp, a repository must have the `wordpress-plugin` or `wordpress-theme` GitHub topic. Plugins also need a `Stable tag:` header in their `readme.txt` or `readme.md`, and themes need a `Version:` header in `style.css`. These version headers are used for update monitoring.\n\n2. **Update Mechanism**:\n   hub2wp checks for updates using a two-step priority system. First, if the repository has GitHub releases, it uses the **latest release tag** to determine the current version and downloads the release archive. If no releases exist — or if release-based checking is disabled in \"Settings \u003e GitHub Plugins\" — it falls back to reading the `Stable tag:` or `Version:` header from the tracked branch (the repository's default branch, or a custom branch you configure). When a new version is detected, you will receive an update notification in your WordPress dashboard, allowing you to update the plugin or theme directly from there.\n\n3. **Installation**:\n   - Install the latest GitHub release with WP-CLI:\n\n     ```bash\n     wp plugin install \"https://github.com/WP-Autoplugin/hub2wp/archive/refs/tags/$(curl -fsSL https://api.github.com/repos/WP-Autoplugin/hub2wp/releases/latest | php -r '$release = json_decode(stream_get_contents(STDIN), true); echo $release[\\\"tag_name\\\"];').zip\" --activate\n     ```\n\n   - Or download the latest release from the [Releases](https://github.com/WP-Autoplugin/hub2wp/releases) page and upload the ZIP file via the 'Plugins' screen in WordPress or extract it to the `/wp-content/plugins/` directory.\n   - Activate hub2wp from the 'Plugins' menu.\n   - Start exploring GitHub plugins under \"Plugins \u003e Add GitHub Plugin\". Browse themes by clicking on the \"GitHub Themes\" button under \"Appearance \u003e Themes\".\n\n4. **Configuration (Optional)**:\n   - Add a personal GitHub token in “Settings \u003e GitHub Plugins” to increase API limits and access private repositories.\n   - Adjust caching settings for optimized performance.\n   - Set up update monitoring for manually installed plugins and themes.\n\n---\n\n## Screenshots\n\n\u003cdetails\u003e\n\u003csummary\u003eGitHub Plugin Browsing\u003c/summary\u003e\n\n![GitHub Plugin Browsing](assets/hub2wp-screenshot-1.png)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003ePlugin Details Popup\u003c/summary\u003e\n\n![Plugin Details Popup](assets/hub2wp-screenshot-2.png)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eSet up Update Monitoring for Plugins on the Settings Page\u003c/summary\u003e\n\n![Set up Update Monitoring for Plugins on the Settings Page](assets/hub2wp-screenshot-4.png)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eUpdate Processing via GitHub API\u003c/summary\u003e\n\n![Update Processing via GitHub API](assets/hub2wp-screenshot-3.png)\n\n\u003c/details\u003e\n\n---\n\n## FAQs\n\n**Do I need a GitHub token?**  \nNo, but adding one increases the API request limit, which may be useful for high usage scenarios. Without a token, you can make up to 60 API requests per hour, which is sufficient for most users. You only need a token if you have a large number of plugins or if you want to use private repositories.\n\n**Will this plugin interfere with WordPress.org plugins?**  \nNo, hub2wp operates independently of WordPress.org and only manages plugins sourced from GitHub.\n\n**What happens if a plugin is updated on GitHub?**  \nhub2wp will first check the repository's latest GitHub release for a new version. If the repository has no releases (or you have disabled release-based checking in settings), it falls back to reading the `Stable tag:` version from the tracked branch. Either way, when a new version is detected you will receive an update notification in your WordPress dashboard.\n\n**Can I use hub2wp for private repositories?**  \nYes, you can add private repositories to hub2wp by providing a GitHub token with the appropriate permissions. Private repositories will be listed in a separate tab in the plugin browser.\n\n---\n\n## Developer-Friendly\n\nhub2wp is designed to be useful for site builders and developers, not just end users. It supports private repositories, custom tracked branches, and release-priority update checking. It also exposes filters so projects can adapt hub2wp to their own workflow without forking the plugin.\n\n### WP-CLI\n\nhub2wp now ships with tracked GitHub install commands for plugins and themes:\n\n```bash\nwp hub2wp plugin install owner/repo --activate\nwp hub2wp plugin list\nwp hub2wp theme install owner/repo --activate\nwp hub2wp theme list\n```\n\nUseful flags:\n\n- `--branch=\u003cbranch\u003e` to track a specific branch.\n- `--no-release-priority` to force branch-based tracking even if releases exist.\n- `--token=\u003ctoken\u003e` to install from a private repository or override the stored hub2wp token for this run.\n\nThese commands install the extension from GitHub and immediately register it in hub2wp's monitored plugins or monitored themes list so update checks behave the same as installs started from the hub2wp UI.\nThe `list` commands show the tracked plugin or theme name, GitHub repository, and local directory/slug.\n\nYou can also manage hub2wp settings from WP-CLI:\n\n```bash\nwp hub2wp settings set access_token ghp_xxx\nwp hub2wp settings set cache_duration 6\nwp hub2wp settings get access_token\nwp hub2wp settings list\n```\n\n### Filters\n\nCurrent custom filters:\n\n- **`hub2wp_repo_tracking_preferences`**: Override the effective tracked branch and `prioritize_releases` setting for one repository.\n- **`hub2wp_github_request_args`**: Adjust request arguments before a GitHub API request is sent. Useful for timeouts, custom headers, or enterprise/proxy integrations.\n- **`hub2wp_install_source_context`**: Override the resolved source context after hub2wp decides between branch-based and release-based tracking.\n- **`hub2wp_compatibility_result`**: Adjust the final compatibility result after plugin/theme headers have been parsed.\n\nExample:\n\n```php\nadd_filter( 'hub2wp_repo_tracking_preferences', function( $preferences, $owner, $repo, $repo_type, $repo_data ) {\n\tif ( 'acme' === $owner \u0026\u0026 'my-plugin' === $repo ) {\n\t\t$preferences['branch'] = 'develop';\n\t\t$preferences['prioritize_releases'] = false;\n\t}\n\n\treturn $preferences;\n}, 10, 5 );\n\nadd_filter( 'hub2wp_github_request_args', function( $args, $url, $github_api ) {\n\t$args['timeout'] = 20;\n\treturn $args;\n}, 10, 3 );\n\nadd_filter( 'hub2wp_install_source_context', function( $context, $owner, $repo, $github_api ) {\n\tif ( 'acme' === $owner \u0026\u0026 'my-plugin' === $repo ) {\n\t\t$context['source'] = 'branch';\n\t\t$context['uses_releases'] = false;\n\t\t$context['ref'] = 'develop';\n\t\t$context['download_url'] = $github_api-\u003eget_download_url( $owner, $repo, 'develop' );\n\t}\n\n\treturn $context;\n}, 10, 4 );\n\nadd_filter( 'hub2wp_compatibility_result', function( $compatibility, $headers, $owner, $repo, $repo_type, $source_context, $github_api ) {\n\tif ( 'acme' === $owner \u0026\u0026 'legacy-plugin' === $repo ) {\n\t\t$compatibility['is_compatible'] = true;\n\t\t$compatibility['reason'] = '';\n\t}\n\n\treturn $compatibility;\n}, 10, 7 );\n```\n\n---\n\n## Agentic Workflows\n\nhub2wp is designed to be fully operable by AI agents and automated systems without any manual UI interaction. It exposes three complementary interfaces that agents can use to install, inspect, and maintain GitHub-hosted WordPress plugins and themes.\n\nThe preferred interface order is:\n1. **WP-CLI** for routine local administration.\n2. **Abilities API** for structured PHP or REST execution on WordPress 6.9+.\n3. **Admin UI** for interactive browsing or dashboard-specific tasks only.\n\n### WP-CLI\n\nEvery hub2wp operation is available as a WP-CLI command, making the plugin fully scriptable. See the [WP-CLI](#wp-cli) commands in the Developer-Friendly section above for the complete command reference. Agents should prefer hub2wp's own install commands over raw `wp plugin install` or `wp theme install` so that update tracking is set up automatically alongside the installation.\n\n### Abilities API\n\nOn WordPress 6.9 and later, hub2wp registers structured abilities through the WordPress Abilities API. Abilities provide typed input/output schemas that make hub2wp's functionality easy to call from PHP code, other plugins, or the REST API.\n\nTwo categories are registered:\n\n- **`hub2wp-discovery`** – Read-only abilities for inspecting repositories and tracked items. These are also exposed via the REST API under `/wp-json/wp-abilities/v1`.\n- **`hub2wp-management`** – Mutating abilities for installing extensions, clearing the cache, and running update checks. Available in PHP only.\n\n| Ability | Category | REST |\n|---|---|---|\n| `hub2wp/list-tracked-plugins` | discovery | ✓ |\n| `hub2wp/list-tracked-themes` | discovery | ✓ |\n| `hub2wp/get-repository-details` | discovery | ✓ |\n| `hub2wp/check-repository-compatibility` | discovery | ✓ |\n| `hub2wp/install-plugin-from-github` | management | – |\n| `hub2wp/install-theme-from-github` | management | – |\n| `hub2wp/clear-cache` | management | – |\n| `hub2wp/run-update-check` | management | – |\n\n### Skill for AI Agents\n\nhub2wp ships with a structured **skill** at `skills/hub2wp/` that AI coding assistants and autonomous agents can load to understand how to operate the plugin correctly. Any agent that loads this skill will know to prefer hub2wp's own commands for GitHub packages over raw WordPress installs, preserve update-tracking semantics, and avoid exposing GitHub tokens in outputs.\n\nThe skill includes:\n\n- **`SKILL.md`** – A concise instruction file describing the preferred interface order, environment verification steps, and guardrails for handling secrets and troubleshooting.\n- **`references/operations.md`** – A complete command-and-ability reference with copy-paste examples for every WP-CLI command, PHP ability invocation, and REST endpoint.\n- **`agents/openai.yaml`** – An OpenAI-compatible agent definition for structured tool-use integrations.\n\n---\n\n## Contribution\n\nhub2wp is open source and welcomes contributions. If you encounter issues or have suggestions, please create an issue or pull request in the [GitHub repository](https://github.com/WP-Autoplugin/hub2wp).\n\n---\n\n## Changelog\n\nSee [readme.txt](readme.txt) for the full changelog.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwp-autoplugin%2Fhub2wp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwp-autoplugin%2Fhub2wp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwp-autoplugin%2Fhub2wp/lists"}