The Anypoint CLI API Manager Plugin is an oclif-based command-line interface extension for interacting with MuleSoft's Anypoint Platform API Manager. It provides commands to manage APIs, environments, and related resources directly from the terminal, making it suitable for scripting and automation of API lifecycle tasks within the Anypoint Platform ecosystem. The package is currently at version 1.4.3 and appears to be actively maintained, following standard npm release cycles for updates. Its primary differentiator is providing direct, programmatic control over the API Manager via a standardized CLI, integrating seamlessly into CI/CD pipelines and developer workflows that leverage the Anypoint Platform. It ships with TypeScript types, suggesting potential for programmatic interaction for advanced use cases, though its main interface is the command line.
npm install anypoint-cli-api-mgr-pluginVerified import paths — ran on the pinned version, not inferred.
Demonstrates global installation and usage of a command (`api-mgr:api:list`) with environment variables for authentication and target host configuration.
Before running tests (e.g., `npm run test`), execute `unset ANYPOINT_HOST` in your terminal session.
Use `npm run buildAndRun -- <command>` to automatically rebuild the code before executing a command, or manually run `npm run build` after each code change.
Add `"sourceMap": true` to the `compilerOptions` section of both `tsconfig.json` and `tsconfig.lib.json`.
Prefer setting `ANYPOINT_USERNAME` and `ANYPOINT_PASSWORD` environment variables instead of passing credentials directly as command-line arguments.
Provide `--username 'your-user'` and `--password 'your-pass'` flags, or set `export ANYPOINT_USERNAME='your-user'` and `export ANYPOINT_PASSWORD='your-pass'`.
Add the `--host` flag with the correct Anypoint host (e.g., `--host qax.anypoint.mulesoft.com`), or set `export ANYPOINT_HOST='your-host.mulesoft.com'`.
Verify the command spelling, ensure the plugin is globally installed (`npm install -g @mulesoft/anypoint-cli-api-mgr-plugin`), or if developing locally, ensure `npm run build` has been executed.