Skip to content

Latest commit

 

History

History
113 lines (70 loc) · 6.04 KB

File metadata and controls

113 lines (70 loc) · 6.04 KB

extension

Description

The extension command category includes a number of interactions with Dynamic Content's UI Extensions, and can be used to export and import extensions from an individual hub.

Run dc-cli extension --help to get a list of available commands.

Return to README.md for information on other command categories.

Common Options

The following options are available for all extension commands.

Option Name Type Description
--version [boolean] Show version number
--clientId [string]
[required]
Client ID for the source hub
--clientSecret [string]
[required]
Client secret for the source hub
--hubId [string]
[required]
Hub ID for the source hub
--config [string]
[default: "~/.amplience/dc-cli-config.json"]
Path to JSON config file
--help [boolean] Show help
--logFile [string]
[default: (generated-value)]
Path to a log file to write to.

Commands

export

Exports extensions from the targeted Dynamic Content hub into the specified filesystem location.

dc-cli extension export <dir>

Options

Option Name Type Description
--id [string] The ID of an Extension to be exported.
If no --id option is given, all extensions for the hub are exported.
A single --id option may be given to export a single extension.
Multiple --id options may be given to export multiple extensions at the same time.
-f
--force
[boolean] Overwrite extensions without asking.
--logFile [string]
[default: (generated-value)]
Path to a log file to write to.

Examples

Export all extensions from a Hub

dc-cli extension export ./myDirectory/extension

Export extensions with IDs of 'foo' & 'bar'

dc-cli extension export ./myDirectory/extension --id foo --id bar

import

Imports extensions from the specified filesystem location to the targeted Dynamic Content hub.

dc-cli extension import <dir>

Options

The import command only uses [common options](#Common Options)

Examples

Import extensions from the filesystem

dc-cli extension import ./myDirectory/extension

delete

Deletes extensions from the targeted Dynamic Content hub.

dc-cli extension delete

Options

Option Name Type Description
--id [string] The ID of an Extension to be deleted.
If no --id option is given, all extensions for the hub are deleted.
A single --id option may be given to delete a single extension.
Multiple --id options may be given to delete multiple extensions at the same time.
-f
--force
[boolean] Delete extensions without asking.
--logFile [string]
[default: (generated-value)]
Path to a log file to write to.

Examples

Delete all extensions from a Hub

dc-cli extension delete

Delete a single extension with the ID of 'foo'

dc-cli extension delete foo

or

dc-cli extension delete --id foo

Delete multiple extensions with the IDs of 'foo' & 'bar'

dc-cli extension delete --id foo --id bar