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

> bach choco writes a Chocolatey package that downloads your setup file, checks its SHA-256, installs it silently and can remove it again.

`bach choco` writes a Chocolatey package for your setup file: a `.nuspec`, an install script that downloads the file, checks it and runs it with `--silent`, and an uninstall script.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
bach choco 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 full setup file |
| `--url URL` | Required. Its `https` download address. |
| `--license TEXT` | A link, or a name such as `MIT`. Without it, a warning. |
| `-o`, `--out DIR` | Default `choco/<id>/<version>` next to the setup file |

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
Wrote the Chocolatey package for hello 1.4.0 to <folder>
Build it with `choco pack` in that folder, then test it with `choco install hello --source .`.
```

* The package id is the app id in lowercase, with other characters as `-`.
* The install script contains the file's checksum, so a different download is refused.
* Chocolatey runs as administrator, so a per-user app is installed only for that account. Use `installer.scope = "machine"` to install for everyone; Bach warns otherwise.
* Versions must be ones NuGet accepts, such as `1.2.3` or `1.2.3-beta`.
* An ARM64 setup file is listed as the 64-bit download, with a warning.


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