YQ(1)
hiii bestie π welcome to the manual page for yq, which lives in the User Commands section of the manual β that's why the header up top says YQ(1), and now you know, iykyk β¨
π NAME π
yq β Command-line YAML processor - jq wrapper for YAML documents π¦
πΈ SYNOPSIS πΈ
jq [options] <jq filter> [file...]
π DESCRIPTION π
okay so here's the usage, verbatim, no cap:
usage: yq [options] <jq filter> [input file...]
[--indentless-lists] [--explicit-start] [--explicit-end]
[--in-place] [--version] [jq_filter] [files ...]
yq: Command-line YAML processor - jq wrapper for YAML documents π
so like. yq transcodes YAML documents to JSON and passes them to jq. literally that's the whole vibe. See https://github.com/kislyuk/yq for more information π«Ά
β¨ positional arguments: β¨
jq_filterfiles
π options: π
-h,--helpβ show this help message and exit π--yaml-output,--yml-output,-yβ Transcode jq JSON output back into YAML and emit it π«--yaml-roundtrip,--yml-roundtrip,-Yβ Transcode jq JSON 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 with jq filters that do not expect these extra items β οΈ--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) π--versionβ show program's version number and exit π
π 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 β¨
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 ("man jq") and/or https://jqlang.github.io/jq/ π
Example:
$ echo '{"foo": 0}' | jq .
{
"foo": 0
}
π 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;
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 π«Ά go forth and process ur YAML π
this was yq 3.4.3, dated May 2025, brought to you by the YQ(1) girlies ππΈ
π¦ 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