Publishing Plugins
Once your plugin is ready, you can distribute it through marketplaces or direct URLs.
Distribution Methods
Section titled “Distribution Methods”- Marketplace: Register with a plugin marketplace for discovery
- Direct URL: Host the binary and share the URL
- Local Path: Distribute as a file for local installation
Preparing for Release
Section titled “Preparing for Release”-
Test thoroughly
Terminal window go test ./... -
Set version
Update the version in your plugin’s metadata:
const pluginVersion = "1.0.0" -
Build for all platforms
For native plugins:
Terminal window # LinuxGOOS=linux GOARCH=amd64 go build -o dist/plugin-linux-amd64GOOS=linux GOARCH=arm64 go build -o dist/plugin-linux-arm64# macOSGOOS=darwin GOARCH=amd64 go build -o dist/plugin-darwin-amd64GOOS=darwin GOARCH=arm64 go build -o dist/plugin-darwin-arm64# WindowsGOOS=windows GOARCH=amd64 go build -o dist/plugin-windows-amd64.exe -
Generate checksums
Terminal window cd distsha256sum * > checksums.txt
Marketplace Registration
Section titled “Marketplace Registration”Marketplace Index Format
Section titled “Marketplace Index Format”Marketplaces use a JSON index format:
{ "name": "my-marketplace", "updated_at": "2025-01-01T00:00:00Z", "plugins": [ { "name": "my-plugin", "version": "1.0.0", "description": "A useful plugin", "url": "https://example.com/plugins/my-plugin", "sha256": "abc123...", "type": "exe" } ]}Plugin Entry Fields
Section titled “Plugin Entry Fields”| Field | Required | Description |
|---|---|---|
name | Yes | Plugin name (lowercase, alphanumeric, dashes) |
version | Yes | Semantic version |
description | Yes | Brief description |
url | Yes | Download URL |
sha256 | Recommended | SHA256 checksum of the binary |
type | No | "exe" (default) or "wasm" |
Platform-Specific URLs
Section titled “Platform-Specific URLs”For native plugins, include platform variants:
{ "name": "my-plugin", "version": "1.0.0", "description": "A cross-platform plugin", "platforms": { "linux-amd64": { "url": "https://example.com/my-plugin-linux-amd64", "sha256": "..." }, "linux-arm64": { "url": "https://example.com/my-plugin-linux-arm64", "sha256": "..." }, "darwin-arm64": { "url": "https://example.com/my-plugin-darwin-arm64", "sha256": "..." }, "windows-amd64": { "url": "https://example.com/my-plugin-windows-amd64.exe", "sha256": "..." } }}Hosting Options
Section titled “Hosting Options”GitHub Releases
Section titled “GitHub Releases”- Create a GitHub repository
- Build binaries for all platforms
- Create a release with the binaries attached
- Use raw URLs for the marketplace
Example URL:
https://github.com/user/my-plugin/releases/download/v1.0.0/plugin-linux-amd64Static File Hosting
Section titled “Static File Hosting”Any static file host works:
- Amazon S3
- Google Cloud Storage
- Cloudflare R2
- Your own web server
Ensure files are served with appropriate headers:
Content-Type: application/octet-stream- HTTPS for secure downloads
Direct Installation
Section titled “Direct Installation”Users can install directly from URLs:
sky plugin install --url https://example.com/my-plugin my-pluginFor verified downloads:
sky plugin install \ --url https://example.com/my-plugin \ --sha256 abc123... \ my-pluginVersion Management
Section titled “Version Management”Semantic Versioning
Section titled “Semantic Versioning”Follow semantic versioning (semver):
- MAJOR: Breaking changes
- MINOR: New features (backward compatible)
- PATCH: Bug fixes
1.0.0 → 1.0.1 (bug fix)1.0.1 → 1.1.0 (new feature)1.1.0 → 2.0.0 (breaking change)Changelog
Section titled “Changelog”Maintain a CHANGELOG.md:
# Changelog
## [1.1.0] - 2025-01-15### Added- JSON output format support- Recursive directory scanning
### Fixed- Handle empty files without error
## [1.0.0] - 2025-01-01### Added- Initial releaseSecurity Considerations
Section titled “Security Considerations”Sign Your Releases
Section titled “Sign Your Releases”Consider signing releases with GPG:
gpg --armor --detach-sign dist/plugin-linux-amd64Provide signatures alongside binaries.
Provide Checksums
Section titled “Provide Checksums”Always provide SHA256 checksums:
sha256sum plugin-linux-amd64 > plugin-linux-amd64.sha256Users can verify:
sha256sum -c plugin-linux-amd64.sha256HTTPS Only
Section titled “HTTPS Only”Always use HTTPS URLs for plugin downloads.
Self-Hosted Marketplace
Section titled “Self-Hosted Marketplace”To create your own marketplace:
- Create a JSON index file
- Host it at a stable URL
- Users add your marketplace:
sky plugin marketplace add my-org https://plugins.example.com/index.jsonExample Index
Section titled “Example Index”{ "name": "my-org", "updated_at": "2025-01-01T00:00:00Z", "plugins": [ { "name": "star-analyzer", "version": "2.0.0", "description": "Advanced Starlark analyzer", "url": "https://plugins.example.com/star-analyzer-2.0.0", "sha256": "e3b0c44298fc...", "type": "exe" }, { "name": "lint-rules", "version": "1.5.0", "description": "Custom lint rules", "url": "https://plugins.example.com/lint-rules-1.5.0.wasm", "sha256": "d7a8fbb307d7...", "type": "wasm" } ]}Update Workflow
Section titled “Update Workflow”When releasing updates:
- Update version in code
- Build new binaries
- Generate new checksums
- Upload binaries
- Update marketplace index
- Announce the release
Users update installed plugins:
sky plugin install my-plugin # Reinstalls from marketplaceBest Practices
Section titled “Best Practices”- Test all platforms before release
- Provide checksums for security
- Keep old versions available for rollback
- Document changes in a changelog
- Use semantic versioning consistently
- Respond to issues promptly