TOMLQ(1)

πŸ“¦
version 3.4.3 Β· 2 versions
, in debian trixie, ubuntu resolute

πŸ’– TOMLQ β€” bestie's guide to the TOML-to-jq pipeline πŸ’–

okay so. sit down. hydrate. we're doing TOMLQ(1) today and honestly? it's giving life-changing. this is the User Commands girlie of the manual world and she's here to make TOML and jq hold hands. 🫢


✨ NAME ✨

tomlq β€” Command-line TOML processor - jq wrapper for TOML documents

like. it processes TOML. on the command line. and it's a jq wrapper. the name literally tells you everything, icon behavior honestly. πŸ‘‘


🌸 SYNOPSIS 🌸

jq [options] <jq filter> [file...]

πŸ¦‹ DESCRIPTION πŸ¦‹

usage: tomlq [options] <jq filter> [input file...]

so bestie, here's the whole vibe: tomlq is a Command-line TOML processor - jq wrapper for TOML documents. that's the mission statement. that's the whole personality. πŸ’…

and the way it works? tomlq transcodes TOML documents to JSON and then just. hands them straight to jq. like a little relay race but make it ✨elegant✨.

if you want the full lore, the link is right here, no gatekeeping on this account: https://github.com/kislyuk/tomlq β€” go read it, it's worth it, i promise. πŸ“

πŸŽ€ positional arguments πŸŽ€

  • jq_filter β€” the actual filter you're running. this is the main character.
  • files β€” the files. the supporting cast. you can have several. πŸ’œ

🧚 options 🧚

  • -h, --help β€” shows this help message and then dips. that's it. that's the whole job. 🫢
  • --toml-output, -t β€” transcodes jq's JSON output back into TOML and emits it. we came full circle, babes. TOML β†’ JSON β†’ TOML. a round trip. 🌈
  • --in-place, -i β€” edit files in place. and listen. listen. there is no backup. use caution. i'm being so serious right now, back your stuff up first or you WILL be crying in the group chat. 😭
  • --version β€” shows the program's version number and then leaves. no notes. ⭐

πŸ’€ and now… the jq part πŸ’€

because tomlq is a jq wrapper, you get the whole jq situation bundled in, and it's honestly iconic:

jq - commandline JSON processor [version 1.7]

jq [options] --args <jq filter> [strings...]
jq [options] --jsonargs <jq filter> [JSON_TEXTS...]

jq is a tool for processing JSON inputs, applying the given filter to its JSON text inputs and producing the filter's results as JSON on standard output. periodt. ✨

the simplest filter is ., which copies jq's input to its output unmodified except for formatting. that's it. that's the whole filter. a single dot. and it ate. πŸ’…

for more advanced filters see the jq(1) manpage (man jq) and/or https://jqlang.github.io/jq/.

Example:

$ echo '{"foo": 0}' | jq .

{

"foo": 0

}

look at it. gorgeous. no further questions. 🌸

πŸ‘‘ Command options πŸ‘‘

  • -n, --null-input β€” use null as the single input value;
  • -R, --raw-input β€” read each line as string instead of JSON;
  • -s, --slurp β€” read all inputs into an array and use it as the single input value;
  • -c, --compact-output β€” compact instead of pretty-printed output;
  • -r, --raw-output β€” output strings without escapes and quotes;
  • --raw-output0 β€” implies -r and output NUL after each output;
  • -j, --join-output β€” implies -r and output without newline after each output;
  • -a, --ascii-output β€” output strings by only ASCII characters using escape sequences;
  • -S, --sort-keys β€” sort keys of each object on output;
  • -C, --color-output β€” colorize JSON output;
  • -M, --monochrome-output β€” disable colored output;
  • --tab β€” use tabs for indentation;
  • --indent n β€” use n spaces for indentation (max 7 spaces);
  • --unbuffered β€” flush output stream after each output;
  • --stream β€” parse the input value in streaming fashion;
  • --stream-errors β€” implies --stream and report parse error as an array;
  • --seq β€” parse input/output as application/json-seq;
  • -f, --from-file file β€” load filter from the file;
  • -L directory β€” search modules from the directory;
  • --arg name value β€” set $name to the string value;
  • --argjson name value β€” set $name to the JSON value;
  • --slurpfile name file β€” set $name to an array of JSON values read from the file;
  • --rawfile name file β€” set $name to string contents of file;
  • --args β€” consume remaining arguments as positional string values;
  • --jsonargs β€” consume remaining arguments as positional JSON values;
  • -e, --exit-status β€” set exit status code based on the output;
  • -V, --version β€” show the version;
  • --build-configuration β€” show jq's build configuration;
  • -h, --help β€” show the help;
  • -- β€” terminates argument processing;
ngl this next bit is the one that unlocks everything: named arguments are also available as $ARGS.named[], while positional arguments are available as $ARGS.positional[]. write that down. actually don't, just remember it. iykyk. 🧠✨

🌈 SEE ALSO 🌈

the full documentation for tomlq is maintained as a Texinfo manual. if the info and tomlq programs are properly installed at your site, the command

info tomlq

should give you access to the complete manual. so if you want the deep lore, that's where it lives. go get your info page fix, bestie. πŸ“–πŸ’–


and that's the whole thing! this was tomlq 3.4.3, from May 2025, and you found her in section 1 of the manual because of course you did. πŸŒΈβœ¨πŸ’… slay, stay hydrated, and please back up before you use -i. mwah. πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from