Registry / devops / anypoint-cli-api-manager-plugin

anypoint-cli-api-manager-plugin

JSON →
library1.4.4jsnpmunverified

An oclif-based plugin for MuleSoft Anypoint CLI that provides commands to manage API Manager resources (e.g., list, create, update APIs). Version 1.4.4, stable but low activity; integrated with @mulesoft/anypoint-cli. Differentiators: extends the official MuleSoft CLI with API Manager-specific operations; supports authentication via environment variables or CLI flags; requires Node >=16.

npm install anypoint-cli-api-manager-plugin
INSTALL
IMPORT
SIG · ANYPOINT-CLI-API-M
A
anypoint-cli-api-manager-plugin
devopsjavascriptv1.4.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import plugin from '@mulesoft/anypoint-cli-api-mgr-plugin'
const plugin = require('anypoint-cli-api-manager-plugin')
Package is scoped under @mulesoft; npm name differs from import package name.
APIMgrCommand
import { APIMgrCommand } from '@mulesoft/anypoint-cli-api-mgr-plugin'
import { APIMgrCommand } from 'anypoint-cli-api-manager-plugin'
Named export for base command class; use scoped package name.
run
import { run } from '@mulesoft/anypoint-cli-api-mgr-plugin'
const { run } = require('anypoint-cli-api-manager-plugin')
CommonJS require works but ESM import is preferred.

Programmatically list APIs in an Anypoint environment using environment variables for authentication.

import { run } from '@mulesoft/anypoint-cli-api-mgr-plugin'; // Set environment variables or pass flags process.env.ANYPOINT_USERNAME = 'your-username' ?? ''; process.env.ANYPOINT_PASSWORD = 'your-password' ?? ''; process.env.ANYPOINT_ENVIRONMENT = 'Sandbox'; // Run a command programmatically await run(['api-mgr:api:list', '--environment', process.env.ANYPOINT_ENVIRONMENT]);
Debug
Known issues
gotchaPackage name mismatch: npm registry name is 'anypoint-cli-api-manager-plugin', but import path is '@mulesoft/anypoint-cli-api-mgr-plugin'.
fix
Use @mulesoft/anypoint-cli-api-mgr-plugin for imports and installation.
affects: *
deprecatedPlugin is designed for oclif v1; may not work with oclif v2+ without updates.
fix
Check compatibility with @oclif/core v2 and update if needed.
affects: >=1.0.0
gotchaSetting ANYPOINT_HOST environment variable can break tests because nocks are tied to default URI.
fix
Unset ANYPOINT_HOST before running tests: unset ANYPOINT_HOST.
affects: *
Errors
Common errors & fixes
Error: Cannot find module '@mulesoft/anypoint-cli-api-mgr-plugin'
Installed wrong package name 'anypoint-cli-api-manager-plugin' instead of scoped package.
fix
npm install @mulesoft/anypoint-cli-api-mgr-plugin
Error: oclif plugin not loaded
Plugin installed globally but not linked to @mulesoft/anypoint-cli.
fix
Ensure @mulesoft/anypoint-cli is installed and run 'anypoint plugins:link .' from plugin directory.
Upgrade
Version history
1.4.4latest on npm
Audit
Dependencies
@oclif/corerequiredPlugin framework for building CLI commands
@mulesoft/anypoint-clirequiredParent CLI that loads the plugin
Agent activity
13 hits · last 30 days
node
10
OpenAI (training)
1
Resources