Package detail

@bugsnag/cli

bugsnag51.6kISC3.1.1

BugSnag CLI

readme

Documentation Build status

Simplify the process of creating releases on the BugSnag dashboard and uploading files to improve the stacktraces in your errors with our command line tool.

Installation

The binaries are available on our GitHub releases page for macOS, Linux and Windows.

cURL / Wget

To install or upgrade to the latest binary for your architecture, you can also run the following cURL or Wget commands:

curl -o- https://raw.githubusercontent.com/bugsnag/bugsnag-cli/main/install.sh | bash
wget -qO- https://raw.githubusercontent.com/bugsnag/bugsnag-cli/main/install.sh | bash

The script downloads the appropriate binary and attempts to install it to ~/.local/bugsnag.

NPM

If your project uses npm or yarn, the CLI can be installed by adding the @bugsnag/cli package:

npm install @bugsnag/cli`

It can then be executed from your project scripts at /node_modules/.bin/bugsnag-cli or using npx @bugsnag/cli.

Supported commands

Create builds

Allows you to create a build within BugSnag to enrich releases shown in the BugSnag dashboard.

$ bugsnag-cli create-build --api-key=YOUR_API_KEY --app-version=YOUR_APP_VERSION

See the create-build command reference for full usage information.

Symbol & mapping file uploads

Simplifies the upload of the various symbol and mapping files required to make your stacktraces readable in the BugSnag dashboard. Where possible files the files to upload are located automatically and the parameters, such as API key, located in project files. However all options can be overridden to allow you to customize the command for your build system.

Supported uploads with links to online docs for the file type:

BugSnag On-Premise

If you are using BugSnag On-premise, you should use the --build-api-root-url and --upload-api-root-url options to set the URL of your build and upload servers, for example:

bugsnag-cli upload \
  --upload-api-root-url https://bugsnag.my-company.com/
  # ... other options

Support

Contributing

Most updates to this repo will be made by Bugsnag employees. We are unable to accommodate significant external PRs such as features additions or any large refactoring, however minor fixes are welcome. See contributing for more information.

License

This package is free software released under the MIT License. See license for details.

changelog

Changelog

[3.1.1] - 2025-05-14

Fixed

  • Ensure that the CLI wrapper handles CLI flags with spaces in them #205

[3.1.0] - 2025-05-12

Added

  • Add support for Linux ARM platforms #202

Fixed

  • Call the CLI directly rather than using NPX in the JS CLI wrapper #201

Changed

  • Convert the NPM package to TypeScript #199

[3.0.1] - 2025-04-29

Added

  • Add TypeScript definitions to cli wrapper #196

Fixed

  • Update the command referenced in the missing bundle error message #195

[3.0.0] - 2025-04-07

This major release includes some breaking changes – please see our Upgrading Guide for full details.

Added

  • Ensure that the React Native iOS command works with Xcode archives by default #176
  • Create build wrapper for the @bugsnag/cli node package #186
  • dSYM Super command to handle both Xcode Archives and Builds #182
  • Adds support for uploading breakpad .sym files 178

Fixed

  • Update the path for AndroidManifest.xml in newer versions of RN #176
  • Update how the --project-root is worked out for the upload js command #187
  • Ensure we resolve the source path relative to the source map path for the JS command #188
  • Preserve folder structure or the bundle URL during upload for the JS command #189

Removed

  • Remove the deprecated option --fail-on-upload-error #191

[2.9.2] - 2025-02-11

Fixed

  • Get NDK version from the source.properties file when uploading NDK symbol files #172

[2.9.1] - 2025-01-23

Fixed

  • Switch js-yaml to yaml for the NodeJS package #168

[2.9.0] - 2025-01-20

Added

  • Add a wrapper for the npm package to interact with the BugSnag CLI #161
  • Add support for .so.* files when processing NDK symbol files #163
  • Add additional logging to the Android AAB upload command #165

[2.8.0] - 2025-01-06

Added

  • Add the Xcode Archive Command to support the uploading of xcarchive files #156
  • Rename the dsym upload command to xcode-build to better reflect its purpose. dsym will be removed in the next major release #156

[2.7.0] - 2024-11-26

Added

  • Add the --configuration option to the upload dsym command #154

[2.6.3] - 2024-11-26

Added

  • Default the --project-root to the current working directory for the upload dsym command #148

Fixed

  • Add the --code-bundle-id option to the upload js command #150

[2.6.2] - 2024-10-17

Fixed

  • Ensure that the Node package is configured correctly so that npx @bugsnag/cli and yarn bugsnag-cli work as expected #144
  • Replace the axios dependency with fetch to reduce package size #145

[2.6.1] - 2024-09-18

Fixed

  • Ensure that only either --code-bundle-id or --version-code/--version-name/--bundle-version is passed to the upload API #140

[2.6.0] - 2024-09-09

Added

  • Add React Native super command #127

Fixed

  • Allow spaces when processing and uploading dSYM files #135

[2.5.0] - 2024-07-31

Added

  • Add support for JavaScript source maps #121

[2.4.1] - 2024-07-17

Fixed

  • Ensure that extracted .aab files can be processed by the Android AAB upload function #114
  • Hide --upload-api-root-url and --build-api-root-url flags in the general help output #115

[2.4.0] - 2024-07-08

Added

  • Restrict input for the --provider option for create-build #102

Fixed

  • Ensure binary installation works correctly via PNPM and Yarn #109

[2.3.0] - 2024-06-04

Added

  • Add the ability to set the log level via the --log-level flag #103
  • Allow more flexible path searching when uploading NDK symbol files #98

Fixed

  • Fix the error message when --version-name is missing #103

[2.2.0] - 2024-04-17

Added

  • upload android-proguard will now attempt to automatically locate the classes.dex files if no build-uuid or dex-files are found or specified #92
  • Added the --no-build-uuid option to the upload android-* options #92
  • Added Windows_NT to supported-platforms.yml #95

[2.1.1] - 2023-03-22

Fixed

  • Ensure that the --retries flag is correctly passed to the Unity Android upload API. #91

[2.1.0] - 2023-03-18

Removed

  • The --fail-on-upload-error option now has no affect: upload commands will now all return a non-zero exit code if the upload is unsuccessful. All 4xx and 5xx status codes from the upload API are treated as errors apart from duplicate files (409), which the command will not treat as an error case to allow re-run commands to succeed. #95

Added

  • Add support for React Native source maps for iOS online docs
  • Add support for dSYM uploads for iOS online docs
  • Allow create build to extract relevant information from a given Android manifest or AAB file. #65

Fixed

  • Ensure that --ios-app-path exists when passed as an option via the upload dart CLI. #67
  • Ensure that uploads are retried when passing the --retries=x argument to the CLI. #70

[2.0.0] - 2023-10-17

Removed

  • Remove deprecated (renamed) CLI options - --version, --app-version, --app-version-code and --app-bundle-version. #52

See Upgrading Guide for full details.

Added

  • Add support for Unity Android symbol files. #56
  • Add --version flag to the command to retrieve the version of the installed CLI. #51
  • Add --dry-run flag to all upload commands to validate but not upload source maps. #54
  • Automatically generate a unique value for the buildUUID parameter from .aab files when not specified in the AndroidManifest or --build-uuid option. #54
  • Add --dex-files flag to upload android-proguard to generate a unique value for the buildUUID from classes.dex files when uploading a mapping.txt #61

[1.2.2] - 2023-07-11

Added

  • Do not modify the projects package.json when installing the CLI via NPM. #50
  • Adjust index.android.bundle path checking for React Native Android to ensure that paths are tested correctly. #49

[1.2.1] - 2023-07-03

Added

  • Allow non-standard variants when not providing the bundle path as a flag to the CLI. #44
  • Add bundle path support for React Native 0.72. #46

[1.2.0] - 2023-06-29

Added

  • Add support for installing the CLI via NPM - #39
  • Move global appVersion, appVersionCode and appBundleVersion flags to sub commands for dart and create-build - #41
  • Get values from Android AAB manifest via resource ID - #41

Fixed

  • Correct buildUUID name in server requests for Android Proguard - #41

[1.1.1] -v2023-05-25

Fixed

  • Fix how we check for the AndroidManifest.xml file for Android AAB - #37

[1.1.0] - 2023-05-10

Added

Add support for:

Add the create-build command to provide extra information whenever you build, release, or deploy your application. - see our online docs

[1.0.0] - 2022-11-29

  • Initial release with support for Dart symbol files – see our online docs.