Command-line tool for building, validating, and publishing plugins to OpenBlock Registry
OpenBlock Registry CLI is the official tool for OpenBlock plugin developers. It streamlines the entire plugin development lifecycle from scaffolding to publishing.
- 🚀 Quick Start - Generate plugin scaffolds with interactive prompts
- 🔨 Build System - Bundle and optimize plugins for production
- 🔍 Validation - Comprehensive validation before publishing
- 📦 Publishing - Automated PR creation to OpenBlock Registry
- 🌍 i18n Support - Built-in translation management
- ⚡ Dev Mode - Hot reload for rapid development
- Node.js >= 14.0.0
- Git (for publishing)
- GitHub Account (for publishing)
npm install -g openblock-registry-cliOr use the short alias:
npm install -g openblock-registry-cli
# Then use 'obr' instead of 'openblock-registry-cli'openblock-registry-cli --version
# or
obr --versionopenblock-registry-cli initFollow the interactive prompts to generate your plugin scaffold.
cd your-plugin-name
openblock-registry-cli devThis starts development mode with hot reload. Your plugin will be:
- Automatically rebuilt on file changes
- Registered to the plugin server cache
You can open OpenBlock GUI and see your plugin in the device/extension list without publishing.
openblock-registry-cli buildOptional: Enable code obfuscation (minify, mangle, remove comments):
openblock-registry-cli build --obfuscateopenblock-registry-cli validateopenblock-registry-cli publishThis will:
- Run all validations
- Request your GitHub token (stored securely)
- Create a Pull Request to OpenBlock Registry
- Provide a PR link for tracking
Dry run (validate only, don't create PR):
openblock-registry-cli publish --dry-runGitHub Token Setup:
- Go to GitHub Settings > Developer settings > Personal access tokens
- Click "Generate new token (classic)"
- Select scopes:
repo(Full control of private repositories) - Generate and copy the token
- Set it using:
openblock-registry-cli config set github.token YOUR_TOKEN