Generate SDK in a Subdirectory

Similar to setting up a monorepo, you can also configure Speakeasy to generate your SDK into a subdirectory. This setup maybe useful in maintaining seperation between handwritten and generated code or for consuming the SDK in a monolithic codebase.

Step 1:

In the root of your existing directory run speakeasy quickstart:

A screenshot of the speakeasy quickstart command in the CLI.

Step 2:

Select your generation language.

A screenshot of the CLI prompting the user to select their generation language.

Step 3:

Name your package.

A screenshot of the package name in the Speakeasy CLI.

Step 4:

If you’re setting your SDK up in a folder with existing subfolders, you will be prompted to select an output directory.

A screenshot of the user being prompted to provide an output directory in the CLI.

Step 5:

Complete generating your SDK.

A screenshot of a succesful CLI generation.

Going forward to generate your SDK navigate to your SDK folder and run speakeasy run.