box package on npm bundles the Box Node SDK and the Box CLI into a single install. Use it to add Box to a JavaScript or TypeScript project — and to run Box CLI commands — with one command.
What’s included
npm install box installs two direct dependencies:
- Box Node SDK, exposed at the
box/sdksubpath. - Box CLI, exposed via
npx box.
Prerequisites
Install Node.js 22 or later.Install
Use the SDK
Import the SDK from thebox/sdk subpath:
Stable alias. You can also import the SDK from the package root with
import BoxSDK from 'box'. This returns the same SDK and is designed to remain stable across future changes to the underlying package.Use the CLI
Run any CLI command withnpx box:
Continuous integration
The package is CI-safe. The post-install message is skipped when any of the following are true:- The
CIenvironment variable is set totrue. - The
SUPPRESS_BOX_INSTALL_MESSAGEenvironment variable is set. - The install runs with
--ignore-scripts.
Security
Every release includes cryptographic provenance attestations that are verifiable against the official GitHub repository.Not a browser package
Thebox package is for Node.js. To embed Box UI components in a browser application, install box-ui-elements separately.
Existing box-node-sdk users
No migration is required. If box-node-sdk works for you, leave it. The box package is for developers — and their coding agents — starting fresh. Existing code is unaffected.
Open source
Thebox package is open source under the Apache 2.0 license at github.com/box/npm-box. Contributions go through pull requests against that repository.