openblock-registry-cli
v1.0.6
Published
CLI tool for publishing plugins to OpenBlock Registry
Maintainers
Readme
OpenBlock Registry CLI
Command-line tool for building, validating, and publishing plugins to OpenBlock Registry
📖 Overview
OpenBlock Registry CLI is the official tool for OpenBlock plugin developers. It streamlines the entire plugin development lifecycle from scaffolding to publishing.
Key Features
- 🚀 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
📦 Installation
Prerequisites
- Node.js >= 14.0.0
- Git (for publishing)
- GitHub Account (for publishing)
Install Globally
npm install -g openblock-registry-cliOr use the short alias:
npm install -g openblock-registry-cli
# Then use 'obr' instead of 'openblock-registry-cli'Verify Installation
openblock-registry-cli --version
# or
obr --version🚀 Quick Start
1. Create a New Plugin
openblock-registry-cli initFollow the interactive prompts to generate your plugin scaffold.
2. Develop Your Plugin
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.
3. Build for Production
openblock-registry-cli buildOptional: Enable code obfuscation (minify, mangle, remove comments):
openblock-registry-cli build --obfuscate4. Validate Your Plugin
openblock-registry-cli validate5. Publish to Registry
openblock-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
