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

> Register a link scheme like hellonotes:// and the file extensions your app opens, with every setting, refused values and what removal does.

These two blocks connect your app to Windows: `[[protocols]]` makes links such as `hellonotes://` open your app, and `[[file_types]]` lets it open files with an extension. Both can repeat. They're registered for the current user, or for the computer with a [machine-wide install](/docs/guides/machine-wide-installs.md).

## \[\[protocols]]

```toml bach.toml theme={"theme":{"light":"github-light","dark":"github-dark"}}
[[protocols]]
scheme = "hellonotes"
description = "Hello Notes link"
```

Clicking `hellonotes://open/123` starts your program with the full link as its argument.

| Setting | Required | Meaning |
| - | - | - |
| `scheme` | yes | The scheme. 2 to 32 characters: lowercase letters, digits, `+`, `-`, `.`, starting with a letter. A trailing `://` is removed. |
| `description` | no | A name for the registration |

Schemes that belong to Windows or browsers, such as `http` or `file`, are refused. If another program already registered the scheme on a computer, setup leaves it alone.

## \[\[file\_types]]

```toml bach.toml theme={"theme":{"light":"github-light","dark":"github-dark"}}
[[file_types]]
extension = ".hnote"
description = "Hello Notes note"
```

| Setting | Required | Meaning |
| - | - | - |
| `extension` | yes | One extension such as `.hnote` (the dot is added if missing) |
| `description` | no | What Windows calls such files |

Your app appears under **Open with**, and opens the file when it's double-clicked if no other program had claimed that type. Your program receives the file's path as an argument. Types that run code, such as `.exe`, `.bat`, `.ps1` or `.lnk`, are refused.

## Removal

Registry keys Bach creates carry a `BachApp` mark. Uninstalling removes only marked keys of this app; keys made by other programs are never changed.

These sections don't apply to the Mac build. A Mac app declares its types in its own `Info.plist`.


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