Giter Club home page Giter Club logo

hopp-cli's Introduction

Hoppscotch

Hoppscotch

Open Source API Development Ecosystem

contributions welcome Website Tests Tweet

Built with โค๏ธŽ by contributors


Hoppscotch

We highly recommend you take a look at the Hoppscotch Documentation to learn more about the app.

Support

Chat on Discord Chat on Telegram Discuss on GitHub

Features

โค๏ธ Lightweight: Crafted with minimalistic UI design.

โšก๏ธ Fast: Send requests and get responses in real time.

๐Ÿ—„๏ธ HTTP Methods: Request methods define the type of action you are requesting to be performed.

  • GET - Requests retrieve resource information
  • POST - The server creates a new entry in a database
  • PUT - Updates an existing resource
  • PATCH - Very similar to PUT but makes a partial update on a resource
  • DELETE - Deletes resource or related component
  • HEAD - Retrieve response headers identical to those of a GET request, but without the response body.
  • CONNECT - Establishes a tunnel to the server identified by the target resource
  • OPTIONS - Describe the communication options for the target resource
  • TRACE - Performs a message loop-back test along the path to the target resource
  • <custom> - Some APIs use custom request methods such as LIST. Type in your custom methods.

๐ŸŒˆ Theming: Customizable combinations for background, foreground, and accent colors โ€” customize now.

  • Choose a theme: System preference, Light, Dark, and Black
  • Choose accent colors: Green, Teal, Blue, Indigo, Purple, Yellow, Orange, Red, and Pink
  • Distraction-free Zen mode

Customized themes are synced with your cloud/local session.

๐Ÿ”ฅ PWA: Install as a Progressive Web App on your device.

  • Instant loading with Service Workers
  • Offline support
  • Low RAM/memory and CPU usage
  • Add to Home Screen
  • Desktop PWA

๐Ÿš€ Request: Retrieve response from endpoint instantly.

  1. Choose method
  2. Enter URL
  3. Send
  • Copy/share public "Share URL"
  • Generate/copy request code snippets for 10+ languages and frameworks
  • Import cURL
  • Label requests

๐Ÿ”Œ WebSocket: Establish full-duplex communication channels over a single TCP connection.

๐Ÿ“ก Server-Sent Events: Receive a stream of updates from a server over an HTTP connection without resorting to polling.

๐ŸŒฉ Socket.IO: Send and Receive data with the SocketIO server.

๐ŸฆŸ MQTT: Subscribe and Publish to topics of an MQTT Broker.

๐Ÿ”ฎ GraphQL: GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data.

  • Set endpoint and get schema
  • Multi-column docs
  • Set custom request headers
  • Query schema
  • Get query response

๐Ÿ” Authorization: Allows to identify the end-user.

  • None
  • Basic
  • Bearer Token
  • OAuth 2.0
  • OIDC Access Token/PKCE

๐Ÿ“ข Headers: Describes the format the body of your request is being sent in.

๐Ÿ“ซ Parameters: Use request parameters to set varying parts in simulated requests.

๐Ÿ“ƒ Request Body: Used to send and receive data via the REST API.

  • Set Content Type
  • FormData, JSON, and many more
  • Toggle between key-value and RAW input parameter list

๐Ÿ“ฎ Response: Contains the status line, headers, and the message/response body.

  • Copy the response to the clipboard
  • Download the response as a file
  • View response headers
  • View raw and preview HTML, image, JSON, and XML responses

โฐ History: Request entries are synced with your cloud/local session storage.

๐Ÿ“ Collections: Keep your API requests organized with collections and folders. Reuse them with a single click.

  • Unlimited collections, folders, and requests
  • Nested folders
  • Export and import as a file or GitHub gist

Collections are synced with your cloud/local session storage.

๐Ÿ“œ Pre-Request Scripts: Snippets of code associated with a request that is executed before the request is sent.

  • Set environment variables
  • Include timestamp in the request headers
  • Send a random alphanumeric string in the URL parameters
  • Any JavaScript functions

๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ Teams: Helps you collaborate across your teams to design, develop, and test APIs faster.

  • Create unlimited teams
  • Create unlimited shared collections
  • Create unlimited team members
  • Role-based access control
  • Cloud sync
  • Multiple devices

๐Ÿ‘ฅ Workspaces: Organize your personal and team collections environments into workspaces. Easily switch between workspaces to manage multiple projects.

  • Create unlimited workspaces
  • Switch between personal and team workspaces

โŒจ๏ธ Keyboard Shortcuts: Optimized for efficiency.

Read our documentation on Keyboard Shortcuts

๐ŸŒ Proxy: Enable Proxy Mode from Settings to access blocked APIs.

  • Hide your IP address
  • Fixes CORS (Cross-Origin Resource Sharing) issues
  • Access APIs served in non-HTTPS (http://) endpoints
  • Use your Proxy URL

Official proxy server is hosted by Hoppscotch - GitHub - Privacy Policy.

๐ŸŒŽ i18n: Experience the app in your language.

Help us to translate Hoppscotch. Please read TRANSLATIONS for details on our CODE OF CONDUCT and the process for submitting pull requests to us.

โ˜๏ธ Auth + Sync: Sign in and sync your data in real-time across all your devices.

Sign in with:

  • GitHub
  • Google
  • Microsoft
  • Email
  • SSO (Single Sign-On)1

๐Ÿ”„ Synchronize your data: Handoff to continue tasks on your other devices.

  • Workspaces
  • History
  • Collections
  • Environments
  • Settings

โœ… Post-Request Tests: Write tests associated with a request that is executed after the request's response.

  • Check the status code as an integer
  • Filter response headers
  • Parse the response data
  • Set environment variables
  • Write JavaScript code

๐ŸŒฑ Environments: Environment variables allow you to store and reuse values in your requests and scripts.

  • Unlimited environments and variables
  • Initialize through the pre-request script
  • Export as / import from GitHub gist
Use-cases
  • By storing a value in a variable, you can reference it throughout your request section
  • If you need to update the value, you only have to change it in one place
  • Using variables increases your ability to work efficiently and minimizes the likelihood of error

๐Ÿšš Bulk Edit: Edit key-value pairs in bulk.

  • Entries are separated by newline
  • Keys and values are separated by :
  • Prepend # to any row you want to add but keep disabled

๐ŸŽ›๏ธ Admin dashboard: Manage your team and invite members.

  • Insights
  • Manage users
  • Manage teams

๐Ÿ“ฆ Add-ons: Official add-ons for hoppscotch.

Add-ons are developed and maintained under Hoppscotch Organization.

For a complete list of features, please read our documentation.

Demo

hoppscotch.io

Usage

  1. Provide your API endpoint in the URL field
  2. Click "Send" to simulate the request
  3. View the response

Developing

Follow our self-hosting documentation to get started with the development environment.

Contributing

Please contribute using GitHub Flow. Create a branch, add commits, and open a pull request.

Please read CONTRIBUTING for details on our CODE OF CONDUCT, and the process for submitting pull requests to us.

Continuous Integration

We use GitHub Actions for continuous integration. Check out our build workflows.

Changelog

See the CHANGELOG file for details.

Authors

This project owes its existence to the collective efforts of all those who contribute โ€” contribute now.

License

This project is licensed under the MIT License โ€” see the LICENSE file for details.

Footnotes

  1. Enterprise edition feature. Learn more. โ†ฉ

hopp-cli's People

Contributors

aliesbelik avatar andrewbastin avatar arshchimni avatar athul avatar avelino avatar bro3886 avatar dependabot[bot] avatar devblin avatar gbmor avatar liyasthomas avatar shtakai avatar ssiyad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

hopp-cli's Issues

FEAT: Add support for inserting request body through external editor

Currently, for making request with request body with have to add the data in inline mode like this: '{"name": "morp","job": "zion resident"}' this is good for small data, but for more request data user may want better way.
For above mentioned problem, we add support for using external editor with default file (to take input for request data).
So, basically if the user wants to add data through editor, they can use a flag.

`headers` schema change

The headers schema seems to be different between hoppscotch.io and the hopp-cli. The CLI is expecting an array of strings, but hoppscotch.io produces an array of key/value objects. An example of an exported collection is below.

[
  {
    "name": "My Collection",
    "folders": [],
    "requests": [
      {
        "url": "https://httpbin.org",
        "path": "/get",
        "method": "GET",
        "auth": "None",
        "httpUser": "",
        "httpPassword": "",
        "passwordFieldType": "password",
        "bearerToken": "",
        "headers": [
          {
            "key": "My-Header",
            "value": "hello"
          }
        ],
        "params": [],
        "bodyParams": [],
        "rawParams": "",
        "rawInput": true,
        "contentType": "",
        "requestType": "",
        "preRequestScript": "// pw.env.set('variable', 'value');",
        "testScript": "// pw.expect('variable').toBe('value');",
        "label": "Test",
        "name": "Test",
        "collection": 0
      }
    ]
  }
]

Installation script seems bugged

Hello,

I tried to install through the script on Windows 10 (with WSL2) and then on a Linux VM (Ubuntu 20.04.3 LTS) without success. It prints the version and does nothing else :

julien@julien-VirtualBox:~$ sudo sh -c "$(curl -sL https://git.io/getpwcli)"
[sudo] Mot de passe de julienย : 
athul/pwcli info checking GitHub for latest tag
athul/pwcli info found version: 0.0.8 for v0.0.8/Linux/x86_64
julien@julien-VirtualBox:~$ hopp-cli --help
hopp-cliย : commande introuvable
julien@julien-VirtualBox:~$ 

I think the script is bugged.
Installation worked fine through downloading the release manually.

By the way what is pwcli ?

error parsing JSON: json: cannot unmarshal object into Go value of type []methods.Collection

running hopp-cli v0.0.8 (and v0.0.7) both in windows 10 and linux (ubuntu 22 via wsl) throws error parsing JSON: json: cannot unmarshal object into Go value of type []methods.Collection

my command .\hopp-cli.exe send .\base.json

base.json
{"v":1,"name":"base","folders":[],"requests":[{"v":"1","endpoint":"http://localhost:3010/todo","name":"a","params":[],"headers":[],"method":"GET","auth":{"authType":"none","authActive":true,"addTo":"Headers","key":"","value":""},"preRequestScript":"","testScript":"","body":{"contentType":null,"body":null}}]}

Typo in readme

The readme says the command is pwcli when the command is actualy hopp-cli

pwcli to hscli?

Since it was changed from PostWoman to Hoppscotch will change the name of this project?

Better Error Logs

The Errors logs just shows Go's usual Panic Output. Maybe we could wrap an abstraction for that. Like
Request Error or Check the URL/URI and Authentication

Script doesn't work on Arch.

It doesn't error either but the binary is nowhere to be found.

It would be great to submit a package to AUR.

I fixed it by downloading and moving the binary directly.

Validating URL

The URLs for requests are not validated and could sometimes lead to errors.

This can be easily fixed with net/url package

Update Goreleaser

Hopp-cli uses goreleaser version and yml from 2019 ๐Ÿ™ˆ . We want to update the goreleaser.yml file for better releasing and packaging. If anyone is willing to take this up, would be great.

For further questions you can ping me, making this an issue due to a backlog of changes

Brew Installation Failure

When trying to install via Brew it fails with the following:

% brew install athul/tap/hopp-cli
==> Tapping athul/tap
Cloning into '/usr/local/Homebrew/Library/Taps/athul/homebrew-tap'...
remote: Enumerating objects: 98, done.
remote: Counting objects: 100% (98/98), done.
remote: Compressing objects: 100% (86/86), done.
remote: Total 98 (delta 20), reused 18 (delta 2), pack-reused 0
Receiving objects: 100% (98/98), 13.68 KiB | 1.05 MiB/s, done.
Resolving deltas: 100% (20/20), done.
Error: Invalid formula: /usr/local/Homebrew/Library/Taps/athul/homebrew-tap/Formula/shelby.rb
shelby: /usr/local/Homebrew/Library/Taps/athul/homebrew-tap/Formula/shelby.rb:17: syntax error, unexpected end
      end
      ^~~
/usr/local/Homebrew/Library/Taps/athul/homebrew-tap/Formula/shelby.rb:25: syntax error, unexpected end
      end
      ^~~
/usr/local/Homebrew/Library/Taps/athul/homebrew-tap/Formula/shelby.rb:36: syntax error, unexpected end
      end
      ^~~
/usr/local/Homebrew/Library/Taps/athul/homebrew-tap/Formula/shelby.rb:44: syntax error, unexpected end
      end
      ^~~
/usr/local/Homebrew/Library/Taps/athul/homebrew-tap/Formula/shelby.rb:52: syntax error, unexpected end
      end
      ^~~
Error: Invalid formula: /usr/local/Homebrew/Library/Taps/athul/homebrew-tap/Formula/pwcli.rb
pwcli: Calling bottle :unneeded is disabled! There is no replacement.
Please report this issue to the athul/tap tap (not Homebrew/brew or Homebrew/core):
  /usr/local/Homebrew/Library/Taps/athul/homebrew-tap/Formula/pwcli.rb:6

Error: Cannot tap athul/tap: invalid syntax in tap!

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.