Coder Social home page Coder Social logo

baloo / boxcli Goto Github PK

View Code? Open in Web Editor NEW

This project forked from box/boxcli

0.0 1.0 0.0 6.37 MB

A command line interface for interacting with the Box API.

Home Page: https://developer.box.com

License: Apache License 2.0

JavaScript 99.39% HTML 0.61% Batchfile 0.01%

boxcli's Introduction

“box-dev-logo”

Box CLI

Project Status Platform Coverage

The Box CLI is a user-friendly command line tool which allows both technical and non-technical users to leverage the Box API to perform routine or bulk actions. There is no need to write any code, as these actions are executed through a set of commands.

Among other features, Box CLI includes the following functionality:

  • Bulk actions - A csv file can be used to execute commands in bulk, and each row of the spreadsheet is treated as an individual API call.
  • As-User header - Act on behalf of another user.
  • Search API - Search for files and folders in your Box Enterprise account.

Table of contents

Getting Started

The most convenient way to get start with Box CLI is to follow Box CLI with OAuth 2.0 guide. You will be guided how to configure Box application and install CLI on your machine.

CLI Installation

Installers are available for Windows and macOS. However, the raw source-code is available if you would like to build 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.

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

CLI and Server Authentication with JWT

Alternatively, to get started with the Box CLI, download and install CLI, set up a Box application using Server Authentication with JWT and download the JSON configuration file from the Configuration page of your app in the Box Developer Console following JWT CLI Guide. Then, set up the CLI by pointing it to your configuration file:

$ box configure:environments:add PATH_TO_CONFIG_FILE
Successfully added CLI environment "default"

If you manually generated your own private key to use with JWT authentication, you will need to point the CLI to the location of your private key file:

$ box configure:environments:add PATH_TO_CONFIG_FILE --private-key-path PATH_TO_PRIVATE_KEY --name ManualKey
Successfully added CLI environment "ManualKey"

Usage

$ box --version
box-cli/0.0.0 darwin-x64 node-v10.10.0
$ box users:get --help
Get information about a Box user

USAGE
  $ box users:get [ID]

ARGUMENTS
  ID  [default: me] ID of the user to get; defaults to the current user

OPTIONS
  -h, --help                             Show CLI help
  -s, --save                             Save report to default reports folder on disk
  -t, --token=token                      Provide a token to perform this call
  -v, --verbose                          Show verbose output, which can be helpful for debugging
  -y, --yes                              Automatically respond yes to all confirmation prompts
  --as-user=as-user                      Provide an ID for a user
  --bulk-file-path=bulk-file-path        File path to bulk .csv or .json objects
  --csv                                  Output formatted CSV
  --fields=fields                        Comma separated list of fields to show
  --json                                 Output formatted JSON
  --no-color                             Turn off colors for logging
  --save-to-file-path=save-to-file-path  Override default file path to save report
$ box users:get
Type: user
ID: '77777'
Name: Example User
Login: [email protected]
Created At: '2016-12-07T17:30:40-08:00'
Modified At: '2018-11-15T17:33:06-08:00'
Language: en
Timezone: America/Los_Angeles
Space Amount: 10737418240
Space Used: 53569393
Max Upload Size: 5368709120
Status: active
Job Title: ''
Phone: ''
Address: ''
Avatar URL: 'https://app.box.com/api/avatar/large/77777'

Command Topics

Questions, Bugs, and Feature Requests?

Browse the issues tickets! Or, if that doesn't work, file a new one and someone will get back to you. If you have general questions about the Box API, you can post to the Box Developer Forum.

Versions

We use a modified version of Semantic Versioning for all changes. See version strategy for details which is effective from 30 July 2022.

Supported Version

Only the current MAJOR version of SDK is supported. New features, functionality, bug fixes, and security updates will only be added to the current MAJOR version.

A current release is on the leading edge of our SDK development, and is intended for customers who are in active development and want the latest and greatest features. Instead of stating a release date for a new feature, we set a fixed minor or patch release cadence of maximum 2-3 months (while we may release more often). At the same time, there is no schedule for major or breaking release. Instead, we will communicate one quarter in advance the upcoming breaking change to allow customers to plan for the upgrade. We always recommend that all users run the latest available minor release for whatever major version is in use. We highly recommend upgrading to the latest SDK major release at the earliest convenient time and before the EOL date.

Version schedule

Version Supported Environments State First Release EOL/Terminated
3 Node.js >= 14 Supported 01 Feb 2022 TBD
2 EOL 14 Dec 2018 01 Feb 2022
1 EOL 01 Nov 2017 14 Dec 2018

Contributing to the Box CLI

  1. Clone this repo.
  2. Run npm install.
  3. Run npm test to ensure everything is working.
  4. Make the changes you want in the src/ directory. Be sure to add corresponding tests in the test/ directory!
  5. Create a pull request with your changes — we'll review it and help you get it merged.

For more information, please see the Contribution guidelines.

Copyright and License

Copyright 2018 Box, Inc. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

This software includes third party libraries, which are distributed under their own licenses' terms; see LICENSE-THIRD-PARTY.txt for details.

boxcli's People

Contributors

allenmichael avatar arjankowski avatar congminh1254 avatar sujaygarlanka avatar dependabot[bot] avatar mwwoda avatar box-sdk-build avatar mhagmajer avatar antusus avatar mgrytsai avatar pjsimon avatar swfree avatar cburnette avatar ppaulauskas avatar jcleblanc avatar m-nakamura145 avatar lukaszsocha2 avatar smartoneinok avatar bartlomiejleszczynski avatar ksyx avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.