- Provides a facility to developers to use the new Agility Management API more effectively.
- Provides features to perform operations to login to agility instance, pull the instance, push the instance and clone the instance (coupling of push and pull operations).
- Provides logs on failed records for content and pages.
- Ability to generate Content and Pages in bulk for a Website.
- Deleted Content, Pages, Models, Containers and Assets were not processed from the CLI.
- To install the cli locally using npm, open terminal and type:
npm i @agility/cli
. - For global installation using npm, open terminal and type:
npm i @agility/cli -g
.
- To install the cli locally using yarn, open terminal and type:
yarn add @agility/cli
. - For global installation using yarn, open terminal and type:
yarn global add @agility/cli
.
- Login to agility instance using command
agility login
. - A browser window will appear to perform the authentication process. You may have to authorize before proceeding.
- Once authenticated use the following steps to perform operations on your instance.
- You should be a Org Admin or have a Manager Role in an instance to perform operations in the CLI.
- To pull an instance use the command
agility pull --guid="<<Provide Guid of your Instance>>" --locale="<<Provide the locale of the Instance>>" --channel="<<Provide the channel to be pulled>>"
to pull an instance. - To push an instance use the command
agility push --guid="<<Provide the target Instance guid>> --locale="<<Provide the locale of the Instance>>"
- For instance cloning, this command is a mix of push and pull. Use the command
agility clone --sourceGuid="<<Provide Guid of your source Instance>>" --targetGuid="<<Provide the target Instance guid>>" --locale="<<Provide the locale of the Instance>>" --channel="<<Provide the channel to be cloned>>"
to perform cloning between instances. - To sync Models use the command
agility sync-models --sourceGuid="<<Guid of your source instance>>" --targetGuid="<<Guid of your target Instance>>"
- To access the error logs, navigate to .agility-files/logs/instancelog.txt
- If a pull or clone instance is initiated, a local folder .agility-files is created.
- Assets are saved inside the assets folder which consists of a json folder which has the metadata of the assets downloaded. The folder structure is .agility-files/assets/json for metadata. Rest assets are present inside the assets folder.
- Galleries are saved inside the .agility-files/assets/galleries in a json format which is the metadata of the galleries of your source instance.
- Containers metadata is present inside .agility-files/containers folder.
- For example, if the locale is en-us, then the Pages and Content metadata is present inside the folder .agility-files/en-us/item for Content and .agility-files/en-us/pages. These are the base folders to create Content and Pages to perform CLI push/clone. There are other folders created i.e. list, nestedsitemap, page, sitemap, state and urlredirections, which are not used by the CLI but are part of pull operation.
- Models metadata is present inside .agility-files/models folder.
- Templates metadata is present inside .agility-files/templates folder.
If you have feedback or questions about this starter, please use the Github Issues on this repo, join our Community Slack Channel or create a post on the Agility Developer Community.