joget-plugin-cli
v1.0.2
Published
A command-line tool for scaffolding and initializing Joget plugins with ease.
Readme
Joget Plugin CLI
A command-line tool for scaffolding and initializing Joget plugins with ease.
Installation
Install globally via npm:
npm install -g joget-pluginOr install locally in your project:
npm install joget-pluginUsage
Initialize a New Plugin
Create a new Joget plugin with an interactive setup wizard:
joget-plugin initThe CLI will prompt you for:
- Package name - The Java package name for your plugin (e.g.,
com.example.myplugin) - Plugin folder name - The directory name for your new plugin project
- Joget dependency version - The Joget platform version to target (default:
8.0-SNAPSHOT) - Plugin type - The type of plugin you want to create
Supported Plugin Types
Note: Currently, templates are available for Datalist Action Plugin, Form Field Element Plugin, and Web Service Plugin. Templates for other plugin types will be provided in future releases.
- Audit Trail Plugin
- Create App Option
- Custom Builder Plugin
- Datalist Action Plugin
- Datalist Binder Plugin
- Datalist Column Formatter Plugin
- Deadline Plugin
- Decision Tool Plugin
- Directory Manager Plugin
- Form Field Element Plugin
- Form Load/Options/Store Binder Plugin
- Form Validator Plugin
- Generator Plugin
- Hash Variable Plugin
- List Filter Type Plugin
- Multi Factor Authenticator Plugin
- Process Form Modifier Plugin
- Process Participant Plugin
- Process Tool & Post Form Submission Processing Plugin
- Tensorflow Helper Plugin
- Userview Menu Plugin
- Userview Permission/ Form Permission Plugin
- Userview Theme Plugin
- Web Service Plugin
What Gets Created
After running init, the CLI will:
- Execute the Joget
create-plugin.batscript to generate the Maven/Gradle project structure - Apply a plugin-type-specific template with boilerplate code
- Initialize a Git repository for version control
- Make an initial commit
The generated plugin project will include:
- Main plugin class (
Activator.java) - Plugin implementation class (
CLASS_NAME.java) - Resource files (properties, messages, templates)
- Build configuration (Maven/Gradle)
Prerequisites
- Node.js (v14 or higher)
- Java Development Kit (JDK) (Java 8 or higher, depending on Joget version)
- Maven or Gradle for building the plugin
- create-plugin.bat (provided by Joget) - The CLI will prompt for its location if not found in PATH
Example Workflow
# Install globally
npm install -g joget-plugin
# Create a new plugin
joget-plugin init
# Follow the interactive prompts:
# Package name: com.example.myplugin
# Plugin folder name: my-datalist-plugin
# Joget dependency version: 8.0-SNAPSHOT
# Plugin type: Datalist Action Plugin
# Navigate to your new plugin
cd my-datalist-plugin
# Build the plugin
mvn clean package
# Deploy to your Joget instanceDevelopment
Project Structure
├── bin/ # CLI entry point
├── commands/ # Command implementations
├── templates/ # Plugin type templates
├── utils/ # Utility functions
└── package.json # Project metadataDependencies
- commander - CLI framework
- inquirer - Interactive prompts
- fs-extra - File system utilities
- execa - Process execution
Building from Source
# Clone the repository
git clone <repository-url>
cd joget-plugin-cli
# Install dependencies
npm install
# Link for local testing
npm link
# Run the CLI
joget-plugin initTroubleshooting
create-plugin.bat not found
The CLI will prompt you for the path to create-plugin.bat if it's not found in your system PATH. This is typically located in your Joget installation directory.
Permission Denied (Linux/macOS)
If you encounter permission issues, try:
chmod +x bin/joget-plugin.jsPlugin Template Not Applied
Ensure your Joget dependency version matches the available templates. Check the templates/ folder for supported plugin types.
Contributing
Contributions are welcome! Please submit issues and pull requests to improve the Joget Plugin CLI.
License
This project is part of the Joget ecosystem. Please refer to the main Joget project for licensing information.
Support
For issues, questions, or feature requests, please visit the Joget Community.
