Plugins Commands
The plugins command enables to manage BSH Engine plugins from the command line.
generate
Generate a plugin from a template.
npm
bsh plugins generate <plugin-dir> [options]
# or
bsh p g <plugin-dir> [options]| Option | Description | Required | Default |
|---|---|---|---|
-n, --name <name> | Name of the plugin | no | bshplugin |
-p, --path <path> | Path to the plugin directory | no | ./ |
-t, --template <template> | Template to use for the plugin | no | bshengine.plugin.template |
-c, --clean | Remove samples files | no | false |
-template none allows you to generate a minimal plugin (only bshplugin.json file).
manifest
Generate a new manifest directory
this cmd will generate a new directory with specified name and will create a __manifest__.json file inside it.
{
"target": "<target-entity>",
"dependencies": [
"BshEntities"
]
}npm
bsh plugins generate manifest <name>
# or
bsh p g m <name>| Argument | Description | Required | Default |
|---|---|---|---|
<name> | Name of the manifest directory | yes | ~ |
| Option | Description | Required | Default |
|---|---|---|---|
--target <target> | Target Entity | no | name argument |
-d, --dependencies <dependencies> | Dependencies | no | BshEntities |
-f, --force | Override existing manifest directory if it exists | no | false |
content
Generate a new content file inside a manifest directory
npm
bsh plugins generate content <name> -m <manifest>
# or
bsh p g c <name> -m <manifest>| Argument | Description | Required | Default |
|---|---|---|---|
<name> | Name of the content file | yes | ~ |
| Option | Description | Required | Default |
|---|---|---|---|
-m, --manifest <manifest> | Manifest directory name where the file will be created | yes | ~ |
-e, --entity <entity> | Entity name to get the JSON structure from | no | manifest option value |
-f, --force | Override existing content file if it exists | no | false |
--skipprompts | Skip interactive prompts and use default values only | no | false |
-h, --help | display help for command | no | false |
When creating a content file, the cmd will ask you for some content of the file, you can skip this by using the --skipprompts option.
Available entities to use with --entity option:
- BshEntities
- BshSchemas
- BshTypes
- BshRoles
- BshPolicies
- BshTriggers
- BshEmailTemplates
install
Install a plugin from a directory.
npm
bsh plugins install <plugin-dir> [options]
# or
bsh p i <plugin-dir> [options]| Argument | Description | Required | Default |
|---|---|---|---|
<plugin-dir> | Path to the plugin directory | yes | ~ |
| Option | Description | Required | Default |
|---|---|---|---|
-h, --host <host> | BSH Engine host URL | yes | ~ |
-k, --api-key <key> | BSH Engine API key | yes | ~ |
--no-verbose | Disable verbose output (default: verbose enabled) | no | false |
Usage Example:
npm
bsh plugins install ./path/to/plugin \
--host https://instance-host.com \
--api-key <api-key>validate
Validate the plugin.
npm
bsh plugins validate <plugin-dir> [options]
# or
bsh p v <plugin-dir> [options]| Argument | Description | Required | Default |
|---|---|---|---|
<plugin-dir> | Path to the plugin directory | yes | ~ |