Box CLI: the content CLI for developers and agents

|
Share

We originally built the Box CLI to help developers and admins automate repetitive tasks using the terminal. The terminal has always been one of the most powerful environments for automation, but things are changing. The command line is now the tool of choice for AI agents. Tools like Claude Code, Gemini CLI, and Codex CLI all target experiences in the terminal and take advantage of the rich tooling and composability that this environment offers. 

Today, we’re launching a new version of the Box CLI to make it easier for anyone, including agents, to securely and programmatically interact with content in Box. Whether you're scripting workflows, exploring your content from the terminal, or giving an AI agent the ability to retrieve files, apply metadata, or transform documents, this updated CLI experience is a simple and composable interface to the Box platform. 

Getting started

Install the Box CLI in seconds:

npm i @box/cli -g

You’ll need to have Node.js installed, or you can find native binaries for your system in our CLI Docs.

Authenticating with your Box credentials

Once you’ve installed the CLI, you’ll need to authenticate. If you don’t have a Box account, you can sign up for a free developer account to get started.

Once you have a Box account, use the login command:

box login
 
How would you like to authenticate?
[1] Log-in as a Box user (OAuth)
[2] Use a Box Platform app

This release also adds the ability to authenticate using your own Box login credentials. Selecting this option will initiate an OAuth experience in your browser and give your CLI the same scope of permissions you have as a user.

You can also authenticate using a Platform App, which enables you to customize the scope of permissions for the CLI.

Using the CLI with agents

After you’ve authenticated, you’re ready to start running commands. You can get a quick overview of what’s possible by running:

box --help

But now it’s even easier for your agents to use the Box CLI to get work done. Here’s an example using Claude Code:

❯ Use the Box CLI to upload all the invoices in this directory to an "Invoices" directory on Box, run structured metadata extraction on them using the invoice template, and store that metadata back to the files.

This is a multi-step process:

  1. Creating a directory called “Invoices” on Box, if it doesn’t exist.
  2. Uploading the PDFs to that directory.
  3. Locating the key for the specified metadata template.
  4. Running metadata extraction on PDFs in Box.
  5. Attaching the extracted values to the metadata for each PDF.

Without any clarification or additional instruction, here’s what Claude and the Box CLI accomplished:

CLI

Box also handles document signing, watermarking, and more — giving you and your agents the building blocks to automate virtually any workflow.

Get the new Box CLI today

 Download the new Box CLI today and get up to speed with the CLI Quickstart. Make sure to sign up for a free developer account if you don’t have one. 

We’re excited to see what developers build as agents become deeper collaborators in the terminal.