gistjs v0.2.5
gistjs
Node.js meets gist
Install
Using npm.
$ npm install -g gistjsCommand
To upload the contents of a.js just:
$ gistjs a.jsUpload multiple files:
$ gistjs a b c
$ gistjs *.jsUse -p to make the gist private:
$ gistjs -p a.jsUse -d to add a description:
$ gistjs -d "Hello World" a.jsLogin
If you want to associate your gists with your GitHub account, you need to login with gistjs. It doesn't store your username and password, it just uses them to get an OAuth2 token (with the "gist" permission).
$ gistjs --login
Obtaining OAuth2 access_token from github.
[?] GitHub username: watilde
[?] GitHub password:
[?] 2-factor auth code:
Success! https://github.com/settings/applicationsYou can read the 2-factor auth code from an sms or the authentification app, depending on how you set your account up.
Note: 2-factor authentication just appeared recently, so if you run into errors, update the gistjs npm.
npm update -g gistjsThis token is stored in /path/to/gistjs/.token and used for all future gisting. If you need to you can revoke it from https://github.com/settings/applications, or just delete the file.
After you've done this, you can still upload gists anonymously with -a.
$ gistjs -a a.jsLogout
Remove /path/to/gistjs/.token
$ gistjs --logoutSave other token
You can save token when you have already got token.
$ gistjs --save other_tokenbased on
Thanks for defunkt/gist <3
