UNPKG

bump-cli

Version:

The Bump CLI is used to interact with your API documentation hosted on Bump.sh by using the API of developers.bump.sh

296 lines 12.9 kB
{ "commands": { "deploy": { "aliases": [], "args": { "file": { "description": "Path or URL to your API documentation file. OpenAPI (2.0 to 3.1.0) and AsyncAPI (2.x) specifications are currently supported.\nPath can also be a directory when deploying to a Hub.", "name": "file", "required": true } }, "description": "Create a new version of your documentation from the given file or URL.", "examples": [ "Deploy a new version of an existing documentation\n\n$ bump deploy FILE --doc <your_doc_id_or_slug> --token <your_doc_token>\n* Let's deploy on Bump.sh... done\n* Your new documentation version will soon be ready\n", "Deploy a new version of an existing documentation attached to a hub\n\n$ bump deploy FILE --doc <doc_slug> --hub <your_hub_id_or_slug> --token <your_doc_token>\n* Let's deploy on Bump.sh... done\n* Your new documentation version will soon be ready\n", "Deploy a whole directory of API definitions files to a hub\n\n$ bump deploy DIR --filename-pattern *-{slug}-api --hub <hub_slug> --token <hub_token>\nWe've found 2 valid API definitions to deploy\n└─ DIR\n └─ source-my-service-api.yml (OpenAPI spec version 3.1.0)\n └─ source-my-jobs-service-api.yml (AsyncAPI spec version 2.6.0)\n\nLet's deploy those documentations to your <hub_slug> hub on Bump.sh\n\n* Your new documentation version will soon be ready\nLet's deploy a new version to your my-service documentation on Bump.sh... done\n\n* Your new documentation version will soon be ready\nLet's deploy a new version to your my-jobs-service documentation on Bump.sh... done\n", "Validate a new documentation version before deploying it\n\n$ bump deploy FILE --dry-run --doc <doc_slug> --token <your_doc_token>\n* Let's validate on Bump.sh... done\n* Definition is valid\n" ], "flags": { "auto-create": { "dependsOn": [ "hub" ], "description": "Automatically create the documentation if needed (only available with a --hub flag). Documentation name can be provided with --doc-name flag. Default: false", "name": "auto-create", "allowNo": false, "type": "boolean" }, "branch": { "char": "B", "description": "Branch name. Can be provided via BUMP_BRANCH_NAME environment variable", "name": "branch", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "doc": { "char": "d", "description": "Documentation public id or slug. Can be provided via BUMP_ID environment variable", "name": "doc", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "doc-name": { "char": "n", "dependsOn": [ "auto-create" ], "description": "Documentation name. Used with --auto-create flag.", "name": "doc-name", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "dry-run": { "description": "Validate a new documentation version. Does everything a normal deploy would do except publishing the new version. Useful in automated environments such as test platforms or continuous integration. Default: false", "name": "dry-run", "allowNo": false, "type": "boolean" }, "filename-pattern": { "description": "Pattern to extract the documentation slug from filenames when deploying a DIRECTORY. Pattern uses only '*' and '{slug}' as special characters to extract the slug from a filename without extension. Used with --hub flag only.", "name": "filename-pattern", "default": "{slug}-api", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "hub": { "char": "b", "description": "Hub id or slug. Can be provided via BUMP_HUB_ID environment variable", "name": "hub", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "interactive": { "dependsOn": [ "hub" ], "description": "Interactively create a configuration file to deploy a Hub (only available with a --hub flag). This will start an interactive process if you don't have a CLI configuration file. Default: false", "name": "interactive", "allowNo": false, "type": "boolean" }, "overlay": { "char": "o", "description": "Path or URL of overlay file(s) to apply before deploying", "name": "overlay", "hasDynamicHelp": false, "multiple": true, "type": "option" }, "preview": { "char": "p", "description": "Generate a preview in your API context. The resulting version is temporary and not visible by your documentation viewers.", "name": "preview", "allowNo": false, "type": "boolean" }, "token": { "char": "t", "description": "Documentation or Hub token. Can be provided via BUMP_TOKEN environment variable", "name": "token", "required": true, "hasDynamicHelp": false, "multiple": false, "type": "option" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "deploy", "pluginAlias": "bump-cli", "pluginName": "bump-cli", "pluginType": "core", "strict": true }, "diff": { "aliases": [], "args": { "file": { "description": "Path or URL to your API documentation file. OpenAPI (2.0 to 3.1.0) and AsyncAPI (2.x) specifications are currently supported.\nPath can also be a directory when deploying to a Hub.", "name": "file", "required": true }, "otherFile": { "description": "Path or URL to a second API documentation file to compute its diff", "name": "otherFile" } }, "description": "Get a comparison diff with your documentation from the given file or URL.", "examples": [ "Compare a potential new version with the currently published one:\n\n $ bump diff FILE --doc <your_doc_id_or_slug> --token <your_doc_token>\n * Comparing the given definition file with the currently deployed one... done\n Removed: GET /compare\n Added: GET /versions/{versionId}\n", "Store the diff in a dedicated file:\n\n $ bump diff FILE --doc <doc_slug> --token <doc_token> > /tmp/my-saved-diff\n * Comparing the given definition file with the currently deployed one... done\n\n $ cat /tmp/my-saved-diff\n Removed: GET /compare\n Added: GET /versions/{versionId}\n", "In case of a non modified definition FILE compared to your existing documentation, no changes are output:\n\n $ bump diff FILE --doc <doc_slug> --token <your_doc_token>\n * Comparing the given definition file with the currently deployed one... done\n › Warning: Your documentation has not changed\n", "Compare two different input files or URL independently to the one published on bump.sh\n\n $ bump diff FILE FILE2 --doc <doc_slug> --token <your_doc_token>\n * Comparing the two given definition files... done\n Updated: POST /versions\n Body attribute added: previous_version_id\n" ], "flags": { "branch": { "char": "B", "description": "Branch name. Can be provided via BUMP_BRANCH_NAME environment variable", "name": "branch", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "doc": { "char": "d", "description": "Documentation public id or slug. Can be provided via BUMP_ID environment variable", "name": "doc", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "expires": { "char": "e", "description": "Specify a longer expiration date for public diffs (defaults to 1 day). Use iso8601 format to provide a date, or you can use `--expires 'never'` to keep the result live indefinitely.", "name": "expires", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "fail-on-breaking": { "char": "F", "description": "Fail when diff contains a breaking change. Defaults to false locally. In CI environments where the env variable CI=1 is set, it defaults to true.", "name": "fail-on-breaking", "allowNo": true, "type": "boolean" }, "format": { "char": "f", "description": "Format in which to provide the diff result", "name": "format", "default": "text", "hasDynamicHelp": false, "multiple": false, "options": [ "text", "markdown", "json", "html" ], "type": "option" }, "hub": { "char": "b", "description": "Hub id or slug. Can be provided via BUMP_HUB_ID environment variable", "name": "hub", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "overlay": { "char": "o", "description": "Path or URL of overlay file(s) to apply before deploying", "name": "overlay", "hasDynamicHelp": false, "multiple": true, "type": "option" }, "token": { "char": "t", "description": "Documentation or Hub token. Can be provided via BUMP_TOKEN environment variable", "name": "token", "required": false, "hasDynamicHelp": false, "multiple": false, "type": "option" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "diff", "pluginAlias": "bump-cli", "pluginName": "bump-cli", "pluginType": "core", "strict": true }, "overlay": { "aliases": [], "args": { "file": { "description": "Path or URL to your API documentation file. OpenAPI (2.0 to 3.1.0) and AsyncAPI (2.x) specifications are currently supported.\nPath can also be a directory when deploying to a Hub.", "name": "file", "required": true }, "overlay": { "description": "Path or URL to an overlay file", "name": "overlay", "required": true } }, "description": "Apply an OpenAPI specified overlay to your API definition.", "examples": [ "Apply the OVERLAY_FILE to the existing DEFINITION_FILE. The resulting\ndefinition is output on stdout meaning you can redirect it to a new\nfile.\n\n$ bump overlay DEFINITION_FILE OVERLAY_FILE > destination/file.json\n* Let's apply the overlay to the main definition... done\n" ], "flags": { "out": { "char": "o", "description": "Output file path", "name": "out", "hasDynamicHelp": false, "multiple": false, "type": "option" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "overlay", "pluginAlias": "bump-cli", "pluginName": "bump-cli", "pluginType": "core", "strict": true }, "preview": { "aliases": [], "args": { "file": { "description": "Path or URL to your API documentation file. OpenAPI (2.0 to 3.1.0) and AsyncAPI (2.x) specifications are currently supported.\nPath can also be a directory when deploying to a Hub.", "name": "file", "required": true } }, "description": "Create a documentation preview from the given file or URL.", "examples": [ "$ <%= config.bin %> <%= command.id %> FILE\n* Your preview is visible at: https://bump.sh/preview/45807371-9a32-48a7-b6e4-1cb7088b5b9b\n" ], "flags": { "live": { "char": "l", "description": "Generate a preview each time you save the given file", "name": "live", "allowNo": false, "type": "boolean" }, "open": { "char": "o", "description": "Open the generated preview URL in your browser", "name": "open", "allowNo": false, "type": "boolean" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "preview", "pluginAlias": "bump-cli", "pluginName": "bump-cli", "pluginType": "core", "strict": true } }, "version": "2.9.8" }