Liyas Thomas 5d8b55e96b docs: fixed broken documentation links (#2997) 1 year ago
..
bin 909d524de5 Feature: hopp-cli in TypeScript (#2074) 2 years ago
src 5d8b55e96b docs: fixed broken documentation links (#2997) 1 year ago
.gitignore 909d524de5 Feature: hopp-cli in TypeScript (#2074) 2 years ago
.prettierrc 909d524de5 Feature: hopp-cli in TypeScript (#2074) 2 years ago
CODE_OF_CONDUCT.md 909d524de5 Feature: hopp-cli in TypeScript (#2074) 2 years ago
CONTRIBUTING.md c20339d222 fix: deprecated pnpx usage migrated to pnpm exec 2 years ago
LICENSE 909d524de5 Feature: hopp-cli in TypeScript (#2074) 2 years ago
README.md 3f59597864 feat: introducing self hosted admin dashboard package (#12) 1 year ago
jest.config.ts 432337b801 chore: tests for hoppscotch-cli (#2300) 2 years ago
jest.setup.ts 432337b801 chore: tests for hoppscotch-cli (#2300) 2 years ago
package.json 80a5d21576 chore: set web and common versions to 2023.4.0 and remove workspace package version specifiers 1 year ago
tsconfig.json 909d524de5 Feature: hopp-cli in TypeScript (#2074) 2 years ago
tsup.config.ts 909d524de5 Feature: hopp-cli in TypeScript (#2074) 2 years ago

README.md

# Hoppscotch CLI ALPHA

A CLI to run Hoppscotch test scripts in CI environments.

Commands:

  • hopp test [options] [file]: testing hoppscotch collection.json file

Usage:

hopp [options or commands] arguments

Options:

  • -v, --ver: see the current version of the CLI
  • -h, --help: display help for command

Command Descriptions:

  1. hopp -v / hopp --ver

    • Prints out the current version of the Hoppscotch CLI
  2. hopp -h / hopp --help

    • Displays the help text
  3. hopp test [options] <file_path>

    • Interactive CLI to accept Hoppscotch collection JSON path
    • Parses the collection JSON and executes each requests
    • Executes pre-request script.
    • Outputs the response of each request.
    • Executes and outputs test-script response.

    Options:

    -e <file_path> / --env <file_path>
    • Accepts path to env.json with contents in below format:

      {
          "ENV1":"value1",
          "ENV2":"value2"
      }
      
    • You can now access those variables using pw.env.get('<var_name>')

      Taking the above example, `pw.env.get("ENV1")` will return `"value1"`
      

Install

Install @hoppscotch/cli from npm by running:

npm i -g @hoppscotch/cli

Developing:

  1. Clone the repository, make sure you've installed latest pnpm.
  2. pnpm install
  3. cd packages/hoppscotch-cli
  4. pnpm run build
  5. sudo pnpm link --global
  6. Test the installation by executing hopp

Contributing:

To get started contributing to the repository, please read CONTRIBUTING.md