# Output Options and Recommendations

Safety can output the result of a vulnerability scan to a variety of different output formats.

The default output is `screen` output, which prints the scan to the command line screen.

Use the `--output` argument to configure which output format Safety generates. The `--output` command line argument can be set to the following values: `screen`, `json`, `html`, `spdx`, `spdx@2.2`, `spdx@2.3`, `none`.

## Screen and text output

`--output screen` (default) will print the results to the screen

Results can be easily saved to a text file. For example:

```
safety scan --output screen > results.txt
```

{% hint style="info" %}
For more detailed output, add the **`--detailed-output`** flag
{% endhint %}

If `--detailed-output` is specified along with `--output json` then CVE details will be included in the output. In order to filter the json output to only 1 top-level key, the `--filter` option can be specified. For example:

`safety scan --detailed-output --output json --filter cve_details`

Other options that can be chosen to filter are: `meta`, `scan_results`

## Additional Output Options

Full details on each output option can be found here:

* [JSON](/safety-docs/output/json-output.md)
* [SBOM](/safety-docs/output/sbom-output.md) (SPDX, SPDX\@2.2, SPDX\@2.3)
* [HTML5](/safety-docs/output/html-output.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.safetycli.com/safety-docs/output/output-options-and-recommendations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
