OS Manuals

/usr/bin/jsonnet

The data templating language Implementation in go.

From go-jsonnet 0.22.0-r14 (os), captured 2026-11-05 by running jsonnet --help (exit 0). permalink

Jsonnet commandline interpreter (Go implementation) v0.22.0

jsonnet {<option>} <filename>

Available options:
  -h / --help                This message
  -e / --exec                Treat filename as code
  -J / --jpath <dir>         Specify an additional library search dir
                             (right-most wins)
  -o / --output-file <file>  Write to the output file rather than stdout
  -m / --multi <dir>         Write multiple files to the directory, list files
                             on stdout
  -c / --create-output-dirs  Automatically creates all parent directories for
                             files
  -y / --yaml-stream         Write output as a YAML stream of JSON documents
  -S / --string              Expect a string, manifest as plain text
  --no-trailing-newline      Do not add a trailing newline to the output
  -s / --max-stack <n>       Number of allowed stack frames
  -t / --max-trace <n>       Max length of stack trace before cropping
  --version                  Print version

Available options for specifying values of 'external' variables:
  Provide the value as a string:
  -V / --ext-str <var>[=<val>]      If <val> is omitted, get from environment
                                    var <var>
       --ext-str-file <var>=<file>  Read the string from the file
  Provide a value as Jsonnet code:
  --ext-code <var>[=<code>]         If <code> is omitted, get from environment
                                    var <var>
  --ext-code-file <var>=<file>      Read the code from the file

Available options for specifying values of 'top-level arguments':
  Provide the value as a string:
  -A / --tla-str <var>[=<val>]      If <val> is omitted, get from environment
                                    var <var>
       --tla-str-file <var>=<file>  Read the string from the file
  Provide a value as Jsonnet code:
  --tla-code <var>[=<code>]         If <code> is omitted, get from environment
                                    var <var>
  --tla-code-file <var>=<file>      Read the code from the file

Environment variables:
  JSONNET_PATH is a colon (semicolon on Windows) separated list of directories
  added in reverse order before the paths specified by --jpath (i.e. left-most
  wins). E.g. these are equivalent:
    JSONNET_PATH=a:b jsonnet -J c -J d
    JSONNET_PATH=d:c:a:b jsonnet
    jsonnet -J b -J a -J c -J d

In all cases:
  <filename> can be - (stdin)
  Multichar options are expanded e.g. -abc becomes -a -b -c.
  The -- option suppresses option processing for subsequent arguments.
  Note that since filenames and jsonnet programs can begin with -, it is
  advised to use -- if the argument is unknown, e.g. jsonnet -- "$FILENAME".
Options (20)
OptionDescriptionSource
-h /This messagehelp
-e /Treat filename as codehelp
-J /Specify an additional library search dir (right-most wins)help
-o /Write to the output file rather than stdouthelp
-m /Write multiple files to the directory, list files on stdouthelp
-c /Automatically creates all parent directories for fileshelp
-y /Write output as a YAML stream of JSON documentshelp
-S /Expect a string, manifest as plain texthelp
--no-trailing-newlineDo not add a trailing newline to the outputhelp
-s /Number of allowed stack frameshelp
-t /Max length of stack trace before croppinghelp
--versionPrint versionhelp
-V /If <val> is omitted, get from environment var <var>help
--ext-str-file var>=<fileRead the string from the filehelp
--ext-code var>[=<codeIf <code> is omitted, get from environment var <var>help
--ext-code-file var>=<fileRead the code from the filehelp
-A /If <val> is omitted, get from environment var <var>help
--tla-str-file var>=<fileRead the string from the filehelp
--tla-code var>[=<codeIf <code> is omitted, get from environment var <var>help
--tla-code-file var>=<fileRead the code from the filehelp

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.