The DXP CLI
The Component Service uses the DXP CLI tool for deploying your components to the DXP, as well as running a local development server for building a new component locally.
Install the DXP CLI
The DXP CLI tool is installed using Node Package Manager (NPM).
To install the local DXP CLI
-
Launch or switch to your development system’s command shell.
-
Run the following command
npm i -g @squiz/dxp-cli-nextThe
-gswitch installs the DXP CLI tool globally.It is recommended that the CLI tool be installed globally rather than per project, as the developer tools will need to be in sync with the server version.
You can not use different versions with different projects.
Confirm the DXP CLI has installed successfully.
To test the installation has worked
-
Launch or switch to your development system’s command shell.
-
Run the following command
dxp-next -hA list of available DXP CLI commands should be returned:
Usage: dxp-next [options] [command] dxp-next commands Options: -V, --version output the version number -h, --help display help for command Commands: auth Authenticate into the DXP-Next CLI cmp Component Service Commands job-runner Job Runner Service Commands datastore Datastore Service Commands cdp Customer Data Platform Service Commands
Confirm the component service is enabled
Use the DXP CLI to confirm the Component Service is enabled.
-
To confirm this, run the following command:
dxp-next cmp -hIf the Component service is enabled, the command will return a list of available Component Service commands:
$ dxp-next cmp -h Usage: dxp-next cmp [options] [command] Component Service Commands Options: -h, --help display help for command Commands: deploy [options] <source> dev [options] <source> A local component runner for developing new components dev-ui [options] <source> A local component UI for developing new components init [options] <path> Create a new component from a template help [command] display help for commandIf you do not have the Component Service available in the DXP, contact Customer Success.
Next Step: Create the component files.