FY-TOOL(1)

๐Ÿ’… FY-TOOL(1) โ€” the libfyaml girlies' guide

okay so first things first: this is the FY-TOOL(1) page from libfyaml, and it's literally the whole tour of the command-line front-end. buckle up bestie ๐ŸŽ€


โœจ NAME โœจ

fy-tool โ€” the docs for fy-tool, periodt. yes that's the whole name section, it's giving minimalism ๐Ÿ’…


๐ŸŒธ SYNOPSIS ๐ŸŒธ

fy-tool [OPTIONS] [<file> โ€ฆ]

fy-dump [OPTIONS] [<file> โ€ฆ]

fy-testsuite [OPTIONS] <file>

fy-filter [OPTIONS] [-f FILE] [<path> โ€ฆ]

fy-join [OPTIONS] [-T PATH] [-F PATH] [-t PATH] [<file> โ€ฆ]

fy-ypath [OPTIONS] <ypath-expression> [<file> โ€ฆ]

fy-compose [OPTIONS] [<file> โ€ฆ]

fy-b3sum [OPTIONS] [<file> โ€ฆ]

seven whole personalities, and honestly? all of them slay ๐Ÿฆ‹


๐Ÿ’– DESCRIPTION ๐Ÿ’–

fy-tool is the libfyaml command-line front-end, and it's out here doing the absolute most: parsing, rewriting, querying, joining, testing and hashing YAML and JSON data. main character energy fr ๐Ÿ”ฅ

the executable switches up its behaviour one of two ways:

  • by the invoked program name โ€” fy-dump, fy-testsuite, fy-filter, fy-join, fy-ypath, fy-compose, fy-b3sum
  • by an explicit mode-select option, like --dump or --filter

and the default mode? that's dump. no cap ๐Ÿ’œ


๐ŸŒˆ OPTIONS ๐ŸŒˆ

๐Ÿซถ General options

  • -h, --help โ€” shows the built-in help message.
  • -v, --version โ€” prints the libfyaml version.
  • -q, --quiet โ€” mutes informational output and non-fatal diagnostic output. quiet queen behaviour ๐Ÿ™ˆ
  • -d LEVEL, --debug-level LEVEL โ€” sets the minimum diagnostic severity the library will emit. default is 3 (warning level).
  • -C MODE, --color MODE โ€” controls ANSI color output. values: on, off, auto. default is auto.
  • -V, --visible โ€” makes spaces, tabs and line breaks actually visible in text output. see the invisible, iconic โœจ
  • --dry-run โ€” parses the input but suppresses normal output generation. all vibes, no output ๐Ÿ’€

๐Ÿ” Diagnostic options

  • --disable-diag MODULE โ€” turns off diagnostic output for the named module.
  • --enable-diag MODULE โ€” turns on diagnostic output for the named module.
  • --show-diag OPTION โ€” shows the named diagnostic field. values: source, position, type, module.
  • --hide-diag OPTION โ€” hides the named diagnostic field.

๐Ÿงš Parser options

  • -I DIR, --include DIR โ€” adds DIR to the input include search path.
  • -j MODE, --json MODE โ€” picks the JSON input handling. values: no, force, auto. default is auto.
  • -r, --resolve โ€” resolves anchors and merge keys while parsing. lowkey a lifesaver ๐Ÿซถ
  • --yaml-1.1 โ€” forces YAML 1.1 rules when the input doesn't declare a version.
  • --yaml-1.2 โ€” forces YAML 1.2 rules when the input doesn't declare a version.
  • --yaml-1.3 โ€” forces YAML 1.3 rules when the input doesn't declare a version.
  • -l, --follow โ€” follows aliases during path traversal and related path-based operations.
  • --sloppy-flow-indentation โ€” accepts relaxed indentation rules in flow mode. we love a chill parser ๐Ÿ“
  • --prefer-recursive โ€” prefers recursive algorithms over iterative ones.
  • --ypath-aliases โ€” enables alias processing for ypath evaluation.
  • --allow-duplicate-keys โ€” allows duplicate mapping keys.
  • --collect-errors โ€” collects multiple parsing errors before reporting failure. efficient ๐Ÿ’…
  • --disable-accel โ€” disables parser/emitter acceleration features.
  • --disable-buffering โ€” disables stdio buffering and uses direct file-descriptor reads.
  • --disable-mmap โ€” disables memory-mapped input.
  • --disable-depth-limit โ€” disables the normal nesting-depth limit. deep nesting girlies, be free ๐Ÿฆ‹

๐ŸŽ€ Emitter options

  • -i INDENT, --indent INDENT โ€” sets the output indentation width. default is 2.
  • -w WIDTH, --width WIDTH โ€” sets the preferred output width. use inf for no width limit. default is 80.
  • -m MODE, --mode MODE โ€” selects the output style. values: original, block, flow, flow-oneline, json, json-tp, json-oneline, dejson, pretty, flow-compact, json-compact. the buffet of aesthetics ๐Ÿ˜ญ
  • -s, --sort โ€” sorts mapping keys before emitting output.
  • -c, --comment โ€” preserves and emits comments where supported. protect the commentary ๐Ÿ‘‘
  • --strip-labels โ€” strips anchors and aliases from emitted output.
  • --strip-tags โ€” strips emitted tags.
  • --strip-doc โ€” strips document start and end markers.
  • --strip-empty-kv โ€” omits keys whose values are empty or null.
  • --null-output โ€” suppresses normal output generation.
  • --no-ending-newline โ€” doesn't append a final trailing newline.
  • --preserve-flow-layout โ€” preserves single-line flow collection layout when possible.
  • --indented-seq-in-map โ€” indents block sequences that appear inside block mappings.
  • --streaming โ€” uses streaming output mode. this is the default.
  • --no-streaming โ€” disables streaming output mode.
  • --recreating โ€” recreates streaming events instead of passing them through directly.

๐Ÿ’€ Testsuite options

  • --disable-flow-markers โ€” omits testsuite flow markers.
  • --disable-doc-markers โ€” omits testsuite document markers.
  • --disable-scalar-styles โ€” omits testsuite scalar-style markers.
  • --document-event-stream โ€” builds a document first and then generates the event stream from it.
  • --tsv-format โ€” emits testsuite output in TSV format.

๐Ÿ“ Input options

  • -f FILE, --file FILE โ€” reads from FILE instead of standard input, wherever the selected mode uses a single input source. and plot twist: if FILE begins with >, the remaining text is treated as literal input content ๐Ÿซถ

๐Ÿงต Join options

  • -T PATH, --to PATH โ€” joins into PATH. default is /.
  • -F PATH, --from PATH โ€” takes joined input from PATH. default is /.
  • -t PATH, --trim PATH โ€” emits only PATH from the joined result. default is /.

๐Ÿ”ฎ YPATH options

  • -F PATH, --from PATH โ€” starts evaluation from PATH. default is /.
  • --dump-pathexpr โ€” dumps the parsed path expression before evaluation.
  • --noexec โ€” parses the expression but doesn't execute it.

๐Ÿงšโ€โ™€๏ธ Compose options

  • --dump-path โ€” dumps the path while composing a document.

โญ B3SUM options

  • --b3sum โ€” enables BLAKE3 hashing mode.
  • --derive-key CONTEXT โ€” uses key-derivation mode with CONTEXT.
  • --no-names โ€” omits file names from checksum output.
  • --raw โ€” emits raw digest bytes.
  • --length N โ€” emits only N output bytes, up to the BLAKE3 maximum.
  • --check โ€” verifies checksums read from input files.
  • --keyed โ€” uses keyed hashing, reading the secret key from standard input. ๐Ÿคซ
  • --backend BACKEND โ€” selects the BLAKE3 backend implementation.
  • --list-backends โ€” lists the available BLAKE3 backends.
  • --num-threads N โ€” sets the worker-thread count. 0 means automatic selection, and -1 disables threaded hashing.
  • --file-buffer N โ€” sets the per-file I/O buffer size.
  • --mmap-min-chunk N โ€” sets the minimum chunk size used for memory-mapped hashing input.
  • --mmap-max-chunk N โ€” sets the maximum chunk size used for memory-mapped hashing input.

๐Ÿ‘‘ Modes

  • --dump โ€” selects dump mode. this is the default, and it's also the mode used by fy-dump.
  • --testsuite โ€” selects testsuite mode. also the mode used by fy-testsuite.
  • --filter โ€” selects filter mode. also the mode used by fy-filter.
  • --join โ€” selects join mode. also the mode used by fy-join.
  • --ypath โ€” selects ypath query mode. also the mode used by fy-ypath.
  • --scan-dump โ€” selects the internal scan-dump mode.
  • --parse-dump โ€” selects the internal parse-dump mode.
  • --compose โ€” selects composer-driver dump mode. also the mode used by fy-compose.
  • --yaml-version-dump โ€” prints YAML version information.

๐Ÿฆ‹ EXAMPLES ๐Ÿฆ‹

dump a YAML file back out using the default emitter mode:

$ fy-dump invoice.yaml

resolve anchors and strip labels from the result:

$ fy-dump -r --strip-labels simple-anchors.yaml

read literal input text via --file:

$ fy-filter --file ">foo: bar" /

select data from a file using a path expression:

$ fy-filter --file simple-anchors.yaml /baz/bar

join two root mappings into a single document:

$ fy-join simple-anchors.yaml invoice.yaml

generate testsuite event output:

$ fy-testsuite invoice.yaml

list available BLAKE3 backends:

$ fy-b3sum --list-backends

every single one of these? ate. ๐Ÿ”ฅ


๐Ÿ’œ AUTHOR ๐Ÿ’œ

Pantelis Antoniou <pantelis.antoniou@konsulko.com> โ€” the icon behind it all ๐Ÿ‘‘


๐Ÿ™ˆ BUGS ๐Ÿ™ˆ (known Ls, not gonna lie)

  • the only supported input and output character encoding is UTF8. that's it, that's the whole encoding buffet ๐Ÿ’€
  • sorting does not respect language settings. sorry locale girlies ๐Ÿ˜ญ
  • there is no way for the user to specify a different coloring scheme. we get the colors we get ๐ŸŽจ

๐ŸŒธ SEE ALSO ๐ŸŒธ

  • libfyaml(3) โ€” go read the main character's page too ๐Ÿซถ

2019-2026, Pantelis Antoniou


and that's the whole page bestie โ€” written by the libfyaml girlies, version-and-date stamp Mar 15, 2026, FY-TOOL(1) forever ๐Ÿ’…โœจ no cap, see you in the group chat ๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from