Skip to main content
Version: v7.0.0

CLI

CLI is a tool that allows to automate some of the hyper-fetch features. It's a great way to get started with Hyper-Fetch and to automate your workflow by generating code and adding sdks.

npx @hyper-fetch/cli@latest

This basic command will open the wizard to guide you through the setup process.


Purpose
  1. Generate code from your api schema.
  2. Add sdks to your project from the remote locations.
  3. Automate your workflow by generating code and adding sdks.

Usage

You can use it in two ways - by going through wizard or passing individual arguments.

Wizard

To use the wizard, run the following command:

npx @hyper-fetch/cli@latest

It will guide you through the process of generating the client, requests and data models.

Custom arguments

You can also pass individual arguments to the command. Which is useful for the scripts.

npx @hyper-fetch/cli@latest {command}

Example:

npx @hyper-fetch/cli@latest generate

More

We will be covering individual commands in the next sections.

Initialize a cli project
Learn how to initialize new cli project
Generate sdk
Learn how to generate sdk from your api

Congratulations!

You've learned how to use the CLI in Hyper-fetch!

  1. You can use the wizard to guide you through the setup process.
  2. You can pass individual arguments to the command for more control.