Registry / devops / bump-cli

bump-cli

JSON →
library0.5.0jsnpmunverified

The Bump CLI is a command-line interface tool designed to interact with the Bump.sh platform, enabling developers to manage their API documentation, hubs, and workflows directly from their development environments. It supports popular API description formats such as OpenAPI (v2.0, v3.x, and partially v3.2), Swagger, and AsyncAPI for documentation, as well as Flower and Arazzo for API workflows. The current stable version is 2.10.0, with releases occurring frequently, often on a monthly or bi-monthly basis, incorporating new features and bug fixes. Key functionalities include validating API documents, publishing them to Bump.sh documentation or hubs, generating human-readable diffs between API definitions, applying overlays, and deploying workflow documents to Managed Control Plane (MCP) servers. The CLI is built with the `oclif` framework in TypeScript and primarily interfaces with the `developers.bump.sh` API.

npm install bump-cli
INSTALL
IMPORT
SIG · BUMP-CLI
B
bump-cli
devopsjavascriptv0.5.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

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

bump
bump [command]
import { bump } from 'bump-cli'
When globally installed (`npm install -g bump-cli`), the `bump` command is directly available in your shell's PATH.
bump
npx bump [command]
require('bump-cli')
When installed as a local dev dependency (`npm install --save-dev bump-cli`), it should be invoked using `npx` (or `npm exec`) from your project root.
bump (programmatic)
import { exec } from 'node:child_process'; exec('npx bump deploy ...', (err, stdout, stderr) => { /* ... */ });
import { deploy } from 'bump-cli'; deploy(...)
The CLI is primarily designed for shell execution. Programmatic invocation usually involves spawning a child process rather than importing specific functions, as its internal structure is optimized for CLI execution.

This quickstart demonstrates how to programmatically deploy an OpenAPI definition to Bump.sh using the `bump-cli` via `npx` and environment variables for authentication. It creates a temporary OpenAPI file, deploys it, and then cleans up.

import { exec } from 'node:child_process'; import * as path from 'node:path'; import * as fs from 'node:fs'; const API_DEFINITION_FILE = 'openapi.yaml'; const BUMP_DOC_SLUG = process.env.BUMP_DOC_SLUG ?? 'my-api-documentation-test'; const BUMP_TOKEN = process.env.BUMP_TOKEN ?? ''; // Set BUMP_TOKEN environment variable // Create a dummy OpenAPI file for demonstration const openApiContent = ` openapi: 3.0.0 info: title: My Example API version: 1.0.0 paths: /hello: get: summary: Returns a greeting responses: '200': description: A successful response content: application/json: schema: type: object properties: message: type: string example: Hello, World! `; fs.writeFileSync(API_DEFINITION_FILE, openApiContent.trim()); console.log(`Deploying ${API_DEFINITION_FILE} to Bump.sh documentation '${BUMP_DOC_SLUG}'...`); const command = `npx bump deploy ${API_DEFINITION_FILE} --doc ${BUMP_DOC_SLUG} --token ${BUMP_TOKEN} --no-progress`; exec(command, (error, stdout, stderr) => { if (error) { console.error(`exec error: ${error}`); console.error(`stderr: ${stderr}`); // Clean up the dummy file in case of error too fs.unlinkSync(API_DEFINITION_FILE); return; } console.log(`stdout: ${stdout}`); console.log('Deployment command finished. Check your Bump.sh dashboard!'); // Clean up the dummy file fs.unlinkSync(API_DEFINITION_FILE); });
bump --version
Debug
Known issues
breakingNode.js Version Requirement: `bump-cli` now requires Node.js version 20.0.0 or higher. Older Node.js versions are no longer supported and will prevent the CLI from running.
fix
Upgrade your Node.js environment to version 20.0.0 or later. Use a Node Version Manager (NVM) for easy switching and management of Node.js versions.
affects: >=2.0.0
gotchaCLI Tool Usage: `bump-cli` is primarily a command-line interface tool and is not intended for direct programmatic import as a library. Attempting `import { ... } from 'bump-cli'` or `require('bump-cli')` will not work as expected for its core functionalities.
fix
Execute `bump-cli` commands from your shell using `npx bump [command]` (for local installation) or `bump [command]` (for global installation). For programmatic execution, use `node:child_process` to spawn the command.
affects: >=2.0.0
gotchaOpenAPI 3.2 Partial Support: While `bump-cli` supports deployment of OpenAPI 3.2 documents, this support is currently partial. Certain advanced or newly introduced OpenAPI 3.2 features might not be fully rendered or processed as expected.
fix
Consult the Bump.sh documentation for specific limitations on OpenAPI 3.2 features. Test your OpenAPI 3.2 documents thoroughly after deployment and report any issues encountered to ensure full compatibility in future releases.
affects: >=2.9.9
breakingJSON Path Compliance (RFC 9535): The `overlay` command's JSON Path parsing has been updated to be more compliant with RFC 9535. This is generally a fix, but previously working non-standard JSON paths in overlay files might behave differently or break.
fix
Review any existing overlay files that use JSON paths with the `overlay` command to ensure they conform to RFC 9535 standards. Test overlays thoroughly after updating to version 2.9.11 or newer to avoid unexpected behavior.
affects: >=2.9.11
gotchaMCP Server Deployment Feature Status: The deployment of workflow documents to Managed Control Plane (MCP) servers (using `--mcp-server`) was initially in a beta or "in creation" state. While it now supports Arazzo documents, users should be aware that this feature is still actively evolving and may have limitations.
fix
Refer to the latest Bump.sh documentation regarding MCP server deployments for up-to-date information on supported features and any known limitations. Provide feedback to Bump.sh to help mature the feature.
affects: >=2.9.12
Errors
Common errors & fixes
Error: You are running Node.js x.y.z. Bump CLI requires Node.js version >= 20.0.0.
The installed Node.js version on your system is older than the minimum required by `bump-cli`.
fix
Upgrade your Node.js environment to version 20.0.0 or later. Tools like `nvm install 20 && nvm use 20` or `npm install -g n && n 20` can help manage Node.js versions easily.
Error: Missing required flag --token OR Error: Invalid API token provided.
The `--token` flag was not provided during the command execution, or the provided API token is incorrect, expired, or lacks the necessary permissions.
fix
Ensure you pass a valid Bump.sh API token using `--token $BUMP_TOKEN` or by setting the `BUMP_TOKEN` environment variable. Generate a new token if necessary from your Bump.sh account settings.
[ERROR] The document provided is not a valid OpenAPI/AsyncAPI specification.
The API definition file (OpenAPI, AsyncAPI, Flower, or Arazzo) contains syntax errors or does not conform to its respective specification.
fix
Validate your API definition file locally using a linter (e.g., `spectral lint` for OpenAPI/AsyncAPI) or a schema validator before attempting to deploy. Check for common issues like incorrect YAML/JSON syntax, missing required fields, or invalid schema references (`$refs`).
[ERROR] JSONPath evaluation failed: <some jsonpath expression>
An incorrect or unsupported JSON Path expression was used in an overlay file, especially after the `2.9.11` update which standardized JSON Path compliance with RFC 9535.
fix
Review the JSON Path expression in your overlay file. Ensure it adheres to RFC 9535 standards for JSON Path. Test the overlay locally using the `bump overlay` command before deployment to verify its correctness.
Upgrade
Version history
0.5.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
10
Resources
bump-cli — npm install bump-cli · libregistry