Git Product home page Git Product logo

github_cli's Introduction

Command line tools to search github.com's v3 API

Installation

Just use pip like so:

pip install github_cli

Or clone the repo and add your twist:

git clone https://github.com/rlaneyjr/github_cli.git

Quick Run-down:

After installation, you will have two new commands "gh_find" and "gh_list". Use these two commands perform advanced queries on the Github v3 API. I wrote this simple script because got tired of typing curl commands that kept getting longer. Plus I could never remember how to stucture the URLs.

Example using curl:

curl https://api.github.com/search/repositories?q=tetris+language:assembly&sort=stars&order=desc

Command gh_find Usage:

gh_find [SEARCH_TYPE] [OPTIONS] QUERY

Search github.com for 'repo', 'user', or 'topic' using Github's v3 API query.

SEARCH_TYPE: repo - Find repositories via various criteria (100 results per page max). topic - Find topics via various criteria (100 results per page max). user - Find users via various criteria (100 results per page max).

OPTIONS: -l --long By default 'gh_find' will return a short list of repo names along with date created and date updated. Use this option to return more repo details. -s --sort Sort by stars, forks, help-wanted-issues, or updated. (Optional default=best-match) -o --order Order-by desc or asc. (Optional default=desc) -c --count Number of items to return. (Optional default=100)

QUERY: Type: Github API v3 query Format: 'SEARCH_KEYWORD_1+SEARCH_KEYWORD_N+QUALIFIER_1+QUALIFIER_N' Examples: 'GitHub+Octocat+in:readme+user:defunkt' or 'tetris+language:assembly' Details: 'https://developer.github.com/v3/search/#constructing-a-search-query'

Command gh_list Usage:

gh_list [OPTIONS] USER

List public repositories for the specified user.

OPTIONS: -l --long By default 'gh_list' will return a short list of repo names along with date created and date updated. Use this option to return more repo details. -s --sort Sort by stars, forks, help-wanted-issues, or updated. (Optional default=best-match) -c --count Number of items to return. (Optional default=100)

USER: Github username or email address.

Default fields returned: 'name' 'description' 'created_at' 'updated_at'

Long option fields returned: 'name' 'description' 'html_url' 'clone_url' 'language' 'fork' 'size' 'stargazers_count' 'watchers_count' 'open_issues_count' 'forks' 'created_at' 'updated_at'

Sort options: 'stars' 'forks' 'help-wanted-issues' 'updated' 'best-match'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.