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

# [[context_menu]]: add right-click entries

> Reference for [[context_menu]] in bach.toml: add Explorer right-click entries for files, folders, a folder's background or one file type that start your app.

`[[context_menu]]` adds entries to Explorer's right-click menu that start your app with the clicked file or folder.

```toml bach.toml theme={"theme":{"light":"github-light","dark":"github-dark"}}
[[context_menu]]
name = "Open with Hello"
on = ["files", ".md"]           # files, folders, background, ".ext", or a list
arguments = '"%1"'              # optional; "%1" is the clicked item

[[context_menu]]
name = "Open Hello here"
on = "background"               # the empty space inside an open folder
```

| Setting | Default | Meaning |
| - | - | - |
| `name` | required | The menu text. 1 to 80 characters, with at least one letter or digit. |
| `on` | required | Where it shows up: one place or a list. |
| `arguments` | `"%1"`, or `"%V"` for the background | The command line after your program's path. |

| `on` | Shows on |
| - | - |
| `"files"` | every file |
| `"folders"` | every folder |
| `"background"` | the empty space inside a folder (`%V` is that folder) |
| `".md"` | files with that extension. Types that run code, like `.exe`, are refused. |

## What to know

* Windows 11 shows these entries under "Show more options". The short menu is reserved for apps with a packaged shell extension.
* Selecting several files starts one copy of your app per file.
* Entries are written to `HKCU\Software\Classes` (`HKLM` for a [machine-wide install](/docs/guides/machine-wide-installs.md)) with a `BachApp` mark. Setup changes and removes only entries with its own mark, and leaves an entry of the same name that another program made.
* Two entries whose names differ only in punctuation would share a key, so they are refused.
* `bach inspect` lists each entry as `Right-click`.


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