yangfmt

YANG code formatter

Install

Clone the repo, then:

$ cargo install --path .

Pre-compiled binaries will be provided when the project has stabilized.

Usage

Pipe YANG source code to STDIN:

$ cat my-model.yang | yangfmt

Or specify a YANG file as the first positional argument:

$ yangfmt my-model.yang

Add -i to format the given YANG file in place:

$ yangfmt -i my-model.yang

Status

Experimental! Use with caution.

TODO: