git
gitlogin
npm i gitlogin
git

gitlogin

Modern, simplified Github login, CLI and API - generating personal access token. Support promises and node-style callbacks.

by Charlike Mike Reagent

0.0.1 (see all)License:MITTypeScript:Not FoundCategories:Vanilla JavaScript GitHub Login API
npm i gitlogin
Readme

npm versi mit license build status coverage status deps status

Modern, simplified Github login, CLI and API - generating personal access token. Support promises and node-style callbacks.

Install

npm install gitlogin
npm test
gitlogin --help

Usage

For more use-cases see the tests. You can run node example.js to try it.

var gitlogin = require('gitlogin');

var opts = {
  //auth: 'username:password'
  username: 'your github username',
  password: 'your github pass',
  scopes: ['repo', 'gist'],
  note: 'My awesome cli login'
};

// callback-style
gitlogin(opts, function cb(err, res) {
  console.log('FROM CB:', err, res);
})

// or promise-style
gitlogin(opts)
.then(console.log)
.catch(console.error)

// or hybrid
gitlogin(opts, function cb(err, res) {
  console.log('FROM CB:', err, res);
})
.then(console.log)
.catch(console.error)

API

CLI

$ gitlogin --help

  Modern, simplified Github login, CLI and API - generating personal access token. Support promises and node-style callbacks.

  Options
    --help                   Show this help
    --version                Current version of package
    -u | --username          Your Github username, required
    -p | --password          Your Github password, required
    -s | --scopes            Scopes for github, not required
    -n | --note              Note for the app, not required
    -t | --token-only        If you want to show only token
    -j | --json         Output full JSON.stringified response

  Usage
    gitlogin <username> <password> [scopes] [note]
    gitlogin -p <password> -n [note] -u <username> -s [scopes]

  Examples
    gitlogin tunnckoCore myPassword 'repo, gist, delete_repo' 'some note for app'
    gitlogin tunnckoCore myPassword repo,gist,delete_repo 'some note for app'
    gitlogin tunnckoCore myPassword '' '' true false
    gitlogin --username tunnckoCore --password myPassword
    gitlogin --scopes repo,gist,delete_repo -u tunnckoCore -n myAwesomeApp -p myPassword
    gitlogin -u tunnckoCore -p myPassword

Author

Charlike Mike Reagent

License MIT license

Copyright (c) 2014 Charlike Mike Reagent, contributors.
Released under the MIT license.


Powered and automated by readdirp + hogan.js, December 24, 2014

Downloads/wk

3

GitHub Stars

2

LAST COMMIT

7yrs ago

MAINTAINERS

1

CONTRIBUTORS

1

OPEN ISSUES

4

OPEN PRs

0
VersionTagPublished
0.0.1
latest
7yrs ago
No tutorials found
Add a tutorial