Install Box CLI

Install Box CLI

The Box Command Line Interface (CLI) is a tool for making requests to Box APIs from your terminal window or command prompt.

Installers are available for Windows and macOS, and the raw source-code is available for building 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 also available via the GitHub page.

Quick Start

To get started, first set up a Box Custom App using Server-side Authentication with JWT and download the JSON configuration file from the Configuration page of your app in the developer Console. Then, set up the CLI by pointing it to your configuration file:.

box configure:environments:add [PATH_TO_CONFIG_FILE]

Next, make your first API call by listing the content of the JWT app's Service Account.

box folders:get 0

The root folder for any account always has ID 0. A JWT application does not automatically authenticate as an actual managed user, instead it uses a Service Account. See User Types for more details.

Setup & Commands

For a complete list of steps to set up your CLI environment and start working with the CLI post-install are available on our Box CLI GitHub page.

The GitHub page also has some additional guides that might be of interest to an advanced CLI user.