swaggerhub-cli weekly downloads statistics
By SmartBear (4 listings) · npm · Claude Code
SwaggerHub CLI. Includes an agent skill
swaggerhub-cli has 4,751 recorded weekly downloads on npm, a decrease of 15.1% over the past 30 days, ranking #1548 of 3,247 tracked listings.
About swaggerhub-cli
Swagger CLI
The Swagger CLI enables teams to build automation and workflows around Swagger. Teams can use it in places like their CI/CD pipeline to create new APIs, create and update API versions, and mark API versions as published and default among other features. Every team has their own workflow, and the Swagger CLI can help teams build the workflow that fits their needs.
<!-- toc -->- Requirements
- Installation
- Setup
- Using a proxy
- Additional configuration for Swagger Studio On-Premise
- Using with AI agents
- Usage
- Commands
- Plugins
- Contributing
Requirements
- Node.js 22.12 or later.
- Swagger SaaS, or Swagger Studio On-Premise 2.x. On-Premise 1.x is not supported.
Installation
$ npm i -g swaggerhub-cli
Setup
The Swagger CLI can be configured through environment variables or through the swaggerhub configure command. The CLI will look for the following environment variables.
SWAGGERHUB_API_KEY(required) – Important: keep this key secure. This is the Swagger API key the CLI will use for authentication. You can find your API key on the user settings page in Swagger.SWAGGERHUB_URL(optional, default ishttps://api.swaggerhub.com) – Customers with on-premise installations (version 2.x) need to point this to their on-premise API, which ishttp(s)://{swaggerhub-host}/v1(do not append a trailing slash).
Alternatively, you can use the swaggerhub configure command to create a configuration file for the CLI to use. This command will walk you through the steps to set up the necessary configurations.
$ swaggerhub configure
? Swagger URL: https://api.swaggerhub.com
? API Key: <your-api-key>
Environment variables take precedence over the configuration file created by this command.
Using a proxy
The CLI honors the standard proxy environment variables (lowercase variants also work):
export HTTPS_PROXY=http://proxy.example.com:8080 # used for https:// URLs, including the default https://api.swaggerhub.com
export HTTP_PROXY=http://proxy.example.com:8080 # used for http:// URLs, e.g. an on-premise instance served over HTTP
export NO_PROXY=localhost,.internal.example.com # hosts that should bypass the proxy
Proxy credentials can be included in the URL: http://user:password@proxy.example.com:8080. Always include the scheme (http:// or https://) in the proxy URL.
HTTPS requests are tunnelled through the proxy using CONNECT. If your proxy intercepts TLS, see NODE_EXTRA_CA_CERTS below. SOCKS proxies are not supported.
Additional configuration for Swagger Studio On-Premise
If your Swagger Studio On-Premise instance uses a self-signed or privately signed SSL certificate, there are additional steps required to make the Swagger CLI trust this certificate.
By default, Node.js rejects self-signed or privately signed SSL certificates because their root CA is not known. You will see an error like this in the CLI output:
FetchError: request to https://... failed, reason: self signed certificate
The solution is to use the NODE_EXTRA_CA_CERTS environment variable to specify custom trusted certificates for Node.js.
Start by creating a .pem file containing your custom trusted certificates in the PEM format.
- If the certificate is self-signed (so that it is its own CA), include the certificate itself.
- If the certificate is signed by a private CA, include the CA root and any intermediate certificates, in any order. Blank lines are allowed, but optional, between individual certificates.
-----BEGIN CERTIFICATE-----
CA root certificate
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
Intermediate certificate 1
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
Intermediate certificate 2
-----END CERTIFICATE-----
Specify the path to this PEM file in the NODE_EXTRA_CA_CERTS environment variable.
macOS/*nix/bash examples:
export NODE_EXTRA_CA_CERTS=~/Work/extra-ca-certs.pem # '~' means the home folder of the logged-in user
export NODE_EXTRA_CA_CERTS=$HOME/.ssh/extra-ca-certs.pem
export NODE_EXTRA_CA_CERTS=/Users/username/Work/extra-ca-certs.pem
Windows examples:
:: Both forward and backslashes are OK
set NODE_EXTRA_CA_CERTS=C:\Work\extra-ca-certs.pem
set NODE_EXTRA_CA_CERTS=C:/Work/extra-ca-certs.pem
:: You can also define the path itself using environment variables
set NODE_EXTRA_CA_CERTS=%USERPROFILE%\extra-ca-certs.pem
Using with AI agents
The repository ships an agent skill that teaches AI coding agents (Claude Code, Cursor, Codex and others) how to use the swaggerhub CLI. It can be installed with the skills CLI.
The skill only provides instructions. The agent still needs the CLI installed (see Installation) and SWAGGERHUB_API_KEY set (see Setup).
- List the skills available in this repository without installing:
npx skills add SmartBear/swaggerhub-cli --list - Install into the current project:
npx skills add SmartBear/swaggerhub-cli - Install only this skill, globally, for a specific agent:
npx skills add SmartBear/swaggerhub-cli --skill swaggerhub-cli -g -a claude-code - See what is installed, check for updates, update, remove:
npx skills list,npx skills check,npx skills update,npx skills remove swaggerhub-cli…
Description from the npm listing.
- oclif
- agent-skill
- claude-code
- swagger
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (135)Similar npm Claude Code plugins
All 20 swaggerhub-cli alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/swaggerhub-cli. First seen Nov 21, 2026; last successful collection Dec 6, 2026. See the methodology.