The generate command is used to generate BAML clients based on your BAML source files. It processes the BAML configurations and creates the necessary client code for your specified output type.
The generate command performs the following actions:
generators.baml).baml_client based on the generator configurations.Generate clients using default settings:
Generate clients from a specific directory:
Generate clients without version check:
Generate clients without test blocks (reduces file size):
The command provides informative output about the generation process:
--no-tests flag is useful for production builds where you want to minimize the generated client size. When enabled, test blocks defined in your BAML files are not included in the generated baml_client, reducing bundle size without affecting runtime functionality.