CLI Tool

Steps to leverage ArborXR's CLI tool for automating build uploads.

Josh Franzen avatar
Written by Josh Franzen
Updated over a week ago

Overview

The ArborXR CLI is available as a binary file to run in the command line on all major operating systems. It is designed to be integrated with a CI/CD tool such as Jenkins or GitLab CI.


Set Up

These URLs can be integrated with your pipelines to automatically grab the latest version of the CLI Binary.


Authentication

  1. Navigate to organization Settings, select Access Token in the top right, then click Create Access Token.

  2. Enter a title, check the Content CLI checkbox, then click Create.

  3. Copy the token value before closing.

  4. Pass the access token as a launch option (--token) or by setting the environment variable ARBORXR_ACCESS_TOKEN.

Please note, the authentication token need to come after the first root command, but before any further nested command, e.g.:

./arborxr-cli content --token "<insert Token>" list

💡 If the token is configured as a masked variable, some CI services such as Gitlab may be unable to mask the access token. If that is the case, please omit the characters preceding and inclusive of the | character.


Uploading Builds

To upload a build with the CLI, you first need to identify the ID of either the organization content or the content channel.

  1. Organization content ID: This is the string of characters at the end of the URL while you are in the content's overview page in the ArborXR web portal.

  2. Content channel ID: In an interactive shell, run the content channel list command then pick any of your organizations' contents. The ID of all available channels for that content will be printed.

The path argument can either point to a directory or a file. If necessary, the CLI will automatically create an archive before continuing with the upload.

The command will await the ArborXR platform’s build processing to finish and prints the details. The exit code can be used to identify whether the processing finished with a failure state or whether it succeeded. All exit codes are documented by the command explain exit-codes.

To learn about the options this commands supports, please run content channel upload --help.


View Latest Build Version

💡 The content channel build view command lists the version code (as well as other details of the build).

To view the version details of the latest build:

  1. Run content channel list and provide the content ID to gather the content channel ID.

  2. Run content channel build list and provide the above channel ID to collect the IDs of all builds.

  3. Run content channel build view and provide the latest build ID gathered above.

This will print the details of the latest build, including the version code.


Alternatively, you can simply run the content channel build view command without providing a build ID. By doing so, the CLI will start an interactive mode in which it asks you to pick the content, its channel and then one of its builds. For more information on this, please run the explain ids command.


Other Functionality

The CLI comes with the ability to query various details of your ArborXR organization. Additionally it can update itself and will tell you when the version you’re running is out of date. Just run the executable with no arguments to learn about the various commands.


Limitations

Currently we are only able to support the credentials of users that have access to exactly one ArborXR organization. Any user that has access to multiple organizations will have a random organization picked, which could cause various commands to fail.

Did this answer your question?