Github inside the Command Line
Project description
cli-github
A Python App to display Github from the command-line
Live Demo
DEMO : Display the list of a user’s repositories from the username, along with the number of stargazers
DEMO : Display the list of a user’s repositories from the profile URL, along with the number of stargazers
DEMO : Display all the folders and files within a repository recursively from the repository URL, along with their sizes
DEMO : To get the RAW version of the readme file of a repository from the repository URL
Installation
Using pip
$ pip install cli-github
Latest build from the Source
Clone the repo
$ git clone https://github.com/harshasrinivas/cli-github.git
Run
$ python setup.py install
Dependencies
prettytable
$ pip install prettytable
Setting Up
Github Token as Permanent Environment Variable
Set your Github Personal Access Token as the environment variable GITHUB_TOKEN
$ echo "export GITHUB_TOKEN = <your-token-with-quotes>" | sudo tee -a /etc/environment
Github Token as Temporary Environment Variable
$ GITHUB_TOKEN = <your-token-with-quotes>
Without saving your Environment Variable
Open the file
$ cli_github/mains.py
Change this line
$ API_TOKEN = os.environ.get('GITHUB_TOKEN') to API_TOKEN = <your-token-with-quotes>
Options
-h, --help show this help message and exit
-n USERNAME, --username USERNAME
Get the list of repositories of the given username
-u URL, --url URL
Get repos from the user profile URL
-r RECURSIVE, --recursive RECURSIVE
Get the file structure from the repo link URL
-R README, --readme README
Get the raw version of the repository readme file from repo link URL
Usage
Display the list of a user’s repositories from the username
$ cli-github -n harshasrinivas
Display the list of a user’s repositories from the profile URL
$ cli-github -u https://github.com/harshasrinivas
Display all the files and folders within a repository recursively from the repository URL
$ cli-github -r https://github.com/harshasrinivas/cli-github
Get the RAW version of the readme file of a repository from the repository URL
$ cli-github -R https://github.com/harshasrinivas/cli-github
Contribute
If you want to add features, improve them, or report issues, feel free to send a pull request.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file cli-github-1.0.2.tar.gz
.
File metadata
- Download URL: cli-github-1.0.2.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61b12a21d4ab44c14f468e5d47771dea19ce4ba19586c55030cbda82b3eb10cf |
|
MD5 | 70639e2a941dc27a2ef45275ffbd998b |
|
BLAKE2b-256 | bd13fec8979a65ad4a73978bd7ce5f8f0b613ee1fbac9a42659bf9c3b0432d8c |