Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joelpurra/github-data-cli
A small set of functionality to retrieve repository data from github, in JSON format.
https://github.com/joelpurra/github-data-cli
api cli github json shell
Last synced: 6 days ago
JSON representation
A small set of functionality to retrieve repository data from github, in JSON format.
- Host: GitHub
- URL: https://github.com/joelpurra/github-data-cli
- Owner: joelpurra
- License: gpl-3.0
- Created: 2017-06-22T06:32:01.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-02-04T08:06:21.000Z (almost 5 years ago)
- Last Synced: 2024-10-12T14:31:07.327Z (about 1 month ago)
- Topics: api, cli, github, json, shell
- Language: Shell
- Homepage: https://joelpurra.com/projects/github-data-cli/
- Size: 28.3 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [github-data-cli](https://joelpurra.com/projects/github-data-cli/): `ghd`
A small set of functionality to retrieve repository data from github, in JSON format.
## Installation
No installation required, as you can execute `ghd` using the full file path from anywhere. For convenience symlink `ghd` to your `PATH`.
```bash
ln -s "$PWD/ghd" "$HOME/bin/ghd"
```## Usage
Make sure you have loaded relevant github credentials by setting the following environment variables. Get your own credentials by [registering a new github oauth application](https://github.com/settings/applications/new). The values for application name, homepage url, application description, and authorization callback url do not matter for `ghd`; pick your own values.
- `GITHUB_CLIENT_ID`
- `GITHUB_CLIENT_SECRET`Authenticate yourself. If enabled, you will be asked for a 2-factor authentication code.
```bash
ghd authenticate
```Now execute the main command.
```bash
ghd
``````text
Usage: ghd
Source folder: .../github-data-cli
Actions available in the source folder:
authenticate
contributors
diff-contributors
diff-help
diff-stargazers
diff
help
repositories-help
repositories-json
repositories-list
repositories
star
stargazers
unstar
```## Notes
- These scripts grew "organically", starting from nothing. The first need was a function for shared credentials, then pagination, then caching, then then then. Don't judge the code style too harshly, unless you have concrete suggestions in the form of a pull request ;)
---
Copyright © 2016, 2017, 2018 [Joel Purra](https://joelpurra.com/). Released under [GNU General Public License version 3.0 (GPL-3.0)](https://www.gnu.org/licenses/gpl.html).