1.0.0 • Published 3 years ago

@rezakalfane/dc-cli v1.0.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 years ago

dc-cli

Command line interface for Amplience Dynamic Content service.

Description

dc-cli is a command line interface application for Amplience Dynamic Content management APIs.

Run dc-cli to get a list of available commands

Installation

Installing the DC CLI from the NPM package manager can be achieved using the following command:

npm install -g @amplience/dc-cli

Or you can download the executable for your operating system on the releases page.

Configuration

dc-cli requires a valid set of Amplience client credentials (--clientId & --clientSecret) and hub ID (--hubId) to operate. These parameters must be set using the command dc-cli configure --clientId <YOUR_CLIENT_ID> --clientSecret <YOUR_CLIENT_SECRET> --hubId <YOUR_HUB_ID> before using the CLI.

Once the tool has been configured the individual parameters can be overwritten by supplying them when running any of the commands, e.g dc-cli <command> <action> --hubId <YOUR_HUB_ID>.

By default the configuration is saved to a file in the directory <HOME_DIR>/.amplience/, this can be overridden using the --config option.

See dc-cli configure --help for more information.

Usage

Building the CLI

We have included some NPM scripts to help create various installations of the CLI.

Required permissions

Outlined below are the detailed permissions required to run each command of the CLI. To request an API key to run the CLI, please contact Amplience support.

CommandRequired ACL(s)Required Functional Permission(s)
configureHub - READ
content-repositories get <id>Hub - READCONTENT:FUNCTIONAL:REPOSITORY:READ
content-repositories listHub - READCONTENT:FUNCTIONAL:REPOSITORY:READ
content-repositories assign-content-type <id>ContentRepository - EDITHub - READCONTENT:FUNCTIONAL:REPOSITORY:EDIT
content-repositories unassign-content-type <id>ContentRepository - EDITHub - READCONTENT:FUNCTIONAL:REPOSITORY:EDIT
content-type get <id>Hub - READCONTENT:FUNCTIONAL:CONTENT_TYPE:READ
content-type listHub - READCONTENT:FUNCTIONAL:CONTENT_TYPE:READ
content-type registerHub - READCONTENT:FUNCTIONAL:CONTENT_TYPE:CREATE
content-type sync <id>Hub - READCONTENT:FUNCTIONAL:CONTENT_TYPE:EDIT
content-type update <id>Hub - READCONTENT:FUNCTIONAL:CONTENT_TYPE:EDIT
content-type import <dir>ContentRepository - EDITHub - READCONTENT:FUNCTIONAL:CONTENT_TYPE:READCONTENT:FUNCTIONAL:CONTENT_TYPE:CREATECONTENT:FUNCTIONAL:CONTENT_TYPE:EDIT
content-type export <dir>Hub - READCONTENT:FUNCTIONAL:CONTENT_TYPE:READ
content-type-schema createHub - READCONTENT:FUNCTIONAL:CONTENT_TYPE:CREATE
content-type-schema get <id>Hub - READCONTENT:FUNCTIONAL:CONTENT_TYPE:READ
content-type-schema listHub - READCONTENT:FUNCTIONAL:CONTENT_TYPE:READ
content-type-schema update <id>Hub - READCONTENT:FUNCTIONAL:CONTENT_TYPE:EDIT
content-type-schema import <dir>Hub - READCONTENT:FUNCTIONAL:CONTENT_TYPE:READCONTENT:FUNCTIONAL:CONTENT_TYPE:CREATECONTENT:FUNCTIONAL:CONTENT_TYPE:EDIT