> ## 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 winget: write the winget manifests

> bach winget FILE --url URL: writes the three winget manifests for a Bach setup file. Flags: --license for the license and --out for the target folder.

`bach winget` writes the manifests the Windows Package Manager needs to list a setup file, ready for a pull request to `microsoft/winget-pkgs`.

```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
```

| Argument or flag | Meaning |
| - | - |
| `FILE` | The setup file. An uninstaller is refused. |
| `--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. Default: `winget/<id>/<version>` next to the setup file. |

## Output

It writes the version, installer and default-locale manifests, and prints:

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
Wrote the winget manifests for Publisher.AppId 1.4.0 to <folder>
Check them with `winget validate <folder>`, then open a pull request to microsoft/winget-pkgs.
```

The package identifier is `Publisher.AppId`, built from the publisher and the app id with only the characters winget allows. The installer manifest uses `InstallerType: exe`, `Scope: user`, the switches `--silent`, `--dir` and `--log`, and the app id as `ProductCode`.

See [List your app in winget](/docs/guides/winget.md). For Chocolatey, see [`bach choco`](/docs/reference/cli/choco).


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