New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

github-searcher-cli

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github-searcher-cli

GitHub Searcher from the command line

latest
Source
npmnpm
Version
1.4.0
Version published
Maintainers
1
Created
Source

Build Status npm npm

GitHub Searcher CLI

alt-text

Introduction

GitHub has some great search functionality (especially for code searches). That being said, it can be annoying to look for code samples in various repositories via the web search UI (especially when switching from doing work in the Terminal). Thus, this command line tool hopes to replace some of the functionality that the GitHub search service provides.

This CLI is in active development and is missing some key features I hope to implement (maybe with the help of you)!

Installation

npm install github-searcher-cli -g

Commands

ghs setup

This should be the first command you execute. It will ask for a personal access token that will be used to authenticate future requests.

ghs code

This command will allow you to search matching code fragments for a given search parameter set.

Query Parameters

  • A search query string is required
  • An organization (like github or owner name (like jaebradley is optional)
  • A repository name is also optional. If a None organization value is provided, the repository name will not be applied to the search
  • An optional language value (like Javascript)

There will be a selection of matching code fragments that are returned - these code fragments are searchable. When a code fragment is selected with return key down, the file associated with that code fragment will be opened in your default browser.

Unfortunately, inquirer.js doesn't deal with multiline list choices very well (especially when it comes to arrow key navigation). This is a known issue that this PR hopes to tackle.

Example

Search for instances of jaebradley across GitHub in Javascript files alt-text

Search for instances of jaebradley in the jaebradley/textstyler repository across Javascript files alt-text

Other search functionality (like searching issues or pull requests are forthcoming).

Keywords

github

FAQs

Package last updated on 19 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts