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

# bach update

> bach update installs the newest Bach release after checking its checksum, or tells you which package manager command updates your copy instead.

`bach update` updates the `bach` tool itself. It doesn't touch your apps or setup files.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
bach update               # newest release
bach update 0.11.0        # a specific version, older is fine
bach update --check       # only check
bach update --force       # reinstall the current version
```

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
Updating Bach 0.10.0 to 0.11.1
  ...
Bach 0.11.1 is installed. What's new: https://github.com/usebach/bach-installer/releases/tag/v0.11.1
```

| Argument or flag | Meaning |
| - | - |
| `VERSION` | Exactly this version. Pre-releases are never chosen as "newest". |
| `--check` | Only say whether there's a newer one (not with `VERSION` or `--force`) |
| `--force` | Install even if it's the current version |

## Copies managed by another tool

Only loose files, as installed by the scripts or the zip, update themselves. Otherwise `bach update` tells you the command:

| Installed with | Update with |
| - | - |
| npm | `npm update --global @usebach/cli` |
| Scoop | `scoop update bach` |
| winget | `winget upgrade bach` |
| Cargo | `cargo install --git https://github.com/usebach/bach-installer bach-cli --locked --force` |
| Source checkout | `git pull`, then `cargo build --release` |

A system-wide install in `%ProgramFiles%\bach-cli` needs an administrator terminal, or run `install.ps1` again with `BACH_SCOPE=system`.

## How it replaces itself

It downloads the release and its `.sha256`, stops if they don't match, checks that the new program runs and reports the right version, then swaps the files, keeping the old ones until all are in place.

## Update notice

After a command in a terminal, `bach` says when a newer version exists. The check runs in the background, so it never slows you down; the first run after a release may say nothing. It's off in CI, with `--json`, when output is piped, in source builds, and with `BACH_NO_UPDATE_CHECK`.

## Errors

| Message starts with | What to do |
| - | - |
| `Couldn't reach GitHub` | Check your connection |
| `The download doesn't match its published SHA-256` | Try again, or download from the [releases page](https://github.com/usebach/bach-installer/releases) |
| `This bach is managed by` | Run the command it names |
| `Couldn't write to` | Use an administrator terminal |

With `--json`: `current`, `latest`, `update_available`, `install`, and `updated`.


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