TOMLQ(1)
π 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β usenullas 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-rand output NUL after each output;-j,--join-outputβ implies-rand 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--streamand report parse error as an array;--seqβ parse input/output asapplication/json-seq;-f,--from-file fileβ load filter from the file;-L directoryβ search modules from the directory;--arg name valueβ set$nameto the string value;--argjson name valueβ set$nameto the JSON value;--slurpfile name fileβ set$nameto an array of JSON values read from the file;--rawfile name fileβ set$nameto 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
- debian trixie: yq 3.4.3-2 Β· Apache-2.0
- ubuntu resolute: yq 3.4.3-2 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms