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

Resto

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

demo

Installation

Using script

  • Shell
curl -fsSL https://git.io/resto | bash
  • PowerShell
iwr -useb https://git.io/resto-win | iex

then restart your powershell

Go package manager

go install github.com/abdfnx/resto@latest

GitHub CLI

gh extension install abdfnx/gh-resto

Usage

  • Open Resto UI

    resto
  • Send a request to a URL

    resto get https://api.github.com
  • Send a request to a URL and use resto editor

    resto post https://localhost:3000/v1/login --content-type json --editor
  • Read Body from stdin

    cat schema.graphql | resto post https://api.spacex.land/graphql --content-type graphql --body-stdin
  • Use Authentecation with Basic Auth or Bearer Token

    # Bearer Token
    resto delete https://api.secman.dev/api/logins/13 --content-type json --token TOKEN
    
    # Basic Auth
    resto delete https://api.secman.dev/api/logins/13 --content-type json --username USERNAME --password PASSWORD
  • Save response to a file

    resto get http://localhost:3333/api/v1/hello --save response.json

Flags

  1. GET & HEAD flags
-H, --headers           Just show the response headers
-j, --just-body         Just show the response body
-p, --password string   The password to use for basic authentication
-s, --save string       Save the response body to a file
-t, --token string      The bearer token to use for authentication
-u, --username string   The username to use for basic authentication
  1. POST, PUT, PATCH, DELETE flags
-b, --body string           The body of the request
-i, --body-stdin            Read the body from stdin
-c, --content-type string   The content type of the body
-e, --editor                Open the editor to edit the body
-H, --headers               Just show the response headers
-j, --just-body             Just show the response body
-p, --password string       The password to use for basic authentication
-s, --save string           Save the response to a file
-t, --token string          The bearer token to use for authentication
-u, --username string       The username to use for basic authentication

Documentation

Refer to resto website for the documentation. Or you can check out the Wiki.

Owner
Abdfn
The CLI is the future.
Abdfn
Comments
  • support `Resto` file

    support `Resto` file

    it's an great idea to support resto file, but why ?

    1. Send requests from files easily
    2. Save time
    3. a New Feature

    so I choose yaml as the file format and the file name is .resto.yml

    example

    method: "POST"
    url: "https://api.spacex.land/graphql"
    contentType: "application/graphql"
    openBodyEditor: true
    # if `openBodyEditor` is false
    body: |
       query {
         launchesPast(limit: 2) {
           mission_name
           launch_date_local
           launch_site {
             site_name_long
           }
    
           links {
             article_link
             video_link
           }
    
           rocket {
             rocket_name
             first_stage {
               cores {
                 flight
                 core {
                   reuse_count
                   status
                 }
               }
             }
    
             second_stage {
               payloads {
                 payload_type
                 payload_mass_kg
                 payload_mass_lbs
               }
             }
           }
    
           ships {
             name
             home_port
             image
           }
         }
       }
    authType: "Bearer"
    token: "MY_TOKEN"
    # or basic auth
    username: "USERNAME"
    password: "P@$$w0rd"
    

    that's it ๐Ÿ‘

  • Bump github.com/mattn/go-isatty from 0.0.14 to 0.0.16

    Bump github.com/mattn/go-isatty from 0.0.14 to 0.0.16

    Bumps github.com/mattn/go-isatty from 0.0.14 to 0.0.16.

    Commits
    • 13e91bf bump
    • 47c6087 update GitHub Workflow
    • f001b72 Merge pull request #75 from tjni/update-x-sys
    • 89699b9 Update golang.org/x/sys for Go 1.18 on M1 Macs.
    • cdb00f1 Merge pull request #68 from tklauser/fix-go.sum
    • 689cfc2 Update go.sum after golang.org/x/sys update
    • d423e9c Merge pull request #67 from tklauser/fix-go-version-gh-action
    • 65c33a1 Use correct field to specify Go version in GitHub action
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Bump github.com/tidwall/gjson from 1.14.1 to 1.14.2

    Bump github.com/tidwall/gjson from 1.14.1 to 1.14.2

    Bumps github.com/tidwall/gjson from 1.14.1 to 1.14.2.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Bump golang.org/x/sys from 0.3.0 to 0.4.0

    Bump golang.org/x/sys from 0.3.0 to 0.4.0

    โš ๏ธ Dependabot is rebasing this PR โš ๏ธ

    Rebasing might not happen immediately, so don't worry if this takes some time.

    Note: if you make any changes to this PR yourself, they will take precedence over the rebase.


    Bumps golang.org/x/sys from 0.3.0 to 0.4.0.

    Commits
    • b60007c unix: add Uvmexp and SysctlUvmexp for NetBSD
    • b751db5 unix: gofmt hurd files after CL 459895
    • b360406 unix: support TIOCGETA on GNU/Hurd
    • 3086868 unix: regen on OpenBSD 7.2
    • 2b11e6b unix: remove Mclpool from openbsd types
    • 7c6badc unix: convert openbsd/mips64 to direct libc calls
    • 3b1fc93 unix: avoid allocations for common uses of Readv, Writev, etc.
    • 2204b66 cpu: parse /proc/cpuinfo on linux/arm64 on old kernels when needed
    • 72f772c unix: offs2lohi should shift by bits, not bytes
    • cffae8e unix: add ClockGettime on *bsd and solaris
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Bump golang.org/x/term from 0.3.0 to 0.4.0

    Bump golang.org/x/term from 0.3.0 to 0.4.0

    Bumps golang.org/x/term from 0.3.0 to 0.4.0.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Bump github.com/mattn/go-isatty from 0.0.16 to 0.0.17

    Bump github.com/mattn/go-isatty from 0.0.16 to 0.0.17

    Bumps github.com/mattn/go-isatty from 0.0.16 to 0.0.17.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Bump golang.org/x/term from 0.1.0 to 0.3.0

    Bump golang.org/x/term from 0.1.0 to 0.3.0

    Bumps golang.org/x/term from 0.1.0 to 0.3.0.

    Commits
    • 97ca0e3 go.mod: update golang.org/x dependencies
    • f72a2d8 go.mod: update golang.org/x dependencies
    • f6f2839 term: remove unused variable
    • 8365914 go.mod: update golang.org/x dependencies
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Bump github.com/briandowns/spinner from 1.19.0 to 1.20.0

    Bump github.com/briandowns/spinner from 1.19.0 to 1.20.0

    Bumps github.com/briandowns/spinner from 1.19.0 to 1.20.0.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Bump github.com/jedib0t/go-pretty/v6 from 6.4.2 to 6.4.3

    Bump github.com/jedib0t/go-pretty/v6 from 6.4.2 to 6.4.3

    Bumps github.com/jedib0t/go-pretty/v6 from 6.4.2 to 6.4.3.

    Release notes

    Sourced from github.com/jedib0t/go-pretty/v6's releases.

    v6.4.3

    Bug-Fixes

    • progress
      • fix overall tracker disappearing when appending a tracker after current trackers are done (fixes #245) (thanks @โ€‹iyear)
    Commits
    • 7d190d0 progress: refactor AppendTracker for readability (#247)
    • 72834de progress: fix overall tracker disappears in corner case (#246)
    • 43456ae Create SECURITY.md (#243)
    • 9b55b26 table: refactor render helper function to separate file (#242)
    • 398d30f table: re-organize some tests, reduce cognitive complexity (#241)
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Bump minimatch from 3.0.4 to 3.1.2 in /scripts/gh-resto

    Bump minimatch from 3.0.4 to 3.1.2 in /scripts/gh-resto

    Bumps minimatch from 3.0.4 to 3.1.2.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the Security Alerts page.
  • Bump github.com/tidwall/gjson from 1.14.3 to 1.14.4

    Bump github.com/tidwall/gjson from 1.14.3 to 1.14.4

    Bumps github.com/tidwall/gjson from 1.14.3 to 1.14.4.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Feature request: Vim keybindings!

    Feature request: Vim keybindings!

    Hi all, great job with that TUI! I'm looking for some more ease navigation with some keybindings like Ctrl + J(to go down to next field) and Ctrl + K(to go up to previous field) and something like that. Also a F1 or ? keybind to show all keybindings. What do you think?

This CLI tool sends HTTP GET requests and print MD5 hash values of the response's body

HTTP Body Hash Generator This CLI (Command Line Interface) tool sends HTTP GET requests and print MD5 hash values of the response's body. Usage You ne

Feb 10, 2022
๐Ÿ’ผ CLI / TUI for Pocket
๐Ÿ’ผ CLI / TUI for Pocket

gocket A simple CLI (or TUI) for Pocket. Read your Pocket goodies from your comfy shell. Archive or delete multiple entries easily. Use a TUI or pipe

Aug 9, 2022
A CLI / TUI for Microsoft Teams
A CLI / TUI for Microsoft Teams

teams-cli A Command Line Interface (or TUI) to interact with Microsoft Teams Status The CLI only let you log-in and fetches your user and conversation

Dec 22, 2022
Tabouli: a TUI for interacting with firmware/embedded devices that support a CLI via serial interface/virtual COM Port
Tabouli: a TUI for interacting with firmware/embedded devices that support a CLI via serial interface/virtual COM Port

Tabouli Information Tabouli is a TUI for interacting with firmware/embedded devi

Apr 2, 2022
There is a certain amount of work to be done before you can implement the features of your Go powered CLI app

go-project-template-cli There is a certain amount of work to be done before you can implement the features of your Go powered CLI app. A few of those

Jan 23, 2022
CLI and web app to convert HTML markup to go-app.dev's syntax.
CLI and web app to convert HTML markup to go-app.dev's syntax.

HTML to go-app Converter CLI and web app to convert HTML markup to go-app.dev's syntax. Installation CLI Static binaries are also available on GitHub

Dec 18, 2022
Go terminal app listing open pull requests in chosen GitHub repositories
Go terminal app listing open pull requests in chosen GitHub repositories

go-pr-watcher About Shows open pull requests on configured GitHub repositories. Getting started Create GitHub personal token with read permissions Cre

Aug 23, 2022
code is pretty self explanatory and decently commented
code is pretty self explanatory and decently commented

square_approximation code is pretty self explanatory and decently commented when limit set to 10^9 or more ram usage goes to >42 gigs of ram which is

Apr 7, 2022
Gofetch is a pretty command-line "Go and System information" tool written in Go
Gofetch is a pretty command-line

GoFetch Show off your Go information with this cool command-line tool! Report Bug || Request Feature Table of Contents About the Project Built With Ge

Nov 1, 2022
PingMe is a CLI tool which provides the ability to send messages or alerts to multiple messaging platforms & email.
PingMe is a CLI tool which provides the ability to send messages or alerts to multiple messaging platforms & email.

PingMe is a personal project to satisfy my needs of having alerts, most major platforms have integration to send alerts but its not always useful, either you are stuck with one particular platform, or you have to do alot of integrations. I needed a small app which i can just call from my backup scripts, cron jobs, CI/CD pipelines or from anywhere to send a message with particular information. And i can ship it everywhere with ease. Hence, the birth of PingMe.

Dec 28, 2022
Parse .har files to create Go http requests

HAR-Parser Parse .har files to create Go http requests Usage $ ./HAR-Parser myfi

Jul 14, 2022
ghcv-cli makes it easy to view the user-created issues, pull requests, and repositories in the terminal.
ghcv-cli makes it easy to view the user-created issues, pull requests, and repositories in the terminal.

ghcv-cli ghcv-cli makes it easy to view the user-created issues, pull requests, and repositories in the terminal. About Show a list of pull requests c

Mar 13, 2022
TUI process monitor written in Go
TUI process monitor written in Go

pst This is TUI process monitor written in Go. Features Monitor process's list, info, tree, open files, Kill process Support OS Mac Linux Requirements

Nov 25, 2022
a TUI for signal messenger, written in Go
a TUI for signal messenger, written in Go

siggo A terminal ui for signal-cli, written in Go. Features vim-style ux useful for quick messages or use $EDITOR to compose fancy ones emoji support,

Jan 2, 2023
A powerful little TUI framework ๐Ÿ—
A powerful little TUI framework ๐Ÿ—

Bubble Tea The fun, functional and stateful way to build terminal apps. A Go framework based on The Elm Architecture. Bubble Tea is well-suited for si

Dec 27, 2022
Canard. A command line TUI client for the journalist RSS aggregator.
Canard. A command line TUI client for the journalist RSS aggregator.

Canard Canard. A command line TUI client for the Journalist RSS aggregator. Installation Download a binary from the releases page. Or build it yoursel

Jan 6, 2023
๐Ÿงญ TUI for command navigation
๐Ÿงญ TUI for command navigation

devgo a command-line launcher Install latest version curl -o- https://raw.githubusercontent.com/TheWinds/devgo/main/install.sh | bash special version

Apr 19, 2022
A terminal UI (TUI) for HashiCorp Nomad
A terminal UI (TUI) for HashiCorp Nomad

Damon - A terminal Dashboard for HashiCorp Nomad Damon is a terminal user interface (TUI) for Nomad. It provides functionality to observe and interact

Jan 6, 2023