First, make sure that you have the following prerequisites installed:
Next, install the viewar-cli globally by entering the following command into your terminal:
npm install -g viewar-cli
(You might need to use
sudo npm install -g viewar-cli to have the right permissions.)
You only need to install this tool once. When out of date, it will alert you and provide update instructions.
Create a free ViewAR account. You will need the credentials to be able to create new apps, upload and manage 3D content and much more. You may log in directly from the terminal: