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

# The bach command

> Every bach command with a short explanation, global flags like --json, exit codes, which commands work on which systems and the update notice.

`bach` is the command you use to make installers. This page lists every command; each has its own page with all flags. Run `bach` without arguments to see the same list grouped by task, and `bach <command> --help` for one command's options.

## Everyday commands

| Command | What it does |
| - | - |
| [`bach init`](/docs/reference/cli/init) | Write a starter `bach.toml` |
| [`bach check`](/docs/reference/cli/check) | Check the config and list what would be installed |
| [`bach preview`](/docs/reference/cli/preview) | Open the install window without installing |
| [`bach watch`](/docs/reference/cli/watch) | Keep the preview open and reload it on changes |
| [`bach build`](/docs/reference/cli/build) | Build the setup file |
| [`bach doctor`](/docs/reference/cli/doctor) | Check that a build can work |

## Looking at and testing setup files

| Command | What it does |
| - | - |
| [`bach inspect`](/docs/reference/cli/inspect) | Show what a setup file installs |
| [`bach verify`](/docs/reference/cli/verify) | Check a setup file for damage |
| [`bach diff`](/docs/reference/cli/diff) | Compare two versions |
| [`bach test`](/docs/reference/cli/test) | Install, start and remove it in Windows Sandbox |

## The window's look

| Command | What it does |
| - | - |
| [`bach styles`](/docs/reference/cli/styles) | List the built-in styles |
| [`bach layouts`](/docs/reference/cli/layouts) | List the built-in layouts |

## Releasing and publishing

| Command | What it does |
| - | - |
| [`bach version`](/docs/reference/cli/version) | Show or raise the version in every file |
| [`bach workflow`](/docs/reference/cli/workflow) | Add the GitHub release workflow |
| [`bach sign`](/docs/reference/cli/sign) | Sign a setup file |
| [`bach feed`](/docs/reference/cli/feed) | Write the update feed |
| [`bach feed-key`](/docs/reference/cli/feed-key) | Make the key that signs feeds |
| [`bach key`](/docs/reference/cli/key) | Make access keys |
| [`bach winget`](/docs/reference/cli/winget) | Write winget manifests |
| [`bach choco`](/docs/reference/cli/choco) | Write a Chocolatey package |
| [`bach page`](/docs/reference/cli/page) | Write a download page |
| [`bach intune`](/docs/reference/cli/intune) | Write Intune settings |

## Setup and Bach itself

| Command | What it does |
| - | - |
| [`bach import`](/docs/reference/cli/import) | Start from an Inno Setup or NSIS script |
| [`bach profiles`](/docs/reference/cli/profiles) | List the profiles of `bach.toml` |
| [`bach update`](/docs/reference/cli/update) | Update `bach` itself |

## Global flags

| Flag | Meaning |
| - | - |
| `--help`, `-h` | Help for `bach` or one command |
| `--version`, `-V` | The version of `bach` |
| `--json` | Print one JSON object instead of text |

With `--json`, the object holds `ok`, `warnings` and, for most commands, fields about the result, such as `setup`, `version`, `sha256` and `size` after a build. An error gives `{"ok": false, "error": "..."}`. The fields are described in [`schema/bach-output.schema.json`](https://github.com/usebach/bach/blob/main/schema/bach-output.schema.json). `bach watch` has no JSON result.

## Exit codes

`0` means success. Anything wrong prints a sentence and exits with a non-zero code, so you can use `bach` in scripts and CI.

## Config path

Commands that read a config use `bach.toml` in the current folder unless you give another path. Paths inside the config are relative to the config file.

## Systems

Almost every command works on Windows, macOS and Linux. The exceptions:

* `preview` and `watch` need Windows (Windows window) or macOS (Mac window).
* `test` needs Windows.
* Only a build on Windows applies your icon and details to a Windows setup file.

## Update notice

When a newer Bach exists, commands run in a terminal end with a line saying so and how to update. It's not shown in CI, with `--json` or when output is piped. `BACH_NO_UPDATE_CHECK` turns it off.


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