Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sheepla/gh-fzrepo

🚀 An extension for GitHub CLI to browse repositories with fzf
https://github.com/sheepla/gh-fzrepo

bash cli fzf-scripts gh-extension github-api github-cli

Last synced: 30 days ago
JSON representation

🚀 An extension for GitHub CLI to browse repositories with fzf

Awesome Lists containing this project

README

        

# 🚀 gh-fzrepo




An extension for [GitHub CLI](https://github.com/cli/cli) to browse repositories with fzf

## Demo on asciinema.org

> [https://asciinema.org/a/435075](https://asciinema.org/a/435075)

[![asciicast](https://asciinema.org/a/435075.svg)](https://asciinema.org/a/435075)

## Features

- [x] Quickly browse the README of each repository
- [x] Open URL of the repository in your default browser immediately

## Usage

```
gh fzrepo -- An extension for GitHub CLI to browse repositories with fzf

USAGE
gh fzrepo KEYWORDS...
gh fzrepo -h|--help
gh fzrepo -V|--version
```

### Keybindings

| key | function |
|-----|----------|
| `Ctrl+J`, `Ctrl+N` | move focus down |
| `Ctrl+K`, `Ctrl+P` | move focus up |
| `Enter` | view README with `gh repo view` |
| `Ctrl+O` | open URL of the repository in your default browser |
| `Esc`, `q` | quit fzf |

## Installation

Dependences:

- [GitHub CLI](https://github.com/cli/cli) v2.0.0+
- [junegunn/fzf](https://github.com/junegunn/fzf)

```bash
gh extension install sheepla/gh-fzrepo
```

## One Liner Edition

```bash
query="..."; gh api "search/repositories?q=${query}" --jq ".items[].full_name" | fzf --preview "gh repo view {}" --bind "enter:execute(gh repo view {})" --bind "ctrl-o:execute(gh repo view -w {})"
```

## Contribution

Welcome!