> ## 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 feed: write the update feed for a setup file

> bach feed FILE: writes latest.json for a setup file, with its version, download link, size and SHA-256. Run it again after signing.

`bach feed` writes the small JSON file an installed app reads to learn about a newer version. `bach build` already writes it when your [`[updates]`](/docs/reference/config/updates) has `github` or a `download_url`. Use `bach feed` to write it again after signing, because signing changes the file and its SHA-256.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
bach feed "dist/Hello-Setup-1.4.0.exe" --notes "Faster start"
bach feed "dist/Hello-Setup-1.4.0.exe" --url https://example.com/hello/Hello-Setup-1.4.0.exe
```

| Argument or flag | Meaning |
| - | - |
| `FILE` | The full setup file. An uninstaller or an online installer is refused. |
| `--url URL` | The `https` link the setup file will be downloaded from. Without it, the link comes from the `[updates]` section of `bach.toml`, filled in for the version the setup file carries. |
| `--config PATH` | The `bach.toml` to take the link from. Default: `bach.toml` in the current folder. |
| `--notes TEXT` | What is new, stored in the feed |
| `--notes-file PATH` | Read what is new from a file (Markdown is fine). Cannot be combined with `--notes`. |
| `--rollout PERCENT` | A [staged rollout](/docs/guides/updates.md#staged-rollouts): only about this share of computers (0 to 100) take the update by themselves. Leave it out for everybody. |
| `--out PATH`, `-o PATH` | Write the feed here instead of `latest.json` next to the setup file |
| `--arm64 FILE` | The ARM64 setup file of the same version (built with the ARM64 runtime), to list in the feed for computers that run on ARM64. See [`[arch.arm64]`](/docs/reference/config/arch). |
| `--arm64-url URL` | The `https` link the ARM64 setup file is downloaded from. Without it, the link comes from `[updates]`, filled in for that file's name. Needs `--arm64`. |
| `--patch FILE` | An [update patch](/docs/guides/updates.md#update-patches) made by `bach build --patch-from`, to offer to computers that have the version it updates from. It is always offered, even when it is not much smaller than the full file. |
| `--patch-url URL` | The `https` link the patch is downloaded from. Without it, the link comes from `[updates]`, filled in for the patch's file name. Needs `--patch`. |

## The feed

```json latest.json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "version": "1.4.0",
  "url": "https://example.com/hello/Hello-Setup-1.4.0.exe",
  "sha256": "<sha-256 of the setup file>",
  "notes": "Faster start",
  "size": 10187776
}
```

* `version` is read from the setup file's manifest.
* `sha256` is computed from the file on disk, so run the command on the final, signed file.
* `size` is the setup file's size in bytes. The installed app uses it to check the disk has room before downloading.
* `rollout` is only there with `--rollout`. Write the feed again without it to release to everybody.
* `delta` is only there with a patch: `{ "from", "url", "sha256", "size" }`. `bach build --patch-from` adds it by itself when the patch is at least a fifth smaller than the full file.
* `notes` is left out when you do not pass `--notes` or `--notes-file`, and is cut at 4000 characters.

## Errors

* Without `--url` and without a `bach.toml` with an `[updates]` download link, the command asks for the https link.
* A link that is not `https` is refused.
* A file that is not a Bach setup file, or is an uninstaller, is refused with a sentence. So is an update patch given as `FILE`: pass the full setup file and the patch with `--patch`.
* A `--patch` file that is not an update patch is refused.

See [Updates](/docs/guides/updates.md).


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