@dg-eam/plugin-cli
v1.3.0
Published
Scaffolding, local sandbox testing, validation, and packaging for App Manager plugins.
Readme
App Manager plugin CLI
@dg-eam/plugin-cli creates, tests, and packages App Manager plugins.
CLI 1.3.0 generates projects pinned to SDK 1.6.0 and CLI 1.3.0.
Basic starters declare runtime 1.2.0. Plugins using entries.setStatus must
declare runtime 1.4.0 and run on an App Manager release that supports it.
Create
npx @dg-eam/[email protected] create my-plugin \
--template react \
--id com.example.my-plugin \
--name "My Plugin" \
--placement entry.editorWindows CMD (one line):
npx @dg-eam/[email protected] create my-plugin --template react --placement entry.editorVersion 1.1.0 or newer is required for --placement and supportedPlacements.
For an existing project, update its CLI with npm install --save-dev --save-exact @dg-eam/[email protected].
Use supportedPlacements: ["entry.editor", "menu.page"] in plugin.json; legacy locations manifests remain supported.
Supported templates:
reactvanilla
Supported placements:
entry.editormenu.page
The generated project uses @dg-eam/plugin-sdk and includes plugin.json,
build scripts, security headers, and local test commands.
Test locally
The local host includes an environment role selector for testing feature defaults and
read-only Viewer access. Feature declarations are validated during packaging.
Use the external-entry edit simulator to test onEntriesChange; it toggles the selected
fixture entry's publication status. No environment data is changed.
Role-based features and permissions.get require runtime 1.5.0 in plugin.json.
cd my-plugin
npm install
npx @dg-eam/[email protected] dev .The printed URL loads the production build with sample contexts, permissions, themes, locales, linked content, media, and common error states.
Useful options:
eam-plugin dev . --port 4300
eam-plugin dev . --placement entry.editor
eam-plugin dev . --deployment external
eam-plugin dev . --skip-buildPackage a managed plugin
npx @dg-eam/[email protected] package .Generated managed projects also support npm run package (npm run artifact remains an alias).
The command validates and builds the plugin, then creates a deterministic ZIP
and checksums under artifacts/. Upload the ZIP through Plugin Manager.
External plugin
npx @dg-eam/[email protected] create my-external-plugin \
--deployment external \
--connect-origin https://api.example.com \
--media-origin https://media.example.comDeclare only exact HTTPS origins. Deploy the production dist/ directory to
an immutable HTTPS URL and register that URL through Plugin Manager.
Commands
eam-plugin create <directory> [options]
eam-plugin dev [directory] [options]
eam-plugin package [directory] [options]Run eam-plugin --help for all options.
