Giter VIP home page Giter VIP logo

gh-resto's Introduction

gh-resto - the github extension of resto

a CLI app can send pretty HTTP & API requests with TUI

this is the the github extension of resto, for more details refer to resto repo

demo

Installation

Installation requires a minimum version (2.0.0) of the the Github CLI to support extensions.

  • Install the GitHub CLI

  • then Install this extension:

gh extension install abdfnx/gh-resto
Installing Manually

to install this extension manually, you can do these steps:

  1. clone gh-resto repo

    # git
    git clone https://github.com/abdfnx/gh-resto
    
    # github cli
    gh repo clone abdfnx/gh-resto
  2. cd to it

    cd gh-resto
  3. install it locally

    gh extension install .

Usage

gh resto

gh-resto's People

Contributors

abdfnx avatar github-actions[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

gh-resto's Issues

Add support for secure token storage

Token storage change in latest release of gh

This is a message from the GitHub CLI team, maintainers of gh, writing to inform you that the most recent release of gh contains changes which may affect your extension. The latest release introduces the feature of storing authentication tokens in the system keyring (encrypted storage) instead of in a plain text file.
The keyrings that are supported are:

  • Keychain on macOS

  • GNOME Keyring on Linux (Secret Service dbus interface)

  • Wincred on Windows

This has huge security benefits for the users of our tool and was one of our oldest outstanding issues. Unfortunately this change has the potential to break extensions that rely on utilizing the users authentication token to work.

In order to have continued compatibility with gh there are some actions you, as an extension author, need to take. These actions will depend on the implementation of your extension.

Extensions built in Go using go-gh:

  1. Upgrade your go-gh version to v1.2.1, the latest version.

  2. Verify that in your extension retrieval of the user authentication token is done using the auth.TokenForHost function.

    • If you were previously accessing the authentication token using any other method it will no longer work.
    • Automatic resolution of the authentication token when using the API clients will continue to work without changes.

All other extensions:

  1. Verify that in your extension retrieval of the user authentication token is done by shelling out to the gh auth token command.

    • If you were previously accessing the authentication token using the gh config get command, reading the configuration file directly, or any other methods it will no longer work.

As of right now storing the authentication token in the system keyring is an opt-in feature, but in the near future it will be required and at that point if the changes above are not made then your extension will be broken for all users. If you have any questions/concerns about this change please feel free to open a discussion in the gh repo.

Thanks,
The GitHub CLI Team

gh resto is unusable

$ gh extension install abdfnx/gh-resto
Cloning into '/Users/austin/.local/share/gh/extensions/gh-resto'...
remote: Enumerating objects: 74, done.
remote: Counting objects: 100% (22/22), done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 74 (delta 14), reused 22 (delta 14), pack-reused 52
Receiving objects: 100% (74/74), 12.02 KiB | 820.00 KiB/s, done.
Resolving deltas: 100% (39/39), done.
βœ“ Installed extension abdfnx/gh-resto

$ gh resto
go: cannot find main module, but found .git/config in /Users/austin/.local/share/gh/extensions/gh-resto
	to create a module there, run:
	go mod init

$ gh extension remove abdfnx/gh-resto
βœ“ Removed extension resto

Installing resto with go install… works as expected.

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.