Documentation
Developers
Publishing a Plugin to the Hub

Publishing a Plugin to the Hub

With the announcement of CloudQuery Hub, we are excited to see the community contribute plugins to the Hub. This guide will walk you through the process of publishing a plugin to the Hub.

💡

Publishing to the CloudQuery Hub is only supported for Go plugins at the moment. We are working on adding support for other languages.

Prerequisites

Create a Plugin Definition on Hub

Before publishing a plugin, you need to create a plugin definition on Hub.

Log in to https://cloud.cloudquery.io/ (opens in a new tab). If you have not created a team yet, you will be asked to create a new one. You can also create a new team to publish the plugins with.

The display name will be visible on Hub next to your plugin. The team name is going to be used in configs to reference your plugin using team-name/plugin-name.

To create a new plugin definition, create a new plugin from the Plugins tab. Fill in the necessary details and upload the plugin image.

Staging Releases

Release your plugins for internal testing first before making it public. Set the Visibility to Private and Release Stage to Preview. This enables testing of premium plugins without being charged and with your team only (you can invite other users to your team to test the plugin). When you want to release the plugin in public, set the Visibility to Public and eventually, change the Release Stage to GA (Generally Available) to begin charging for the usage.

Publishing a Plugin

  1. (Optional, recommended) In the root directory of your plugin repository run git tag v1.0.0 to tag the version you're about to publish (replace v1.0.0 with the version you'd like to publish).
  2. (Optional, recommended) Run git push origin v1.0.0 to push the tag.
  3. Run go run main.go package --docs-dir docs -m 'feat: Initial release' v1.0.0 . to package the plugin. v1.0.0 should match the tag you created in step 1. The -m specifies the changelog message that will be used in the release notes and it supports markdown. See example here (opens in a new tab). docs should be a directory containing markdown files that serve as documentation for the plugin. Read more about the documentation format here.
  4. Run cloudquery plugin publish to publish a draft version of the plugin. The version will show up under the versions tab of your plugin in (https://cloud.cloudquery.io (opens in a new tab)). As long as the version is in draft it's mutable and you can re-package the plugin and publish it again.
  5. Once you're ready run cloudquery plugin publish -f to publish a non draft version of the plugin. This version will be immutable and will show up in Hub (opens in a new tab). Allow up to 1 hour for the Hub to reflect the changes.

Documentation Format

  • The only documentation format supported at the moment is markdown, and the cloudquery publish command will only upload markdown files with the .md extension
  • You can have multiple markdown files as documentation. The files will be concatenated in alphabetical order, and if one of the files is named overview.md it will show up first
  • The markdown filename will be title cased when display in the Hub. For example overview.md will be displayed as Overview
  • HTML tags are not supported in the markdown files and will be ignored
  • Relative assets (e.g. ./assets/logo.png) are not supported. We recommend using absolute URLs for assets e.g. https://raw.githubusercontent.com/<owner>/<repo>/main/assets/logo.png in case you have the assets on GitHub