Skip to main content

Github inside the Command Line

Project description

cli-github

A Python App to display Github from the command-line!

Click here to see it live in action!

Build Status

Version

Downloads

Build Status

Version

Downloads

Version 1.0.7

  • Option to list releases of a user’s repo

  • Option to download tarball/zipball from repo link

  • Conformed to pep8 guidelines

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

DEMO : To get the list of releases from the user’s repository URL

DEMO : Download the tarball from the user’s repository URL

DEMO : Download the zipball from the user’s 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
  • future

    $ pip install future
  • python-dateutil

    $ pip install python-dateutil

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

$ cat cli_github/mains.py | sed -e "s/API_TOKEN = os.environ.get('GITHUB_TOKEN')/API_TOKEN = <your-token-with-quotes>/" > cli_github/mains.py

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
-re RELEASES, --releases RELEASES
                    Get the list of releases from repo link
-dt TARBALL, --tarball TARBALL
                    Download the tarball from repo link
-dz ZIPBALL, --zipball ZIPBALL
                    Download the zipball from repo link

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

Get the list of releases from the user’s repository URL

$ cli-github -R https://github.com/harshasrinivas/cli-github

Download the tarball of the any repo

$ cli-github -dt https://github.com/harshasrinivas/URL-screenshot

Download the zipball of the any repo

$ cli-github -dz https://github.com/harshasrinivas/URL-screenshot

Contribute

If you want to add features, improve them, or report issues, feel free to send a pull request.

Contributors

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cli-github-1.0.7.tar.gz (4.5 kB view details)

Uploaded Source

File details

Details for the file cli-github-1.0.7.tar.gz.

File metadata

  • Download URL: cli-github-1.0.7.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for cli-github-1.0.7.tar.gz
Algorithm Hash digest
SHA256 cce2d0e02eefb479967d1892d2bce052e3a6afefbedbb7c5721d202da396760d
MD5 834ffb4a973695bbb9ed1d2e86f4cf66
BLAKE2b-256 ae4000b8ed8beb3bab982565599d03c34fea2906564a58cb8625986d567bc068

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page