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

# [[protocols]] and [[file_types]]: links and files your app opens

> Reference for [[protocols]] and [[file_types]] in bach.toml: register a myapp:// link scheme and file extensions for the user, with the refused values.

Two small tables connect your app to Windows: `[[protocols]]` registers a link scheme such as `myapp://`, and `[[file_types]]` lists files your app can open. Both are registered for the current user only.

## \[\[protocols]]

Links like `myapp://open?file=x` start your app with the link as its first argument.

```toml bach.toml theme={null}
[[protocols]]
scheme = "myapp"
description = "My App link"         # optional
```

| Setting | Meaning |
| - | - |
| `scheme` | The scheme, without `://` |
| `description` | Optional text for the registration |

Schemes that belong to Windows or browsers (`http`, `file`, `ms-...` and so on) are refused. If another program already owns the scheme, setup leaves it alone.

## \[\[file\_types]]

Files your app opens. They are listed under **Open with**, and your app becomes the default only for types no other program opens yet, so installing your app never takes files away from another one.

```toml bach.toml theme={null}
[[file_types]]
extension = ".mydoc"
description = "My App document"     # optional
```

| Setting | Meaning |
| - | - |
| `extension` | The extension with its dot, like `.mydoc` |
| `description` | Optional text shown for the file type |

Types that run code (`.exe`, `.bat`, `.ps1`, `.lnk` and similar) are refused.

## Removal

The registry keys Bach creates carry a `BachApp` mark. On uninstall only keys with that mark are removed. Keys without it belong to another program and are never changed or deleted.

See [Integration](/docs/guides/integration.md) for the guide.


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