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.
- datui formats
check
- Check a format spec or a dictionary (QuickFIX XML, DBC or TOML), by name
or by file. With FILE, print the first rows it decodes, or what the
dictionary names in that log. Exits non-zero on an error.
- SPEC
- A format spec or dictionary on the search path, by name, or its file.
- FILE
- A file (or directory of column files) to read with it.
- -c, --config
KEY=VALUE
- Set a config key for this run, written as in the file: -c
display.row_numbers=true. Repeatable; the key's own flag, where it has
one, still wins. datui config keys lists the keys.
- -h, --help
- 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.
- DATUI_CONFIG_DIR
- The config directory, in place of the platform's (~/.config/datui
on Linux). Saved views and format specs live there too.
- DATUI_FORMATS_PATH
- 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.
- CONFIG/config.toml
- The config file: see datui-config(5). datui config path prints the
files read.
- CONFIG/catalog.toml
- Your catalog, which Ctrl+D on the home screen adds to: see
datui-catalog(1).
- CONFIG/catalogs/
- More catalogs, one *.toml each, named by its file; examples.toml replaces
the bundled one.
- CONFIG/views/
- Saved views: see datui-views(1).
- CONFIG/formats/
- Format specs and dictionaries, searched first: see datui-formats(7).
List the format specs and dictionaries datui finds.
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.