> ## 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 page: write a download page

> bach page FILE --url URL: writes a one-file download page for a Bach setup file, with the size, a download button, install steps and the SHA-256 to check.

`bach page` writes a download page for a setup file, as one HTML file: the app's name, version, publisher and size, a download button, how to install, update and remove it, and the file's SHA-256 with the PowerShell command that checks it. The numbers come from the setup file, so they cannot disagree with the file.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
bach page dist/Hello-Setup-1.4.0.exe --url https://example.com/downloads/Hello-Setup-1.4.0.exe
```

| Argument or flag | Meaning |
| - | - |
| `FILE` | The setup file. An online installer or an uninstaller is refused. |
| `--url URL` | Required. The `https` link the setup file is downloaded from. |
| `--out DIR`, `-o DIR` | The folder for `index.html`. Default: `download/` next to the setup file. |
| `--notes-file PATH` | What's new, up to 20 KB. Lines starting with `-` or `*` become a list. Nothing else is interpreted, so Markdown and HTML show as written. |
| `--winget ID` | Shows `winget install ID`. The id looks like `Publisher.AppName`. |

## The page

* One file, no script, no outside file. A content security policy allows nothing but its own style.
* It follows the reader's light or dark setting and works on a phone.
* The button uses the setup file's `accent` colour. A PNG logo travels inside the page. A logo over 256 KB, or an SVG one, is left out and the page shows the name.
* The install text says whether the app installs for one user or, with `installer.scope = "machine"`, asks for administrator permission once.
* Everything the setup file says is escaped before it goes into the page.
* The text is in English.

Put the page where your downloads are. With `--json` the command adds `page` (the file written), `sha256` and `size`.

See also [`bach winget`](/docs/reference/cli/winget) and [Updates](/docs/guides/updates.md).


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