Skip to Content
🎉 New release with new features and improvements! V0.0.4 Release →

Plugins Commands

The plugins command enables to manage BSH Engine plugins from the command line.

generate

Generate a plugin from a template.

bsh plugins generate <plugin-dir> [options] # or bsh p g <plugin-dir> [options]
OptionDescriptionRequiredDefault
-n, --name <name>Name of the pluginnobshplugin
-p, --path <path>Path to the plugin directoryno./
-t, --template <template>Template to use for the pluginnobshengine.plugin.template 
-c, --cleanRemove samples filesnofalse

-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" ] }
bsh plugins generate manifest <name> # or bsh p g m <name>
ArgumentDescriptionRequiredDefault
<name>Name of the manifest directoryyes~
OptionDescriptionRequiredDefault
--target <target>Target Entitynoname argument
-d, --dependencies <dependencies>DependenciesnoBshEntities
-f, --forceOverride existing manifest directory if it existsnofalse

content

Generate a new content file inside a manifest directory

bsh plugins generate content <name> -m <manifest> # or bsh p g c <name> -m <manifest>
ArgumentDescriptionRequiredDefault
<name>Name of the content fileyes~
OptionDescriptionRequiredDefault
-m, --manifest <manifest>Manifest directory name where the file will be createdyes~
-e, --entity <entity>Entity name to get the JSON structure fromnomanifest option value
-f, --forceOverride existing content file if it existsnofalse
--skippromptsSkip interactive prompts and use default values onlynofalse
-h, --helpdisplay help for commandnofalse

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.

bsh plugins install <plugin-dir> [options] # or bsh p i <plugin-dir> [options]
ArgumentDescriptionRequiredDefault
<plugin-dir>Path to the plugin directoryyes~
OptionDescriptionRequiredDefault
-h, --host <host>BSH Engine host URLyes~
-k, --api-key <key>BSH Engine API keyyes~
--no-verboseDisable verbose output (default: verbose enabled)nofalse

Usage Example:

bsh plugins install ./path/to/plugin \ --host https://instance-host.com \ --api-key <api-key>

validate

Validate the plugin.

bsh plugins validate <plugin-dir> [options] # or bsh p v <plugin-dir> [options]
ArgumentDescriptionRequiredDefault
<plugin-dir>Path to the plugin directoryyes~