> ## 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.

# List your app in winget with bach winget

> Generate the three manifests the Windows Package Manager needs from a Bach setup file, validate them and open a pull request to microsoft/winget-pkgs.

Bach setup files are `exe` installers (per user, or machine-wide with `installer.scope = "machine"`) that accept `--silent`, which is what the Windows Package Manager needs. `bach winget` reads a finished setup file and writes the three manifests winget wants, ready for a pull request to `microsoft/winget-pkgs`.

## Generate the manifests

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

The `--url` must be the https link the setup file is downloaded from. Run the command on the final, signed file, because the manifests include the file's SHA-256.

| Flag | Meaning |
| - | - |
| `--url URL` | Required. The https link the setup file is downloaded from |
| `--license TEXT` | The app's license, like `MIT`. Default: `Proprietary`, with a warning |
| `--out DIR`, `-o DIR` | Write the manifests into this folder instead of `winget/<id>/<version>` next to the setup file |

The package identifier is `Publisher.AppId`, built from the publisher and the app id with only the characters winget allows.

## What the manifests contain

* `InstallerType: exe` with `Scope: user`, or `Scope: machine` for a setup file with `installer.scope = "machine"`.
* The architecture of the setup file's runtime: `x64`, or `arm64` for a setup file built with the [ARM64 runtime](/docs/concepts/how-it-works.md#windows-on-arm).
* `MinimumOSVersion: 10.0.17763.0`, the oldest Windows Bach supports (Windows 10 version 1809).
* Install modes interactive, silent and silent with progress.
* Installer switches: `--silent` for silent installs, `--dir "<INSTALLPATH>"` for the install location and `--log "<LOGPATH>"` for the log.
* `UpgradeBehavior: install`, so a newer setup file updates in place.
* A `ProductCode` equal to the app id, which is how Settings › Apps names the install. winget reads it to tell installed versions apart.

## Validate and submit

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
winget validate dist/winget/HelloInc.Hello/1.4.0
```

Then open a pull request to [microsoft/winget-pkgs](https://github.com/microsoft/winget-pkgs).

## Update the listing at every release

Bach's own release workflow can open the pull request for each new version with Microsoft's `wingetcreate`. It runs for a normal release only, never for a pre-release, a draft or a dry run, and only when the repository has the secret `WINGET_TOKEN` (a classic token with `public_repo` scope) and the variable `WINGET_PACKAGE` (the package id). The package must already be listed, because `wingetcreate update` changes a listing and does not start one: the first pull request is made by hand, as above. Without the secret and the variable the job says so and passes.

> [!NOTE]
>
> The command refuses an uninstaller and anything that is not a Bach setup file, and it refuses a download link that is not https.


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