FY-TOOL(1) libfyaml FY-TOOL(1)

# [NAME](#NAME)

fy-tool - fy-tool documentation

# [SYNOPSIS](#SYNOPSIS)

**fy-tool** \[*OPTIONS*] \[&lt;*file*&gt; …]

**fy-dump** \[*OPTIONS*] \[&lt;*file*&gt; …]

**fy-testsuite** \[*OPTIONS*] &lt;*file*&gt;

**fy-filter** \[*OPTIONS*] \[-f *FILE*] \[&lt;*path*&gt; …]

**fy-join** \[*OPTIONS*] \[-T *PATH*] \[-F *PATH*] \[-t *PATH*] \[&lt;*file*&gt; …]

**fy-ypath** \[*OPTIONS*] &lt;*ypath-expression*&gt; \[&lt;*file*&gt; …]

**fy-compose** \[*OPTIONS*] \[&lt;*file*&gt; …]

**fy-b3sum** \[*OPTIONS*] \[&lt;*file*&gt; …]

# [DESCRIPTION](#DESCRIPTION)

**fy-tool** is the libfyaml command-line front-end for parsing, rewriting, querying, joining, testing and hashing YAML and JSON data.

The executable changes behaviour either by the invoked program name (**fy-dump**, **fy-testsuite**, **fy-filter**, **fy-join**, **fy-ypath**, **fy-compose**, **fy-b3sum**) or by an explicit mode-select option such as **--dump** or **--filter**.

The default mode is **dump**.

# [OPTIONS](#OPTIONS)

General options

[**-h, --help**](#h,)

Display the built-in help message.

[**-v, --version**](#v,)

Display the libfyaml version.

[**-q, --quiet**](#q,)

Suppress informational and non-fatal diagnostic output.

[**-d LEVEL, --debug-level LEVEL**](#d)

Set the minimum diagnostic severity emitted by the library. The default is **3** (warning level).

[**-C MODE, --color MODE**](#C)

Control ANSI color output. Supported values are **on**, **off**, and **auto**. The default is **auto**.

[**-V, --visible**](#V,)

Make spaces, tabs, and line breaks visible in text output.

[**--dry-run**](#dry)

Parse the input but suppress normal output generation.

Diagnostic options

[**--disable-diag MODULE**](#disable)

Disable diagnostic output for the named module.

[**--enable-diag MODULE**](#enable)

Enable diagnostic output for the named module.

[**--show-diag OPTION**](#show)

Show the named diagnostic field. Supported values are **source**, **position**, **type**, and **module**.

[**--hide-diag OPTION**](#hide)

Hide the named diagnostic field.

Parser options

[**-I DIR, --include DIR**](#I)

Add **DIR** to the input include search path.

[**-j MODE, --json MODE**](#j)

Select JSON input handling. Supported values are **no**, **force**, and **auto**. The default is **auto**.

[**-r, --resolve**](#r,)

Resolve anchors and merge keys while parsing.

[**--yaml-1.1**](#yaml)

Force YAML 1.1 rules when the input does not declare a version.

[**--yaml-1.2**](#yaml~2)

Force YAML 1.2 rules when the input does not declare a version.

[**--yaml-1.3**](#yaml~3)

Force YAML 1.3 rules when the input does not declare a version.

[**-l, --follow**](#l,)

Follow aliases during path traversal and related path-based operations.

[**--sloppy-flow-indentation**](#sloppy)

Accept relaxed indentation rules in flow mode.

[**--prefer-recursive**](#prefer)

Prefer recursive algorithms over iterative ones.

**--ypath-aliases**

Enable alias processing for ypath evaluation.

[**--allow-duplicate-keys**](#allow)

Allow duplicate mapping keys.

[**--collect-errors**](#collect)

Collect multiple parsing errors before reporting failure.

[**--disable-accel**](#disable~2)

Disable parser/emitter acceleration features.

[**--disable-buffering**](#disable~3)

Disable stdio buffering and use direct file-descriptor reads.

[**--disable-mmap**](#disable~4)

Disable memory-mapped input.

[**--disable-depth-limit**](#disable~5)

Disable the normal nesting-depth limit.

Emitter options

[**-i INDENT, --indent INDENT**](#i)

Set the output indentation width. The default is **2**.

[**-w WIDTH, --width WIDTH**](#w)

Set the preferred output width. Use **inf** for no width limit. The default is **80**.

[**-m MODE, --mode MODE**](#m)

Select the output style. Supported values are **original**, **block**, **flow**, **flow-oneline**, **json**, **json-tp**, **json-oneline**, **dejson**, **pretty**, **flow-compact**, and **json-compact**.

[**-s, --sort**](#s,)

Sort mapping keys before emitting output.

[**-c, --comment**](#c,)

Preserve and emit comments where supported.

[**--strip-labels**](#strip)

Strip anchors and aliases from emitted output.

[**--strip-tags**](#strip~2)

Strip emitted tags.

[**--strip-doc**](#strip~3)

Strip document start and end markers.

[**--strip-empty-kv**](#strip~4)

Omit keys whose values are empty or null.

[**--null-output**](#null)

Suppress normal output generation.

[**--no-ending-newline**](#no)

Do not append a final trailing newline.

[**--preserve-flow-layout**](#preserve)

Preserve single-line flow collection layout when possible.

[**--indented-seq-in-map**](#indented)

Indent block sequences that appear inside block mappings.

[**--streaming**](#streaming)

Use streaming output mode. This is the default.

[**--no-streaming**](#no~2)

Disable streaming output mode.

[**--recreating**](#recreating)

Recreate streaming events instead of passing them through directly.

Testsuite options

[**--disable-flow-markers**](#disable~6)

Omit testsuite flow markers.

[**--disable-doc-markers**](#disable~7)

Omit testsuite document markers.

[**--disable-scalar-styles**](#disable~8)

Omit testsuite scalar-style markers.

[**--document-event-stream**](#document)

Build a document first and then generate the event stream from it.

[**--tsv-format**](#tsv)

Emit testsuite output in TSV format.

Input options

[**-f FILE, --file FILE**](#f)

Read from **FILE** instead of standard input where the selected mode uses a single input source. If **FILE** begins with **&gt;**, the remaining text is treated as literal input content.

Join options

[**-T PATH, --to PATH**](#T)

Join into **PATH**. The default is **/**.

[**-F PATH, --from PATH**](#F)

Take joined input from **PATH**. The default is **/**.

[**-t PATH, --trim PATH**](#t)

Emit only **PATH** from the joined result. The default is **/**.

YPATH options

[**-F PATH, --from PATH**](#F~2)

Start evaluation from **PATH**. The default is **/**.

**--dump-pathexpr**

Dump the parsed path expression before evaluation.

[**--noexec**](#noexec)

Parse the expression but do not execute it.

Compose options

**--dump-path**

Dump the path while composing a document.

B3SUM options

[**--b3sum**](#b3sum)

Enable BLAKE3 hashing mode.

[**--derive-key CONTEXT**](#derive)

Use key-derivation mode with **CONTEXT**.

[**--no-names**](#no~3)

Omit file names from checksum output.

[**--raw**](#raw)

Emit raw digest bytes.

[**--length N**](#length)

Emit only **N** output bytes, up to the BLAKE3 maximum.

[**--check**](#check)

Verify checksums read from input files.

[**--keyed**](#keyed)

Use keyed hashing, reading the secret key from standard input.

[**--backend BACKEND**](#backend)

Select the BLAKE3 backend implementation.

[**--list-backends**](#list)

List available BLAKE3 backends.

[**--num-threads N**](#num)

Set the worker-thread count. **0** means automatic selection and **-1** disables threaded hashing.

[**--file-buffer N**](#file)

Set the per-file I/O buffer size.

[**--mmap-min-chunk N**](#mmap)

Set the minimum chunk size used for memory-mapped hashing input.

[**--mmap-max-chunk N**](#mmap~2)

Set the maximum chunk size used for memory-mapped hashing input.

Modes

[**--dump**](#dump)

Select dump mode. This is the default and also the mode used by **fy-dump**.

[**--testsuite**](#testsuite)

Select testsuite mode. This is also the mode used by **fy-testsuite**.

[**--filter**](#filter)

Select filter mode. This is also the mode used by **fy-filter**.

[**--join**](#join)

Select join mode. This is also the mode used by **fy-join**.

[**--ypath**](#ypath)

Select ypath query mode. This is also the mode used by **fy-ypath**.

[**--scan-dump**](#scan)

Select the internal scan-dump mode.

[**--parse-dump**](#parse)

Select the internal parse-dump mode.

[**--compose**](#compose)

Select composer-driver dump mode. This is also the mode used by **fy-compose**.

[**--yaml-version-dump**](#yaml~4)

Print YAML version information.

# [EXAMPLES](#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
```

# [AUTHOR](#AUTHOR)

Pantelis Antoniou &lt;*pantelis.antoniou@konsulko.com*&gt;

# [BUGS](#BUGS)

- The only supported input and output character encoding is UTF8.
- Sorting does not respect language settings.
- There is no way for the user to specific a different coloring scheme.

# [SEE ALSO](#SEE_ALSO)

[**libfyaml(3)**](/man/enterprise-packages/libfyaml/libfyaml.3)

# [COPYRIGHT](#COPYRIGHT)

2019-2026, Pantelis Antoniou

March 15, 2026

---

Document: fy-ypath(1) from libfyaml 0.9.6-r0 (Chainguard OS)
