Usage: fy-tool [options] [args]
General options:
--help, -h : Display this help message
--version, -v : Display libfyaml version
--quiet, -q : Quiet operation (default false)
--debug-level, -d <lvl> : Set debug level (default 3)
--color, -C <mode> : Color output (on, off, auto) (default auto)
--visible, -V : Make whitespace and linebreaks visible (default false)
--dry-run : Do not parse/emit
Diagnostic options:
--disable-diag <x> : Disable diag error module <x>
--enable-diag <x> : Enable diag error module <x>
--show-diag <x> : Show diag option <x> (source, position, type, module)
--hide-diag <x> : Hide diag option <x> (source, position, type, module)
Parser options:
--include, -I <path> : Add directory to include path (default )
--json, -j <mode> : JSON input mode (no, force, auto) (default auto)
--resolve, -r : Perform anchor and merge key resolution (default false)
--yaml-1.1 : Enable YAML 1.1
--yaml-1.2 : Enable YAML 1.2
--yaml-1.3 : Enable YAML 1.3
--follow, -l : Follow aliases when using paths (default false)
--sloppy-flow-indentation : Enable sloppy indentation in flow mode (default false)
--prefer-recursive : Prefer recursive instead of iterative algorithms (default false)
--ypath-aliases : Use YPATH aliases (default false)
--allow-duplicate-keys : Allow duplicate keys (default false)
--collect-errors : Collect errors instead of outputting directly (default false)
--disable-accel : Disable access accelerators (default false)
--disable-buffering : Disable buffering (use unix fd) (default false)
--disable-mmap : Disable mmap usage
--disable-depth-limit : Disable depth limit (default false)
Emitter options:
--indent, -i <indent> : Set dump indent (default 2)
--width, -w <width> : Set dump width (inf for infinite) (default 80)
--mode, -m <mode> : Output mode (default original)
(original, block, flow, flow-oneline, json, json-tp, json-oneline, dejson, pretty, flow-compact, json-compact)
--sort, -s : Perform mapping key sort (default false)
--comment, -c : Output comments (experimental) (default false)
--strip-labels : Strip labels when emitting (default false)
--strip-tags : Strip tags when emitting (default false)
--strip-doc : Strip document headers and indicators (default false)
--strip-empty-kv : Strip keys with empty values (default false)
--null-output : Do not generate output
--no-ending-newline : Do not generate a final newline
--preserve-flow-layout : Preserve layout of single line flow collections
--indented-seq-in-map : Indent block sequences in block mappings
--streaming : Use streaming output mode (default true)
--no-streaming : Don't use streaming output mode
--recreating : Recreate streaming events (default false)
Testsuite options:
--disable-flow-markers : Disable testsuite's flow-markers (default false)
--disable-doc-markers : Disable testsuite's document-markers (default false)
--disable-scalar-styles : Disable testsuite's scalar styles (default false)
--document-event-stream : Generate a document and then produce events (default false)
--tsv-format : Display testsuite in TSV format (default false)
Input options:
--file, -f <file> : Use given file instead of <stdin>
(a leading '>' in the string is treated as literal content)
Join options:
--to, -T <path> : Join to path (default /)
--from, -F <path> : Join from path (default /)
--trim, -t <path> : Output given path (default /)
YPATH options:
--from, -F <path> : Start from path (default /)
--dump-pathexpr : Dump the path expression before the results
--noexec : Do not execute the expression
Compose options:
--dump-path : Dump the path while composing
B3SUM options:
--b3sum : BLAKE3 hash b3sum mode
--derive-key <context> : Key derivation mode
--no-names : Omit filenames
--raw : Output result in raw bytes
--length <n> : Output only this amount of bytes (max 32)
--check : Read files with BLAKE3 checksums and check
--keyed : Keyed mode (secret key from stdin)
--backend <backend> : Select a BLAKE3 backend
--list-backends : Print available backends
--num-threads <n> : Number of threads (-1: disable, 0: auto)
--file-buffer <n> : Size of file I/O buffer
--mmap-min-chunk <n> : Minimum mmap chunk size
--mmap-max-chunk <n> : Maximum mmap chunk size
Modes:
--dump : Dump mode (default)
--testsuite : Testsuite mode
--filter : Filter mode
--join : Join mode
--ypath : YPATH mode
--scan-dump : Scan-dump mode (internal)
--parse-dump : Parse-dump mode (internal)
--compose : Composer driver dump mode
--yaml-version-dump : Information about YAML versions
Options (77)
| Option | Description | Source |
|---|---|---|
--help, -h | Display the built-in help message. | help + man |
--version, -v | Display the libfyaml version. | help + man |
--quiet, -q | Suppress informational and non-fatal diagnostic output. | help + man |
--debug-level, -d lvl | Set the minimum diagnostic severity emitted by the library. | help + man |
--color, -C mode | : Color output (on, off, auto) (default auto) | help + man |
--visible, -V | Make spaces, tabs, and line breaks visible in text output. | help + man |
--dry-run | Parse the input but suppress normal output generation. | help + man |
--disable-diag x | Disable diagnostic output for the named module. | help + man |
--enable-diag x | Enable diagnostic output for the named module. | help + man |
--show-diag x | : Show diag option <x> (source, position, type, module) | help + man |
--hide-diag x | : Hide diag option <x> (source, position, type, module) | help + man |
--include, -I path | : Add directory to include path (default ) | help + man |
--json, -j mode | : JSON input mode (no, force, auto) (default auto) | help + man |
--resolve, -r | : Perform anchor and merge key resolution (default false) | help + man |
--yaml-1.1 | Force YAML 1.1 rules when the input does not declare a version. | help + man |
--yaml-1.2 | Force YAML 1.2 rules when the input does not declare a version. | help + man |
--yaml-1.3 | Force YAML 1.3 rules when the input does not declare a version. | help + man |
--follow, -l | Follow aliases during path traversal and related path-based operations. | help + man |
--sloppy-flow-indentation | : Enable sloppy indentation in flow mode (default false) | help + man |
--prefer-recursive | : Prefer recursive instead of iterative algorithms (default false) | help + man |
--ypath-aliases | Enable alias processing for ypath evaluation. | help + man |
--allow-duplicate-keys | : Allow duplicate keys (default false) | help + man |
--collect-errors | : Collect errors instead of outputting directly (default false) | help + man |
--disable-accel | : Disable access accelerators (default false) | help + man |
--disable-buffering | Disable stdio buffering and use direct file-descriptor reads. | help + man |
--disable-mmap | Disable memory-mapped input. | help + man |
--disable-depth-limit | Disable the normal nesting-depth limit. | help + man |
--indent, -i indent | Set the output indentation width. | help + man |
--width, -w width | : Set dump width (inf for infinite) (default 80) | help + man |
--mode, -m mode | : Output mode (default original) (original, block, flow, flow-oneline, json, json-tp, json-oneline, dejson, pretty, flow-compact, json-compact) | help + man |
--sort, -s | : Perform mapping key sort (default false) | help + man |
--comment, -c | : Output comments (experimental) (default false) | help + man |
--strip-labels | Strip anchors and aliases from emitted output. | help + man |
--strip-tags | : Strip tags when emitting (default false) | help + man |
--strip-doc | : Strip document headers and indicators (default false) | help + man |
--strip-empty-kv | : Strip keys with empty values (default false) | help + man |
--null-output | Suppress normal output generation. | help + man |
--no-ending-newline | Do not append a final trailing newline. | help + man |
--preserve-flow-layout | Preserve single-line flow collection layout when possible. | help + man |
--indented-seq-in-map | Indent block sequences that appear inside block mappings. | help + man |
--streaming | : Use streaming output mode (default true) | help + man |
--no-streaming | : Don't use streaming output mode | help + man |
--recreating | Recreate streaming events instead of passing them through directly. | help + man |
--disable-flow-markers | : Disable testsuite's flow-markers (default false) | help + man |
--disable-doc-markers | : Disable testsuite's document-markers (default false) | help + man |
--disable-scalar-styles | : Disable testsuite's scalar styles (default false) | help + man |
--document-event-stream | Build a document first and then generate the event stream from it. | help + man |
--tsv-format | : Display testsuite in TSV format (default false) | help + man |
--file, -f file | : Use given file instead of <stdin> (a leading '>' in the string is treated as literal content) | help + man |
--to, -T path | : Join to path (default /) | help + man |
--from, -F path | : Join from path (default /) | help + man |
--trim, -t path | Emit only PATH from the joined result. | help + man |
--dump-pathexpr | Dump the parsed path expression before evaluation. | help + man |
--noexec | Parse the expression but do not execute it. | help + man |
--dump-path | Dump the path while composing a document. | help + man |
--b3sum | Enable BLAKE3 hashing mode. | help + man |
--derive-key context | Use key-derivation mode with CONTEXT. | help + man |
--no-names | Omit file names from checksum output. | help + man |
--raw | : Output result in raw bytes | help + man |
--length n | Emit only N output bytes, up to the BLAKE3 maximum. | help + man |
--check | : Read files with BLAKE3 checksums and check | help + man |
--keyed | Use keyed hashing, reading the secret key from standard input. | help + man |
--backend backend | Select the BLAKE3 backend implementation. | help + man |
--list-backends | List available BLAKE3 backends. | help + man |
--num-threads n | : Number of threads (-1: disable, 0: auto) | help + man |
--file-buffer n | Set the per-file I/O buffer size. | help + man |
--mmap-min-chunk n | Set the minimum chunk size used for memory-mapped hashing input. | help + man |
--mmap-max-chunk n | Set the maximum chunk size used for memory-mapped hashing input. | help + man |
--dump | : Dump mode (default) | help + man |
--testsuite | Select testsuite mode. | help + man |
--filter | Select filter mode. | help + man |
--join | Select join mode. | help + man |
--ypath | Select ypath query mode. | help + man |
--scan-dump | Select the internal scan-dump mode. | help + man |
--parse-dump | Select the internal parse-dump mode. | help + man |
--compose | Select composer-driver dump mode. | help + man |
--yaml-version-dump | : Information about YAML versions | help + man |
Examples (7) from the manual page, untested
fy-dump invoice.yaml
Dump a YAML file back out using the default emitter mode:fy-dump -r --strip-labels simple-anchors.yaml
Resolve anchors and strip labels from the result:fy-filter --file \">foo: bar\" /
Read literal input text via --file:fy-filter --file simple-anchors.yaml /baz/bar
Select data from a file using a path expression:fy-join simple-anchors.yaml invoice.yaml
Join two root mappings into a single document:fy-testsuite invoice.yaml
Generate testsuite event output:fy-b3sum --list-backends
List available BLAKE3 backends: