Anypoint CLI With MuleSoft
Anypoint CLI is a command-line interface used with Anypoint Platform and Anypoint Platform PCE. Find out more about it in this article!
Join the DZone community and get the full member experience.
Join For FreeIntroduction
Anypoint CLI is a command-line interface used with Anypoint Platform and Anypoint Platform PCE. Anypoint CLI works with
- Runtime Manager
- Anypoint Exchange
- VPCs
- DLBs
- Design Center
- API Manager
- Access Management
Prerequisites
- Download and Install NodeJS
- Install npm package for Anypoint CLI using the below command.
$ npm install -g anypoint-cli
- Download and Install Git.
Anypoint CLI can be configured using one of the below authentication mechanism.
- Anypoint Username and Password with required access.
- Client ID and Client Secret. This can be generated using Connected Apps in the Anypoint Platform.
- Bearer Token.
Credentials File
It is recommended to create a credentials file within ~/.anypoint folder. This folder is not created automatically, and you need to create it at location C:/Users/Username in case of windows.
Add the below structure in your credentials file.
xxxxxxxxxx
{
"default": {
"username": "yourAnypointUserName",
"password": "yourAnypointPassword",
"organization": "",
"environment": "",
"host": ""
},
"otherProfile": {
"username": "",
"password": "",
"organization": "",
"environment": "",
"host": ""
},
"connAppProfile": {
"client_id": "",
"client_secret": "",
"organization": "",
"environment": "",
"host": ""
}
}
Provide correct credentials, organization, and environment details.
Here is the video tutorial explaining how to set up and access Anypoint CLI.
Anypoint CLI — Part I | Introduction and Installation | MuleSoft
Anypoint CLI — Part II | Deploying MuleSoft Application To CloudHub | Start and Stop
This video will explain how Anypoint CLI can perform the list of operations with Runtime Manager like start and stop applications, download application logs, deploy the application, etc.
Anypoint CLI — Part III | Anypoint VPC | MuleSoft
This video will explain how Anypoint CLI can perform the list of operations with Anypoint VPC like creating VPC, adding firewall rules, etc.
Anypoint CLI — Part IV | Anypoint Dedicated Load Balancer | MuleSoft
This video will explain how Anypoint CLI can perform the operations with Anypoint DLB like creating DLB, adding certificates and mapping rules, deleting the DLB, etc.
References
https://docs.mulesoft.com/runtime-manager/anypoint-platform-cli-commands
Now, you know how to set up and run Anypoint CLI.
Opinions expressed by DZone contributors are their own.
Comments