@object-ui/create-plugin
v17.6.0
Published
CLI tool to scaffold ObjectUI plugins
Maintainers
Readme
@object-ui/create-plugin
CLI tool to quickly scaffold new ObjectUI plugins with best practices.
Usage
# Using pnpm
pnpm create @object-ui/plugin my-plugin
# Using npm
npm create @object-ui/plugin my-plugin
# Using npx
npx @object-ui/create-plugin my-pluginWhat Gets Generated
The tool creates a complete plugin package structure:
packages/plugin-my-plugin/
├── src/
│ ├── index.tsx # Plugin export & registration
│ ├── MyPluginImpl.tsx # Component implementation
│ ├── MyPluginImpl.test.tsx # Tests
│ └── types.ts # Schema definitions
├── package.json
├── tsconfig.json
├── vite.config.ts
├── vitest.setup.ts # Registers the jest-dom matchers
└── README.mdFeatures
- ✅ TypeScript support out of the box
- ✅ Vite build configuration
- ✅ Component registration with ComponentRegistry
- ✅ Runnable Vitest setup — jsdom environment, Testing Library and the jest-dom
matchers are all declared, so
pnpm testis green on the first run - ✅ Proper package.json with workspace dependencies
- ✅ README template
- ✅ Type definitions
Interactive Mode
Run without arguments for interactive prompts:
pnpm create @object-ui/pluginYou'll be prompted for:
- Plugin name
- Description
- Author name
Options
pnpm create @object-ui/plugin my-plugin --description "My awesome plugin" --author "Your Name"After Creation
Navigate to the plugin directory:
cd packages/plugin-my-pluginInstall dependencies:
pnpm installBuild the plugin:
pnpm buildRun tests:
pnpm test
Links
License
MIT — see LICENSE.
