# rcl evaluate rcl evaluate [-f | --format ] [--] [] [--output ] Shorthands: rcl eval rcl e (uses default --format=rcl) rcl je (sets --format=json) rcl re (sets --format=raw) ## Description Read an RCL expression from the file ``, and evaluate it. Print the evaluated result to stdout. When `` is `-`, read from stdin. When no file is specified, the input defaults to stdin. ## Options ### `--banner ` Prepend the banner message to the output. This can be useful to add a comment to a generated file to clarify that the file is generated. RCL implicitly adds a line break between the banner and the output. ### `-f` `--format ` Output in the given format. The following formats are supported:
json
Output pretty-printed JSON.
json-lines
If the document is a list, output every element as a JSON value on its own line, consistent with the JSON lines format. Top-level values other than lists are not valid for this format.
raw
If the document is a string, output the string itself. If the document is a list or set of strings, output each string on its own line.
rcl
Output pretty-printed RCL.
toml
Output TOML.
yaml-stream
If the document is a list, output every element as a JSON document, prefixed by the --- YAML document separator. Top-level values other than lists are not valid for this format.
The default output format is `rcl`. For the `je` command shorthand, the default output format is `json`. ### `--output-depfile ` Write the names of the files that were loaded during evaluation in Makefile syntax to the file ``. This can be used by build systems to re-run `rcl` when one of the inputs changes. See also [the depfile section of the Ninja documentation][ninja-depfile]. Because the depfile includes the name of the dependent file, this option can only be used in combination with `--output`. [ninja-depfile]: https://ninja-build.org/manual.html#_depfile ### `-o` `--output ` Write the output to the given file instead of stdout. When [`--directory`][dir] is set, the output path is relative to that directory. [`--color`][color] does not apply when using `--output`. [dir]: rcl.md#-c-directory-dir [color]: rcl.md#-color-mode ### `--sandbox ` Limit which files can be imported in [import expressions](imports.md#security). Two modes are available:
workdir
Only allow importing files inside the working directory, including subdirectories. For example, when rcl is executed in /home/user/exprs, importing /home/user/exprs/a/b.rcl is allowed, but importing /home/user/.config/private.rcl is not.
unrestricted
Grant unrestricted filesystem access, allow importing any file.
The default sandboxing mode is _workdir_. ### `-w` `--width ` Target width for pretty-printing, in columns. Must be an integer. Defaults to 80.