Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
@amplience/dc-cli
Advanced tools
Command line interface for Amplience Dynamic Content service.
dc-cli is a command line interface application for Amplience Dynamic Content management APIs.
Run dc-cli --help
to get a list of available commands.
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.
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.
Some commands (content-item copy
, content-item move
, & hub-clone
) enable the export and import of content with a single command. These take additional options for the client credentials (--dstClientId
& --dstSecret
) and hub ID (--dstHubId
) of a distinct Dynamic Content hub. If no destination options are provided, the destination for these commands will be the same as the source.
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.
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. |
--dstHubId | [string] | Destination hub ID. If not specified, it will be the same as the source. |
--dstClientId | [string] | Destination account's client ID. If not specified, it will be the same as the source. |
--dstSecret | [string] | Destination account's secret. Must be used alongside dstClientId. |
dc-cli configure --clientId foo --clientSecret bar --hubId baz
dc-cli configure --clientId foo --clientSecret bar --hubId baz --dstClientId qux --dstSecret quux --dstHubId quuz
hub
commandUsing the hub subcommand, you can save hub configurations for retrieval later.
This command adds a hub with the supplied credentials:
dc-cli hub add --clientId <clientId> --clientSecret <clientSecret> --hubId <hubId>
Then, to use the hub, you can refer to it by name or part of the hub ID:
dc-cli hub use <hubIdOrName>
This category includes interactions with content type schemas.
These commands can be used to retrieve information on one or more schemas, create new schemas, export and import schemas from an individual hub, as well as archiving and unarchiving schemas.
View commands for content-type-schema
This category includes interactions with content types.
These commands can be used to retrieve information on one or more types, register new types or update existing ones, export and import types from an individual hub, as well as archiving and unarchiving types.
Before importing content types you must ensure that a valid content type schema exists in the destination hub for each type.
View commands for content-type
This category includes interactions with content items.
These commands can be used to export and import content from an individual hub, copy and move items between hubs, as well as archiving and unarchiving content.
Before importing, copying, or moving content you must ensure that a valid content type exists in the destination hub for each content item.
View commands for content-item
This category includes interactions with Dynamic Content's UI Extensions, and can be used to export and import extensions from an individual hub.
This category includes interactions with Algolia search indexes for Dynamic Content, and can be used to export and import indexes from an individual hub.
View commands for search-index
This category includes interactions with Dynamic Content's repositories.
These commands can be used to get details for a specific repository, list multiple repositories, or assign or unassign content types from a repository.
View commands for content-repository
This category includes interactions with Dynamic Content's events and its constituent parts (Editions, Slots, and Snapshots). These commands can be used to export and import events, and to archive events.
This category includes interactions with the supporting properties of a Dynamic Content hub. These commands can be used to export and import a hub's breakpoint settings for visualization, preview applications, workflow states, and locales.
This category includes interactions with Dynamic Content's hubs in their entirety.
These commands can be used to copy a hub's settings and content in their entirety to another hub, or to archive all parts of a hub which can be archived.
Additionally, these commands may be used to store and retrieve hub configurations.
We have included some NPM scripts to help create various installations of the CLI.
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.
Command | Required ACL(s) | Required Functional Permission(s) |
---|---|---|
configure | Hub - READ | |
content-repositories get <id> | Hub - READ | CONTENT:FUNCTIONAL:REPOSITORY:READ |
content-repositories list | Hub - READ | CONTENT:FUNCTIONAL:REPOSITORY:READ |
content-repositories assign-content-type <id> | ContentRepository - EDIT Hub - READ | CONTENT:FUNCTIONAL:REPOSITORY:EDIT |
content-repositories unassign-content-type <id> | ContentRepository - EDIT Hub - READ | CONTENT:FUNCTIONAL:REPOSITORY:EDIT |
content-type get <id> | Hub - READ | CONTENT:FUNCTIONAL:CONTENT_TYPE:READ |
content-type list | Hub - READ | CONTENT:FUNCTIONAL:CONTENT_TYPE:READ |
content-type register | Hub - READ | CONTENT:FUNCTIONAL:CONTENT_TYPE:CREATE |
content-type sync <id> | Hub - READ | CONTENT:FUNCTIONAL:CONTENT_TYPE:EDIT |
content-type update <id> | Hub - READ | CONTENT:FUNCTIONAL:CONTENT_TYPE:EDIT |
content-type import <dir> | ContentRepository - EDIT Hub - READ | CONTENT:FUNCTIONAL:CONTENT_TYPE:READ CONTENT:FUNCTIONAL:CONTENT_TYPE:CREATE CONTENT:FUNCTIONAL:CONTENT_TYPE:EDIT |
content-type export <dir> | Hub - READ | CONTENT:FUNCTIONAL:CONTENT_TYPE:READ |
content-type-schema create | Hub - READ | CONTENT:FUNCTIONAL:CONTENT_TYPE:CREATE |
content-type-schema get <id> | Hub - READ | CONTENT:FUNCTIONAL:CONTENT_TYPE:READ |
content-type-schema list | Hub - READ | CONTENT:FUNCTIONAL:CONTENT_TYPE:READ |
content-type-schema update <id> | Hub - READ | CONTENT:FUNCTIONAL:CONTENT_TYPE:EDIT |
content-type-schema import <dir> | Hub - READ | CONTENT:FUNCTIONAL:CONTENT_TYPE:READ CONTENT:FUNCTIONAL:CONTENT_TYPE:CREATE CONTENT:FUNCTIONAL:CONTENT_TYPE:EDIT |
FAQs
Dynamic Content CLI Tool
The npm package @amplience/dc-cli receives a total of 1,754 weekly downloads. As such, @amplience/dc-cli popularity was classified as popular.
We found that @amplience/dc-cli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 13 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.