YQ(1)
π YQ(1): the yq manual, but it's a group chat π
okay so bestie, you've stumbled into YQ(1) β yes, the one filed under User Commands in your manual index. sit down, put your hair up, we're gonna read the whole thing together and it is going to be so much less boring than it looks. π«Ά
β¨ NAME β¨
yq β Command-line YAML processor - jq wrapper for YAML documents
like, that's the whole vibe in one line, no cap. π
π¦ SYNOPSIS π¦
jq [options] <jq filter> [file...]
yes bestie, the synopsis really does say jq. that's not a typo, that's just how this page is. we move. π
πΈ DESCRIPTION πΈ
here's the usage, exactly as it's given:
usage: yq [options] <jq filter> [input file...]
[--indentless-lists] [--explicit-start] [--explicit-end]
[--in-place] [--version] [jq_filter] [files ...]
and the tagline, one more time for the people in the back:
yq: Command-line YAML processor - jq wrapper for YAML documents
yq transcodes YAML documents to JSON and passes them to jq. See https://github.com/kislyuk/yq for more information. π₯
π positional arguments: π
jq_filterβ the filter. yes, it's a positional argument. she's doing her thing.filesβ the files. plural, because one is never enough honestly.
π options: π
one bullet per option, zero skips, let's goooo:
-h,--helpβ show this help message and exit β¨--yaml-output,--yml-output,-yβ TranscodejqJSON output back into YAML and emit it--yaml-roundtrip,--yml-roundtrip,-Yβ TranscodejqJSON output back into YAML and emit it. Preserve YAML tags and styles by representing them as extra items in their enclosing mappings and sequences while in JSON. This option is incompatible withjqfilters that do not expect these extra items. β οΈ like, read that again bestie β if your filter isn't built for the extra items, it's gonna be a bad time.--yaml-output-grammar-version,--yml-out-ver {1.1,1.2}β When using--yaml-output, specify output grammar (the default is1.1and will be changed to1.2in a future version). Setting this to1.2will cause strings like'on'and'no'to be emitted unquoted.--width,-w WIDTHβ When using--yaml-output, specify string wrap width--indentless-lists,--indentlessβ When using--yaml-output, indent block style lists (sequences) with0spaces instead of2--explicit-startβ When using--yaml-output, always emit explicit document start ("---")--explicit-endβ When using--yaml-output, always emit explicit document end ("...")--in-place,-iβ Edit files in place (no backup - use caution) π bestie there is NO BACKUP, be so careful, I am begging--versionβ show program's version number and exitjq - commandline JSON processor [version 1.8.1]β and here's where the page justβ¦ hands the mic tojqhimself. iconic of him, honestly. π
π jq - commandline JSON processor [version 1.8.1] π
the synopsis lines, verbatim:
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.
The simplest filter is ., which copies jq's input to its output unmodified except for formatting. For more advanced filters see the jq(1) manpage (that's man jq) and/or https://jqlang.org/.
Example:
$ echo '{"foo": 0}' | jq .
{
"foo": 0
}
look at her go. π
π 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β usenspaces for indentation (max7spaces);--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β load the filter from a file;-L,--library-path dirβ 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β showjq's build configuration;-h,--helpβ show the help;--β terminates argument processing;
Named arguments are also available as $ARGS.named[], while positional arguments are available as $ARGS.positional[]. π§
π SEE ALSO π
The full documentation for yq is maintained as a Texinfo manual. If the info and yq programs are properly installed at your site, the command
info yq
should give you access to the complete manual. π
and that's the whole page, bestie!! this was yq 3.4.3, dated May 2026 β go forth and transcode, you absolute main character. π¦β¨π
π¦ where this page comes from
- ubuntu stonking: yq 3.4.3-3 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms