bach command on your computer. This is the tool you use to make installers. Your users never need it; they only get the setup file you build.
Pick one method. None of them needs Rust, and none asks for administrator rights unless you choose a system-wide install.
Install
- npm
- Windows (PowerShell)
- macOS and Linux
- Scoop
- Zip file
- Cargo
Works on Windows, macOS and Linux. You need Node.js 18 or newer.Don’t use Then add
sudo or an administrator terminal. If npm says it can’t write to its global folder, give npm a folder of your own and try again:~/.npm-global/bin to your PATH.You can also add Bach to a single project, which keeps everyone on your team on the same version:npm says the platform package isn't installed
npm says the platform package isn't installed
@usebach/cli holds no program itself. npm installs a second package that matches your system, such as @usebach/cli-win32-x64. If npm ran with --omit=optional, that second package is missing. Install again without the flag.BACH_VERSION, for example 0.11.1, or 0.11 for the newest 0.11 release.
For CI, see Build in GitHub Actions; you don’t need to install anything yourself there.
Check that it works
bach and a version number. Then run:
bach doctor says whether Bach has what it needs to build. In a folder without a bach.toml, it tells you so and suggests bach init. That’s expected at this point.
Running bach on its own lists every command, grouped by what you’d use it for.
What gets installed
Bach is two programs:bachis the command you type.bach-setupis the install window. Every setup file you build is a copy of it with your app attached.
bach only has the command (macOS, Linux, Cargo), it downloads the setup program when a build needs it and keeps it in %LOCALAPPDATA%\bach\runtime\<version> on Windows or ~/.cache/bach/runtime/<version> elsewhere. Environment variables lists settings that change this, such as building on a computer without internet access.
Update Bach
When a newer release exists,bach mentions it after a command you run in a terminal. How you update depends on how you installed it:
If you run
bach update on a copy that npm, Scoop or Cargo manages, it tells you which command to use instead. Set BACH_NO_UPDATE_CHECK=1 to stop the notices.
Updating Bach doesn’t change installers you already built, and it doesn’t update your users’ apps.
Remove Bach
With npm, runnpm uninstall --global @usebach/cli. With Scoop, scoop uninstall bach. For the PowerShell script, delete %LOCALAPPDATA%\Programs\bach-cli and remove it from your PATH; for the shell script, delete ~/.local/bin/bach.