Skip to main content

CLI Usage

Prerequisites

You need to have installed the @genzy/cli library in your project.

Syntax

The syntax for generating the client code is simple, you need to run the genzy -l <language> -h <host> -o <output_dir> library and pass the following arguments:

genzy

  • -h - for help
  • -l - language
    • ts - generates the TypeScript client.
    • js - generates the JavaScript client.
  • -h - the url of the Genzy deployment.
  • -o - the path of the directory (existing or new) in which the client files will be stored.

Generating the Client

TypeScript

genzy -l ts -h http://localhost:3000 -o ./path/to/output/dir/

JavaScript

genzy -l js -h http://localhost:3000 -o ./path/to/output/dir/