fmt

The fmt command will format your BAML files.

Warning: Beta Feature

This feature is still in-progress, and does not yet support all BAML syntax.

Usage

baml-cli fmt [OPTIONS] [file.baml] [file2.baml] [file3.baml] ...

Details

To disable the formatter in a file, you can add

1// baml-format: ignore

anywhere in the file.

Formatting is done in-place and non-configurable.

The canonical formatter style uses four-space indentation. Class fields are written with a colon and trailing comma, for example name: string,; the formatter may accept and repair certain unambiguous alternate spellings.