# @amp-nova/amp-rsa-cli

> AMP-RSA Demo Automation

Latest version **0.2.21** (published 2022-03-14) · ISC license · 0 weekly downloads

## Install

```sh
npm install @amp-nova/amp-rsa-cli
pnpm add @amp-nova/amp-rsa-cli
yarn add @amp-nova/amp-rsa-cli
bun add @amp-nova/amp-rsa-cli
```

Provides the command `amprsa`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.21 |
| Published | 2022-03-14 |
| First published | 2022-02-02 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 22 |
| Unpacked size | 392.6 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Amplience Innovation Team |
| Maintainers | dlillyatx |
| Keywords | CLI, automation, demo |

## Links

- npm: https://www.npmjs.com/package/@amp-nova/amp-rsa-cli
- Repository: https://github.com/amp-nova/amp-rsa-cli
- Homepage: https://github.com/amp-nova/amp-rsa-cli#readme
- Issues: https://github.com/amp-nova/amp-rsa-cli/issues
- npm.io page: https://npm.io/package/@amp-nova/amp-rsa-cli

## Dependencies (22)

- [ajv](https://npm.io/package/ajv.md) ^8.10.0
- [async](https://npm.io/package/async.md) ^3.2.2
- [axios](https://npm.io/package/axios.md) ^0.26.0
- [chalk](https://npm.io/package/chalk.md) ^4.1.0
- [yargs](https://npm.io/package/yargs.md) ^17.3.1
- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [nanoid](https://npm.io/package/nanoid.md) ^3.3.1
- [rimraf](https://npm.io/package/rimraf.md) ^3.0.2
- [winston](https://npm.io/package/winston.md) ^3.6.0
- [enquirer](https://npm.io/package/enquirer.md) ^2.3.6
- [fs-extra](https://npm.io/package/fs-extra.md) ^10.0.1
- [cli-table](https://npm.io/package/cli-table.md) ^0.3.11
- [handlebars](https://npm.io/package/handlebars.md) ^4.7.6
- [node-fetch](https://npm.io/package/node-fetch.md) ^3.2.0
- [simple-git](https://npm.io/package/simple-git.md) ^3.2.6
- [promise-retry](https://npm.io/package/promise-retry.md) ^2.0.1
- [http-status-codes](https://npm.io/package/http-status-codes.md) ^2.2.0
- [nanoid-dictionary](https://npm.io/package/nanoid-dictionary.md) ^4.3.0
- [@rauschma/stringio](https://npm.io/package/@rauschma/stringio.md) ^1.4.0
- [isomorphic-unfetch](https://npm.io/package/isomorphic-unfetch.md) ^3.1.0
- [dc-management-sdk-js](https://npm.io/package/dc-management-sdk-js.md) ^1.14.0
- [@justindfuller/async-lodash](https://npm.io/package/@justindfuller/async-lodash.md) ^1.0.9

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 0.2.21 (latest) — 2022-03-14
- 0.2.20 — 2022-03-14
- 0.2.19 — 2022-03-14
- 0.2.18 — 2022-03-11
- 0.2.17 — 2022-03-02
- 0.2.16 — 2022-03-02
- 0.2.15 — 2022-03-02
- 0.2.14 — 2022-03-02
- 0.2.13 — 2022-03-02
- 0.2.12 — 2022-03-01
- 0.2.11 — 2022-03-01
- 0.2.10 — 2022-03-01
- 0.2.9 — 2022-02-28
- 0.2.8 — 2022-02-28
- 0.2.7 — 2022-02-24
- … 7 more at https://npm.io/package/@amp-nova/amp-rsa-cli/versions

## README

# amprsa

Command line interface for Amplience Reference Storefront Architecture.

## Description

**amprsa** is a command line interface application to manage an installation of the Amplience Reference Storefront Architecture (amprsa).

Run `amprsa --help` to get a list of available commands.

<!-- MarkdownTOC levels="2,3" autolink="true" -->
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Configuration](#configuration)
- [Command categories](#command-categories)
  - [using an amprsa environment](#using-an-amprsa-environment)
  - [env management](#env)
- [Configure your own Automated Content](#automation-bespoke)

<!-- /MarkdownTOC -->



## Installation

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

```bash
npm install -g @amp-nova/amp-rsa-cli
```
<!--TODD: Change to Amplience NPM -->

## Configuration

**amprsa** requires an AMPRSA environment configuration to run.

### PreRequisites
- Amplience account ( Think about what we say here)
- Details and where to get then from.
  - hub name (Env)
  - App URL - link to RSA-CORE
  - Client ID / Secret - Sent via support@amplience.com - One Time Secret
  - Hub ID - Screenshot of DC / Settings page
  - Username & Password for Content Hub - Automate VSE details.

On your first invocation of any `amprsa` command, the CLI will prompt you to create an environment:



```bash
dave@po:~ $ amprsa env add
✔ env name: foo
✔ app deployment url: https://foo.baz.com
✔ cms client id: amplience-client-id
✔ cms client secret: ***********************
✔ cms hub id: hub-id-from-hub-settings-properties
✔ dam username: foo@baz.com
✔ dam password: *****************
info: [ foo ] configure dc-cli...
info: [ foo ] environment active
```

You will set these to the values you received from Amplience Support when you created your account.

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

### Options

| Option Name    | Type                                                       | Description                                                  |
| -------------- | ---------------------------------------------------------- | ------------------------------------------------------------ |
| --version      | [boolean]                                                  | Show version number                                          |
| --config       | [string]<br />[default: "~/.amplience/dc-cli-config.json"] | Path to JSON config file                                     |
| --help         | [boolean]                                                  | Show help                                                    |

## Command categories

### using an amprsa environment

- [Commands](#commands)
  - [show](#show)
  - [env](#env)
  - [import](#import)
  - [cleanup](#cleanup)
  - [publish](#publish)
  
  

<!-- /MarkdownTOC -->

## Common Options

The following options are available for all **content-type-schema** commands.

| Option Name    | Type                                                       | Description                      |
| -------------- | ---------------------------------------------------------- | -------------------------------- |
| --version      | [boolean]                                                  | Show version number              |
| --help         | [boolean]                                                  | Show help                        |

## Commands

### cleanup

Clean a hub.

#### Options

| Option Name               | Type          | Description                                          |
| ------------------------- | ------------- | ---------------------------------------------------- |
| --logRequests, -r         | [boolean]     | log http requests/responses                          |
| --tempDir, -t             | [string]      | temp dir for run files                               |
| --matchingSchema, -m      | [array]       | apply to (types, schemas, items) matching schema id  |
| --include, -i             | [array]       | types to include                                     |
| --skipConfirmation, -c    | [boolean]     | don't ask for confirmation                           |
| --all, -a                 | [boolean]     | clean up all resource types                          |

Valid resource types are `contentTypeSchema`, `contentTypes`, `contentItems`, `searchIndexes`, `extensions`, `webhooks`, and `events`.

#### Examples

##### Clean a hub

```amprsa cleanup```

##### Clean content types, schemas, and items without asking for confirmation

```amprsa cleanup -ci contentTypes -i contentTypeSchema -i contentItems```

### import

Import data.

#### Options

| Option Name               | Type          | Description                                          |
| ------------------------- | ------------- | ---------------------------------------------------- |
| --logRequests, -r         | [boolean]     | log http requests/responses                          |
| --tempDir, -t             | [string]      | temp dir for run files                               |
| --matchingSchema, -m      | [array]       | apply to (types, schemas, items) matching schema id  |
| --automationDir, -a       | [string]      | path to import directory                             |
| --skipContentImport, -s   | [boolean]     | skip content import                                  |
| --latest, -l              | [boolean]     | using this flag will download the latest automation  |

#### Examples

##### Import the latest automation data

```amprsa import -l```

##### Import only items matching schema 'schema'

```amprsa import -m <schema>```

### publish

Publish all unpublished content items.

#### Options

| Option Name               | Type          | Description                                          |
| ------------------------- | ------------- | ---------------------------------------------------- |
| --logRequests, -r         | [boolean]     | log http requests/responses                          |
| --tempDir, -t             | [string]      | temp dir for run files                               |
| --matchingSchema, -m      | [array]       | apply to (types, schemas, items) matching schema id  |

#### Examples

##### Publish

```amprsa publish```

### show

Show the status of an amprsa environment.

#### Examples

```amprsa show```

### env

This category includes interactions with environments.

[View commands for **env**](docs/env.md)

---
_Source: https://npm.io/package/@amp-nova/amp-rsa-cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
