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

# Write your bach.toml with bach init and bach check

> Create a starter bach.toml with bach init, let Bach detect your stack, and validate every setting and file with bach check before you build.

`bach.toml` is the only file Bach needs from you. It lives in your project folder, all paths in it are relative to the file itself, and only two sections are required: `[app]` and `[files]`. This page shows how to create it and how to check it.

## Create the file

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
bach init
```

`bach init` writes a commented `bach.toml` in the current folder, or in the folder you pass. It never overwrites an existing file.

In a project it recognises, it fills the file in from the project's own metadata and tells you which stack it found:

| Detected from | Stack | What it fills in |
| - | - | - |
| `src-tauri/tauri.conf.json` | Tauri | Name, version, publisher (from the identifier), `<name>.exe`, `src-tauri/target/release`, Rust leftovers to exclude, and a WebView2 requirement |
| `package.json` with an `electron` dependency | Electron | Name, version, author as publisher, `<name>.exe`, and `dist/win-unpacked` (or `out/<name>-win32-x64` with Electron Forge) |
| A `*.csproj` file | .NET | Product or assembly name, version, company or authors, `<assembly>.exe`, `bin/Release/<framework>/win-x64/publish`, `*.pdb` excluded, and a .NET requirement with `desktop = true` for `-windows` frameworks |
| `Cargo.toml` | Rust | Title-cased package name, version, first author, `<binary>.exe`, `target/release`, and build leftovers to exclude |

Anything it cannot read is left for you to fill in. In a folder it does not recognise, it writes placeholders based on the folder's name.

> [!WARNING]
>
> Always read the generated file. Check `[app]` and `[files]` against your real build output before you run `bach check`.

## The smallest config

```toml bach.toml theme={"theme":{"light":"github-light","dark":"github-dark"}}
[app]
name = "My App"
version = "1.0.0"
publisher = "Your Name"
executable = "my-app.exe"   # relative to [files] source

[files]
source = "build"            # relative to bach.toml
exclude = ["*.pdb"]
```

Take `name`, `version` and `publisher` from your project's own metadata instead of inventing them, and keep `version` in sync with it.

> [!WARNING]
>
> Never change `[app] id` after your first release. It defaults to `name` and is how updates recognise an existing install.

## Validate it

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
bach check
```

`bach check` reads the config and lists every file the installer will install, plus the options, components and texts it found. Mistakes are reported as one sentence naming the setting at fault. Unknown settings are an error too, so a typo never goes unnoticed.

Treat every `warning:` line as something to fix or to mention to your team. A typical warning is a `[text]` entry given in only one language while the window speaks several.

## Get completion in your editor

The first line of the generated file is a schema comment:

```toml theme={"theme":{"light":"github-light","dark":"github-dark"}}
#:schema https://raw.githubusercontent.com/usebach/bach/main/schema/bach.schema.json
```

Editors with TOML support complete every setting and flag typos as you type. See [Editor support](/docs/reference/setup/editor-support.md).

## Next steps

> [card] [Customize the window](/docs/guides/customize-the-window.md)
>
> Logo, accent, theme, languages, license and texts.

> [card] [Full reference](/docs/reference/config/overview.md)
>
> Every setting with defaults.


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