The SwaggerHub CLI is a command-line interface tool designed to enable automation and streamline workflows around SwaggerHub. It allows teams to integrate API lifecycle management directly into their CI/CD pipelines, supporting operations such as creating new APIs, updating existing API versions, and managing API states (e.g., marking versions as published or default). The current stable version is `0.11.0`. The package exhibits an active release cadence, with minor versions frequently introducing new features and improvements, often leveraging the `oclif` framework. Its primary differentiator is providing robust command-line access to SwaggerHub functionalities, making it ideal for programmatic API management and governance.
npm install swaggerhub-cliVerified import paths — ran on the pinned version, not inferred.
Installs the CLI globally, demonstrates interactive configuration or environment variable setup, and runs basic commands like listing APIs and validating a local spec.
Upgrade your Node.js runtime to version 16.x or later. The current latest versions (0.11.x) require Node.js `^20.17.0 || >=22.9.0`.
Ensure your Node.js environment meets the specified engine requirements. Update to Node.js 20.17.0 or 22.9.0 and above.
Set the `NODE_EXTRA_CA_CERTS` environment variable to the path of a `.pem` file containing your custom trusted CA certificates. For example: `export NODE_EXTRA_CA_CERTS=/path/to/your/certs.pem`.
Store `SWAGGERHUB_API_KEY` in environment variables or use a secret management system (e.g., GitHub Actions Secrets, Kubernetes Secrets) in automated workflows.
Always use the latest version of `swaggerhub-cli` to ensure compatibility with SwaggerHub API endpoints and validation logic. Report any unexpected validation issues to the maintainers.
Specify custom trusted certificates using the `NODE_EXTRA_CA_CERTS` environment variable. Example: `export NODE_EXTRA_CA_CERTS=/path/to/your/certs.pem`.
Set the `SWAGGERHUB_API_KEY` environment variable or run `swaggerhub configure` and provide your API Key from SwaggerHub user settings.
Verify the command name and its namespace (e.g., `api:validate` instead of `validate`), and consult the `swaggerhub help` output for available commands.
No dependency data recorded yet.