CLI Installation and Configuration
CLI Installation and Configuration
Installers are available for Windows and macOS. However, the raw source-code is available if you would like to build the CLI in other environments.
Windows & macOS Installers
To install the latest CLI on your machine, download the latest
.exe
for Windows or .pkg
for macOS for the latest release.
Download the latest CLI installer
Linux & Node install
Additionally, the CLI can be installed as a Node package on any platform, including Linux. For this to work you will need to have Node JS installed on your machine.
npm install --global @box/cli
Source Code
The source code for the CLI is available via GitHub.
Run configuration command
You will now need to configure the CLI to point to to the configuration file downloaded in step 1.
Open your terminal or command line and execute the
command: box configure:environments:add PathToConfigFileHere
, replacing
PathToConfigHere
with the path to your config.json
file.
For example: box configure:environments:add /Users/ExampleUser/Documents/CLI/config.json
Confirm configuration
To confirm successful configuration, use the command box users:get
.
A successful response will provide details about the Service Account user associated with your Access Token:
Type: user
ID: ''0123456789''
Name: Box CLI - Quickstart Example
Login: AutomationUser_123456_8jSo6Lqvko@boxdevedition.com
Created At: '2020-01-01T09:45:01-07:00'
Modified At: '2021-03-01T09:30:05-07:00'
Language: en
Timezone: America/Los_Angeles
Space Amount: 999999999999999
Space Used: 6291500
Max Upload Size: 16106127360
Status: active
Job Title: ''
Phone: ''
Address: example+user@box.com
Avatar URL: ''
Notification Email: []
Summary
- You installed the CLI
- You configured the CLI to point to your application's configuration file
- You confirmed the user associated with your Access Token