Skip to Content
CLI referencegensx build

gensx build

The gensx build command compiles and bundles a GenSX workflow for deployment to GenSX Cloud.

Usage

gensx build <file> [options]

Arguments

ArgumentDescription
<file>Workflow file to build (e.g., src/workflows.tsx). This should export an object with one or more GenSX workflows

Options

OptionDescription
-o, --out-dir <dir>Output directory for the built files.
-t, --tsconfig <file>Path to a custom TypeScript configuration file.
-h, --helpDisplay help for the command.

Description

This command builds your GenSX workflow into an optimized bundle that can be deployed to GenSX Cloud. It:

  • Transpiles TypeScript to JavaScript
  • Bundles all dependencies
  • Optimizes the code for production
  • Prepares the workflow for deployment

After building, the command outputs the path to the bundled file, which can be used with the gensx deploy command.

Examples

# Build a workflow with default options gensx build src/workflows.tsx # Build a workflow with a custom output directory gensx build src/workflows.tsx --out-dir ./dist # Build a workflow with a custom TypeScript configuration gensx build src/workflows.tsx --tsconfig ./custom-tsconfig.json

Notes

  • The build process requires that your workflow file exports an object with one or more GenSX workflows.
  • gensx build requires Docker to be running
  • If no output directory is specified, the build files will be placed in a .gensx directory
  • The build process does not include environment variables - these should be provided during deployment
Last updated on