> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Bach builds Windows installers from one bach.toml with the bach command: bach init, bach check, bach preview, bach build. Installs are per user and need no administrator rights by default. installer.scope = "machine" installs for every user after one Windows prompt. On Windows, run setup files with Start-Process -Wait -PassThru in PowerShell, and give signtool arguments that start with the word sign.

# bach diff

> Compare two setup files of one app: the files added, removed and changed, new registry values and variables, and which files made the app bigger.

`bach diff` reads two setup files of one app and says what changed, without unpacking anything. Use it to see what a release really ships, or why it got bigger.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
bach diff dist/Hello-Setup-1.0.0.exe dist/Hello-Setup-1.1.0.exe
```

```console theme={"theme":{"light":"github-light","dark":"github-dark"}}
Hello 1.0.0 → 1.1.0
  Files        1 added, 1 removed, 1 changed, 0 unchanged
  Installed    585.9 KB → 195.3 KB (-390.6 KB)
  Packed       586.0 KB → 195.4 KB (-390.6 KB)

Files:
  - data.bin  (585.9 KB)
  + extra.dat  (195.3 KB)
  ~ hello.exe  (2 bytes → 4 bytes, +2 bytes)

Made the app bigger:
     +195.3 KB  extra.dat
      +2 bytes  hello.exe
```

* A file is **changed** when its SHA-256 differs (a setup file without recorded checksums is compared by size, and the output says so). Names are matched the way Windows matches them.
* **Besides files** lists what the new setup file does to Windows that the old one didn't (`+`), no longer does (`-`) or does differently (`~`): registry values, environment variables, right-click entries, shortcuts, link schemes, file types, run steps, requirements, components and migrations.
* **Made the app bigger** ranks files by the bytes they added to the installed app (`--top N`, default 5). The archive is one compressed stream, so Bach can't say how much each file added to the setup file itself.
* Both files must be for the same app id. Text from a setup file is escaped before it is printed.

`--json` prints `old_version`, `new_version`, `unchanged`, `installed_growth`, `setup_size_old`, `setup_size_new`, `changed_files` and `changes`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.