@adobe/helix-onedrive-cli
Helix OneDrive CLI
Last updated 6 days ago by adobe-admin .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @adobe/helix-onedrive-cli 
SYNC missed versions from official npm registry.

Helix OneDrive CLI

Project Helix OneDrive Command Line Interface Utility

Status

codecov CircleCI GitHub license GitHub issues LGTM Code Quality Grade: JavaScript semantic-release

Installation

$ npm install @adobe/helix-onedrive-cli

Usage

Usage: 1d <command>

Commands:
  1d me                   Show information about the logged in user.
  1d login                Start the login interactive flow or ROPC flow with username / password.
  1d logout               Logout be removing the authorization file.
  1d resolve <link>       Resolves a share link to the respective drive item.
  1d ls [path]            Lists the contents of the [path]
  1d get <path> [local]   downloads the file at path
  1d put <local> [path]]  upload the local file.

Options:
  --version      Show version number
  --verbose, -v  Run with verbose logging
  --help         Show help

Setup

The 1d client runs with a default client id which supports interactive login. Just run 1d login, copy paste the authorization code in the browser and sing into microsoft.

If you want to run the client with different parameters, you can provide a .env file containing the azure client-id and client-secret of your app.

# azure app oauth secrets
AZURE_APP_CLIENT_ID="11111111-1111-1111-1111-11111111111"
AZURE_APP_CLIENT_SECRET="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

After the .env is setup, start the dev server with:

$ npm start

and open a browser at: http://localhost:4502/.

click on the link to login. after successful login to microsoft, the server writes a .auth.json on disk. After that you can stop the server, and use the cli, eg:

$ 1d me
Logged in as: John Doe (john@example.com)

To reset authentication, just delete the .auth.json file and open the browser in private mode.

Login with device token

In order to login with a device token, run:

$ 1d login
To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code HNGP5CAF8 to authenticate.
updated .auth.json file.
$ 1d me
Logged in as: John Doe (john@doe.com)

Login with username / password

Some accounts and apps allow login with username and password (ROPC flow). Usually federated accounts require MFA, which disallow using ROPC.

$ 1d login --username=john@doe.com
password: ****
updated .auth.json file.
Logged in as: John Doe (john@doe.com)

Development

Build

$ npm install

Test

$ npm test

Lint

$ npm run lint

Current Tags

  • 1.6.10                                ...           latest (6 days ago)

34 Versions

  • 1.6.10                                ...           6 days ago
  • 1.6.9                                ...           6 days ago
  • 1.6.8                                ...           13 days ago
  • 1.6.7                                ...           13 days ago
  • 1.6.6                                ...           16 days ago
  • 1.6.5                                ...           16 days ago
  • 1.6.4                                ...           20 days ago
  • 1.6.3                                ...           a month ago
  • 1.6.2                                ...           a month ago
  • 1.6.1                                ...           2 months ago
  • 1.6.0                                ...           2 months ago
  • 1.5.6                                ...           2 months ago
  • 1.5.5                                ...           3 months ago
  • 1.5.4                                ...           3 months ago
  • 1.5.3                                ...           3 months ago
  • 1.5.2                                ...           3 months ago
  • 1.5.1                                ...           4 months ago
  • 1.5.0                                ...           4 months ago
  • 1.4.2                                ...           4 months ago
  • 1.4.1                                ...           5 months ago
  • 1.4.0                                ...           5 months ago
  • 1.3.1                                ...           5 months ago
  • 1.3.0                                ...           6 months ago
  • 1.2.7                                ...           6 months ago
  • 1.2.6                                ...           6 months ago
  • 1.2.5                                ...           6 months ago
  • 1.2.4                                ...           7 months ago
  • 1.2.3                                ...           8 months ago
  • 1.2.2                                ...           8 months ago
  • 1.2.1                                ...           8 months ago
  • 1.2.0                                ...           8 months ago
  • 1.1.1                                ...           9 months ago
  • 1.1.0                                ...           10 months ago
  • 1.0.0                                ...           10 months ago

Copyright 2014 - 2016 © taobao.org |