Before using this tool, you should know the basics of yaml.
fsyaml allows you to split up your large yaml files into multiple ones, and then easily compile them back into one file when needed.
For example, consider the following yaml:
a:
b: 1
c:
d:
e: 2It could be restructured in your file system as:
root
├─a.yaml
└─c
└─d.yaml
Where a.yaml is:
b: 1and d.yaml is:
e: 2This allows you to separate out your file, and can make huge files much more maintainable.
To see the above example in action, you can visit tests/readme_example.
For more examples, see tests, which each contain a root directory and the expected.yaml output.
Once you've set up your file system of yaml files, you'll need to eventually combine them all back into one.
To do this, you'll install fsyaml.
One way is by release binary from the latest release.
On windows, you can add it to any folder as long as you add that folder to the path.
On linux, simply add it to your bin folder.
Another way is using cargo, which you can install by following these instructions.
After that, you can run a simple command in your terminal:
cargo install fsyamlOnce you've installed fsyaml, you can use it like so:
fsyaml path/to/root output.yamlfsyaml path/to/root > output.yamlDisclaimer: This will not work on windows, and will output with UTF-16 LE encoding (Read more here)
This is a list of limitations to fsyaml that are not currently supported. If you'd like to tackle one of them, feel free to open a pull request!
- Lists by file structure is not supported (only maps)
- Maps by file structure are not order-consistent across platforms
- Merge keys are not supported (unsure about this, not technically official YAML spec)
- Symbolic linking is not supported
Dual-licensed under MIT or Apache-2.0

