The beginnings of a CLI for use with Box.
-
If you do not already have a Box account, create one for free
-
Create a 'Custom App' in the Box Developer Console with whatever information you like
-
Configure your app to use 'OAuth 2.0 (User or Client Authentication)'
-
Set the 'OAuth 2.0 Redirect URI' to
http://localhost:3000/oauth
-
Under 'Application Scopes', check 'Write all files and folders stored in Box'
-
Fork/clone this repo and
cd
into it -
Run
npm install
-
Run
npm link
such that thebox
command is available in your path
-
Run
box setup
to configure your Box CLI -
Run
box user
to see if you are authenticated
- Run
box file upload <~/path/to/file.pdf> --folder 0
to upload a file to the root folder of your Box account
The codebase has been kept purposefully light such that it be easy for all to understand. It uses popular packages and basic concepts while having just enough pre-existing code to define some patterns/expectations for future contributions. Try adding support for CRUD operations on folders!