The ManageXR CLI is a useful tool to automate the process of uploading applications to ManageXR. You can use the CLI in your CI/CD pipeline to upload new app versions to your ManageXR organization and even publish the versions to named release channels.
Installation
The mxr-cli
is available as an NPM package or a binary executable.
Using NPM
npm install -g @managexr/mxr-cli
After installation, you can run the CLI using the command mxr-cli
.
mxr-cli <command> [options]
Using NPX
You can also use npx
to use the command directly, without running an npm install
:
npx @managexr/mxr-cli <command> [options]
Using a Binary Executable
If you're not running on a machine with node.js, you can use a binary instead. Download the binary for your machine:
Linux: Download Link
Mac: Download Link
Windows: Download Link
You can now use the binary in any terminal:
path/to/mxr-cli <command> [options]
On Mac and Linux machines, you may need to grant executable permissions to the binary before you can run it. To do this, run chmod +x path/to/mxr-cli
.
Usage
The CLI currently supports one command upload-app
.
To see these instructions, run mxr-cli upload-app -h
Authentication
You can authenticate your CLI commands using a ManageXR API Key. An API Key consists of an api_id
and an api_secret
, and belongs to a single ManageXR organization. To generate these credentials, go to the API Keys settings page and click the + New API Key button.
For the CLI, there are two authentication methods:
Set
MXR_API_KEY_ID
andMXR_API_KEY_SECRET
environment variables.Provide a JSON file as an
--api-key-file
argument to the command.
JSON API Key Format:
{
"id": "your_api_key_id",
"secret": "your_api_key_secret"
}
Examples
Upload an app using an API Key JSON file for authentication:
mxr-cli upload-app /path/to/apkfile.apk --api-key-file /path/to/api_key.json
Upload an app using environment variables for authentication:
MXR_API_KEY_ID="xxx" MXR_API_KEY_SECRET="xxx" mxr-cli upload-app /path/to/apkfile.apk
Upload an app with a .obb file, set the app's title, set the app's description, and point a Release Channel named "Dev" to this new app version:
mxr-cli upload-app /path/to/apkfile.apk --obb-file /path/to/obbfile.obb --title "Cool new app" --description "This app is amazing" --release-channel "Dev" --api-key-file /path/to/api_key.json