DATUI-FORMATS(1) User Commands DATUI-FORMATS(1)

datui-formats - list the format specs and dictionaries (FIX, DBC) on the search path

datui formats
datui formats check SPEC [FILE]

List the format specs and dictionaries (FIX, DBC) on the search path: each one's name, what it matches, its file, and the copies it overrides.

Format specs are TOML files that describe a binary format, or a family of delimited text files; datui-formats(7) describes them. The search path is CONFIG/formats, then $DATUI_FORMATS_PATH, then [formats] path in the config.

Check a format spec or a dictionary (QuickFIX XML, DBC or TOML), by name or by file; with FILE, print its first decoded rows, or what a dictionary names in the log. Exits non-zero on an error.
A format spec or dictionary on the search path, by name, or its file.
A file (or directory of column files) to read with it.

Set a config key for this run, as in the file: -c display.row_numbers=true. Repeatable; a flag of the key's own still wins. datui config keys lists them.
Print help.

0
Success: the session was quit (q, Ctrl+Q or Ctrl+C), or the command did what it was asked.
1
An error, printed to standard error: a PATH that is not there, a configuration file that cannot be used, nothing piped in for -, or a command that failed (datui formats check on a spec with errors).
2
A usage error: an unknown option or command, or a value an option does not take.

The config directory, in place of the platform's (~/.config/datui on Linux). Saved views and format specs live there too.
Directories of format specs and dictionaries, separated as PATH is, searched before [formats] path.

CONFIG is $DATUI_CONFIG_DIR when it is set, else $XDG_CONFIG_HOME/datui (~/.config/datui) on Linux, ~/Library/Application Support/datui on macOS and %APPDATA%\datui on Windows.

The config file: see datui-config(5). datui config path prints the files read.
Your catalog, which Ctrl+D on the home screen adds to: see datui-catalog(1).
More catalogs, one *.toml each, named by its file; examples.toml replaces the bundled one.
Saved views: see datui-views(1).
Format specs and dictionaries, searched first: see datui-formats(7).

List the format specs and dictionaries datui finds.

datui formats

Check a format spec of two one-byte fields against a file of two records, and print the rows it reads.

pairs.toml

name = "demo.pairs"
match = { glob = ["*.pairs"] }
[records]
fields = [{ name = "a", type = "u1" }, { name = "b", type = "u1" }]

make_pairs.py

# Two records of two one-byte fields: (1, 2) and (3, 4).
with open("t.pairs", "wb") as f:

f.write(bytes([1, 2, 3, 4]))

python3 make_pairs.py && datui formats check ./pairs.toml t.pairs

datui(1), datui-formats(7)

The datui documentation: <https://derekwisong.github.io/datui/>

Report bugs at <https://github.com/derekwisong/datui/issues>.

Derek Wisong and the datui contributors.

Copyright © 2026 Derek Wisong

datui is free software under the MIT License.

2026-10-06 datui 0.4.1