{"id":15521,"library":"asyncapi-bundler-cli","title":"AsyncAPI Bundler CLI","description":"asyncapi-bundler-cli is a command-line interface tool designed to combine multiple AsyncAPI specification files into a single document. It efficiently resolves `$ref` pointers to external or internal files, consolidating them into a single, comprehensive AsyncAPI definition. While this package currently stands at version 0.7.1, its dedicated functionality for bundling AsyncAPI documents has largely been integrated into the official `@asyncapi/cli` package (which reached version 6.0.0 a month ago), making the `asyncapi-bundler-cli` effectively superseded. It likely has an irregular release cadence as focus has shifted to the more comprehensive official CLI, which offers a broader suite of AsyncAPI development tools, including bundling, validation, and generation. Its primary differentiator was its singular focus on bundling via a dedicated CLI, a role now subsumed by the official toolkit.","status":"deprecated","version":"0.7.1","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","typescript"],"install":[{"cmd":"npm install asyncapi-bundler-cli","lang":"bash","label":"npm"},{"cmd":"yarn add asyncapi-bundler-cli","lang":"bash","label":"yarn"},{"cmd":"pnpm add asyncapi-bundler-cli","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Provides the core logic for bundling AsyncAPI documents, which this CLI wraps.","package":"@asyncapi/bundler","optional":false}],"imports":[{"note":"This package is a CLI and is used directly from the command line, not imported programmatically. For programmatic bundling, use the `@asyncapi/bundler` library.","symbol":"CLI Usage","correct":"npm install -g asyncapi-bundler-cli\nasyncapi-bundler-cli input.yaml > output.json"},{"note":"This is for the underlying library `@asyncapi/bundler`, which provides programmatic access to bundling. This CLI package (`asyncapi-bundler-cli`) is not intended for direct programmatic import.","wrong":"const bundle = require('asyncapi-bundler-cli');","symbol":"bundle (from @asyncapi/bundler)","correct":"import { bundle } from '@asyncapi/bundler';"},{"note":"This is a type import for programmatic use of the underlying `@asyncapi/bundler` library, not for this CLI. For TypeScript projects integrating bundling logic.","symbol":"AsyncAPIBundlerOptions (from @asyncapi/bundler)","correct":"import type { AsyncAPIBundlerOptions } from '@asyncapi/bundler';"}],"quickstart":{"code":"npm install -g asyncapi-bundler-cli\n\n# Bundle a single AsyncAPI file and output to JSON\nasyncapi-bundler-cli ./path/to/asyncapi.yaml > output.json\n\n# Bundle multiple AsyncAPI files (example of complex usage, specific options may vary by version)\n# Note: Refer to asyncapi/bundler documentation for exact options like baseDir if needed.\nasyncapi-bundler-cli --baseDir . spec/main.yaml spec/channels.yaml spec/messages.yaml > bundled-api.yaml","lang":"bash","description":"Demonstrates global installation and basic usage of the CLI to bundle AsyncAPI documents from YAML/JSON files."},"warnings":[{"fix":"Immediately migrate to `@asyncapi/cli` (latest stable version). If direct use of `@asyncapi/bundler` is required, consult its npm page for safe versions and vulnerability mitigations. Review all system credentials.","message":"The underlying `@asyncapi/bundler` library (which this CLI relies on) was subject to a critical supply chain attack (GMS-2025-693) on November 24th, 2025. This involved malicious code attempting to harvest credentials and infect repositories during the pre-install phase. All users are strongly advised to rotate credentials, clear npm caches, remove `node_modules`, and roll back dependencies to a safe version or, preferably, migrate to the official `@asyncapi/cli`.","severity":"breaking","affected_versions":"All versions depending on compromised `@asyncapi/bundler` versions."},{"fix":"Migrate to `@asyncapi/cli` by installing it globally (`npm install -g @asyncapi/cli`) and using `asyncapi bundle` as a subcommand.","message":"This standalone CLI (`asyncapi-bundler-cli`) is largely superseded by the official and actively maintained `@asyncapi/cli` package, which includes a `bundle` command. The official CLI offers broader functionality and more consistent updates.","severity":"deprecated","affected_versions":">=0.7.1"},{"fix":"If working with AsyncAPI v3, use the latest `@asyncapi/cli` and verify its v3 bundling capabilities, or programmatically use the latest `@asyncapi/bundler` library, checking its release notes for v3 compatibility.","message":"Bundling AsyncAPI v3 documents might not be fully supported, leading to errors. The underlying `@asyncapi/bundler` library has had ongoing efforts for v3 support, and older versions (which this CLI might use) may explicitly fail.","severity":"gotcha","affected_versions":"<=0.7.1"},{"fix":"Pin to exact versions in `package.json` or use a version range that minimizes unexpected changes (e.g., `~0.7.0` instead of `^0.7.0`). Consider migrating to `@asyncapi/cli` for more stable versioning.","message":"As a 0.x version package, `asyncapi-bundler-cli` may introduce breaking changes between minor versions without adhering strictly to semantic versioning. Always review release notes when upgrading.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-04-21T00:00:00.000Z","next_check":"2026-07-20T00:00:00.000Z","problems":[{"fix":"Ensure the package is installed globally: `npm install -g asyncapi-bundler-cli`. If the problem persists, check your npm global installation path and ensure it's included in your system's PATH environment variable.","cause":"The CLI executable is not in your system's PATH, typically because it wasn't installed globally or `npm`'s global bin directory isn't configured correctly.","error":"command not found: asyncapi-bundler-cli"},{"fix":"Downgrade your AsyncAPI specification to v2.x or migrate to the latest official `@asyncapi/cli` which is more likely to have (or is actively developing) AsyncAPI v3 support for bundling.","cause":"The version of the bundler used by this CLI does not support the AsyncAPI Specification v3.0 format.","error":"Error: One of the files you tried to bundle is AsyncAPI v3 format, the bundle command does not support it yet, please checkout https://github.com/asyncapi/bundler/issues/133"},{"fix":"Use a YAML linter or editor with YAML validation (e.g., VS Code with YAML extension) to correct the syntax errors in your AsyncAPI definition files.","cause":"The input AsyncAPI YAML file contains syntax errors, specifically incorrect indentation or invalid YAML structure.","error":"YAMLParseError: bad indentation of a mapping entry"}],"ecosystem":"npm"}