Skip to main content

CLI

The Byteboost CLI is used for uploading source maps. It is very straight forward to use.

To get started we need to install the cli. To do so run the command

npm install @byteboost/cli -g

when the command is finished we are ready to get started with uploading source maps.

To get we need some environment variables. Create an .env file with the following keys

BYTEBOOST_TOKEN="<Your api key>"
BYTEBOOST_DOMAIN="<Your domain>"
BYTEBOOST_ORGANIZATION="<Your organization>"

This step is important because without it we can't authenticate you in our api

When you have created the file you are ready to upload your source maps. Make sure your bundler is outputting source maps when you generate your code. For typescript projects this can be achieved like this:

{
"compilerOptions": {
"sourceMap": true
}
}

If you are running webpack please see our documentation here

Once you have managed to get your bundler to output source maps just simply run the following command

byteboost-cli sourcemaps upload <path to your project root> --version <the app version>

Too see all available options run

byteboost-cli sourcemaps upload --help

Yey! We have now uploaded source maps to the Byteboost platform.