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
After some time your access token will expire. You can refresh it by running box setup
again.