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

# Environment variables

> Every environment variable Bach reads: for builds, signing and update keys, for the install scripts, and for setup files and the preview window.

Most people never set any of these. They're useful in CI and on computers without internet access.

## For bach

| Variable | Meaning |
| - | - |
| `BACH_RUNTIME` | The `bach-setup.exe` to build on, like `--runtime` |
| `BACH_RUNTIME_ARM64` | The ARM64 one, like `--runtime-arm64` |
| `BACH_RUNTIME_MACOS` | The Mac one, like `--runtime-macos` |
| `BACH_NO_DOWNLOAD` | Never download the setup program |
| `BACH_RELEASES` | Download releases from elsewhere (must be `https://`) |
| `BACH_SIGN` | `1`: sign, like `--sign` |
| `BACH_STRICT` | `1`: warnings fail, like `--strict` |
| `BACH_ACCESS_KEY` | Access key for building protected apps (or the name set by `access.key_env`), and for `bach verify` |
| `BACH_FEED_KEY` | Private key that signs update feeds |
| `BACH_FEED_KEY_FILE` | A file containing that key |
| `BACH_NO_UPDATE_CHECK` | Don't check for or mention newer Bach versions |
| `SOURCE_DATE_EPOCH` | The time `bach feed` signs into a signed update feed, instead of now, to rebuild the same feed |
| `NO_COLOR` | Don't color the command list that `bach` prints on its own |
| `BACH_BINARY_PATH` | npm package only: start this program instead of the packaged one |

`bach` also doesn't check for updates when `CI` is set.

## Where the downloaded setup program goes

`%LOCALAPPDATA%\bach\runtime\<version>` on Windows, `$XDG_CACHE_HOME/bach/runtime/<version>` or `~/.cache/bach/runtime/<version>` elsewhere. It's checked again before each use. Without these folders there's no cache: use `--runtime`.

## For the install scripts

| Variable | Used by | Meaning |
| - | - | - |
| `BACH_VERSION` | `install.ps1`, `install.sh`, GitHub Action | `0.11.1`, `0.11`, `0` or `latest` |
| `BACH_INSTALL_DIR` | both scripts | Install folder. Default `%LOCALAPPDATA%\Programs\bach-cli` or `~/.local/bin` |
| `BACH_NO_PATH` | `install.ps1` | Don't change `PATH` |
| `BACH_SCOPE` | both scripts | `user` (default) or `system` |
| `GITHUB_TOKEN` | both scripts | Avoids GitHub's rate limit when looking up releases |

## For setup files

| Variable | Meaning |
| - | - |
| `BACH_ACCESS_KEY` | Access key for protected setup files |

## For tests and screenshots

| Variable | Meaning |
| - | - |
| `BACH_PREVIEW_DIR` | The install path shown in a preview, to hide your own |
| `BACH_UPDATE_FROM` | `bach update VERSION` installs from a folder of release files |
| `BACH_INSTALL_FROM` | Install scripts install from a folder instead of GitHub |


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