> For the complete documentation index, see [llms.txt](https://cfconfig.ortusbooks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cfconfig.ortusbooks.com/using-the-cli/command-overview/diff-settings.md).

# Diff Settings

You can diff any two locations, meaning two servers, two JSON files, a server and a JSON file, etc.

```
cfconfig diff server1 server2
cfconfig diff file1.json file2.json
cfconfig diff servername file.json
cfconfig diff from=path/to/servers1/home to=path/to/server2/home
```

You can even filter what config settings you see:

```
cfconfig diff to=serverName --all
cfconfig diff to=serverName --valuesDiffer --toOnly --fromOnly
```

## Diff Reports

The `cfconfig diff` commandbox has the ability to export HTML and PDF files. The contents of the report will exactly match what displays in the CLI. So any flags you apply such as `--toOnly` will also filter the report output. This can be handy for historical purposes or just to get the data into a format that's easier to read than the CLI.

To generate an HTML report:

```bash
cfconfig diff to=... from=... HTMLReportPath=folder/
cfconfig diff to=... from=... HTMLReportPath=folder/file.html
```

To generate a PDF report:

```bash
cfconfig diff to=... from=... PDFReportPath=folder/
cfconfig diff to=... from=... PDFReportPath=folder/file.pdf
```

You can generate both HTML and PDF at the same time if you like. If you don't provide a filename, one is created for you with the following format:

```
cfconfig-diff-report-YYYY-MM-DD-HHMMSS.[html|pdf]
```

The report directory is also created for you if it doesn't exist.

Remember, you can get funky and generate clever report names on the fly such as:

```bash
cfconfig diff ... PDFreportpath="Daily-Report-`#now | #dayOfWeek | #dayOfWeekAsString`.pdf"
```

This would give you a name like `Daily-Report-Thursday.pdf`! Existing files are overwritten.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cfconfig.ortusbooks.com/using-the-cli/command-overview/diff-settings.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
