Anypoint CLI plugins for Anypoint Platform Private Cloud Edition manage business groups, roles, and federated identity settings, Design Center projects, Exchange assets and Maven dependencies, and API Manager registration, contracts, and policies. The CLI runs in the VS Code terminal and in other shells, including CI/CD jobs, against your Anypoint Platform Private Cloud Edition instance.
Install the CLI and confirm that it runs:
npm install -g anypoint-cli-v4-public
anypoint-cli-v4 --version
If the shell returns command not found, add npm’s global bin directory to your PATH.
Install the plugins that Anypoint Platform Private Cloud Edition supports:
anypoint-cli-v4 plugins:install anypoint-cli-account-plugin
anypoint-cli-v4 plugins:install anypoint-cli-api-manager-plugin
anypoint-cli-v4 plugins:install anypoint-cli-exchange-plugin
anypoint-cli-v4 plugins:install mulesoft-anypoint-cli-designcenter-plugin
To install the CLI from the offline package, unzip the Anypoint CLI installer and run the install script from that folder. The script installs the CLI and the plugins:
Run anypoint-cli-v4 plugins and confirm that all four plugins are listed.
Anypoint CLI runs on Node.js, which rejects an Anypoint Platform Private Cloud Edition TLS certificate it doesn’t recognize. Point Node.js at the certificate before you call the CLI.
On macOS or Linux, save the certificate and point Node.js at it:
echo | openssl s_client -connect pce.example.com:443 -showcerts 2>/dev/null | openssl x509 -outform PEM > anypoint.pem
export NODE_EXTRA_CA_CERTS=$(pwd)/anypoint.pem
Replace pce.example.com with your Anypoint Platform Private Cloud Edition host. Add the export line to your shell profile, such as ~/.zshrc, so new terminals and your coding agent pick it up.
On Windows, open your Anypoint Platform Private Cloud Edition URL in Chrome or Edge, view the site certificate, and export it as a Base64-encoded PEM file. Then point Node.js at it and restart VS Code:
setx NODE_EXTRA_CA_CERTS "C:\certs\anypoint.pem"
If your Anypoint Platform Private Cloud Edition certificate comes from an internal CA, set NODE_EXTRA_CA_CERTS to your organization’s root CA file instead.
Point the CLI at your Anypoint Platform Private Cloud Edition host, organization, environment, and connected app. Use the hostname only, without https://.
anypoint-cli-v4 conf host pce.example.com
anypoint-cli-v4 conf organization <root-org-id>
anypoint-cli-v4 conf client_id <your-client-id>
anypoint-cli-v4 conf client_secret <your-client-secret>
anypoint-cli-v4 conf session.selectedOrganization.id <your-org-id>
anypoint-cli-v4 conf session.selectedEnvironment.id <your-environment-id>
The CLI stores these values in its local config. The agent acts with the permissions of the connected app.
anypoint-cli-v4 account:business-group:list