Skip to main content
Glama
cli.md1.36 kB
--- sidebar_position: 5 title: CLI --- # Command line interface The CLI is a thin wrapper around the library Node API. It's available with the same name of the package when installed globally: ```bash swagger-jsdoc ``` Or through the standard ways provided by your package manager: ```bash yarn swagger-jsdoc ``` ## Usage Print the help menu: ```bash swagger-jsdoc -h ``` ### Definition file Set with `--definition` (or `-d`) flag: ```bash swagger-jsdoc -d swaggerDefinition.js ``` Acceptable file extensions: `.cjs`, `.json`, `.yml`, `.yaml`. ### Input files Set through arguments. One by one: ```bash swagger-jsdoc -d swaggerDefinition.cjs route1.js route2.js component1.yaml component2.yaml ``` Multiple with a pattern: ```bash swagger-jsdoc -d swaggerDefinition.cjs route*.js component*.yaml ``` [Glob patterns](https://github.com/isaacs/node-glob) are acceptable to match multiple files with same extension `*.js`, `*.php`, etc. or patterns selecting files in nested folders as `**/*.js`, `**/*.php`, etc. Paths are relative to the current working directory. ### Output file (optional) The output is `swagger.json` by default, but can be changed: ```bash swagger-jsdoc -d swaggerDefinition.cjs route1.js -o my_spec.json ``` When output file extension is `.yaml` or `.yml`, the specification will be parsed and saved in YAML format.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/indrasishbanerjee/aem-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server