tooljs-github
Version:
Tooling to create GitHub repo.
40 lines (28 loc) • 788 B
Markdown
# tooljs-github
Tooling to create GitHub repo.
## Getting Started
First, you need to [create an access token for command-line use on GitHub](https://help.github.com/articles/creating-an-access-token-for-command-line-use). Then copy the resulting API token, which looks something like this:
```
61a173086693b9cc513931cd71cee15f1813aeac
```
Then open `~/.bashrc` and add these two lines:
```
export GITHUB_USER=<yourusername>
export GITHUB_TOKEN=<yourtoken>
```
Then make sure to load up that script.
```
source ~/.bashrc
```
Now you should be ready to use the GitHub API from the command line!
## API
```js
var Repo = require('tooljs-github');
var repo = new Repo({
org: 'some-org',
repo: 'some-repo'
});
repo.exec(function(){
console.log('Created GitHub repo!');
});
```