Installing
Perch is pre-1.0: the command line may still change between releases, and the changelog marks every change that breaks something. macOS, Linux and Windows, on both Arm and Intel except Windows, which is x64 only. Claude Code has to be installed for Perch to have anything to switch between.
Homebrew
Section titled “Homebrew”On macOS or Linux:
brew tap perch-cli/perchbrew install perchThe installer
Section titled “The installer”On macOS or Linux:
curl -fsSL https://perch-cli.github.io/perch/install.sh | shOn Windows:
irm https://perch-cli.github.io/perch/install.ps1 | iexIt offers to add its directory to your user PATH, which belongs to the
Installation rather than to anything Perch holds — so a Purge leaves it. To
remove it, naming your PERCH_INSTALL_DIR instead if you set one:
[Environment]::SetEnvironmentVariable('Path', ((([Environment]::GetEnvironmentVariable('Path', 'User') -split ';') | Where-Object { $_ -ne "$env:LOCALAPPDATA\Perch\bin" }) -join ';'), 'User')Anywhere:
npm install -g perch-cliPerch is pre-1.0 and the version number says so. It is published like anything
else on npm — latest is the newest release — because npm has no way for a
package to have no latest, and pretending otherwise only meant installing an
older version instead of a newer one.
By hand
Section titled “By hand”From the releases page. Every
release carries one archive per platform and a SHA256SUMS; the signed build
provenance is an attestation GitHub holds rather than a file among the assets.
The checksums say which bytes; the provenance says which workflow,
in which repository, at which commit produced them, which is the stronger claim:
gh attestation verify perch-v<version>-<target>.tar.gz --repo perch-cli/perchBoth installers check the checksum, and check the provenance too when gh is
installed and logged in — and refuse to install if that check fails. Where gh
is not there, they say so rather than passing over it quietly, so the line you
read tells you which checks were actually made:
perch: checksum okperch: provenance not checked — that needs 'gh' installed and logged in. The checksum above is the strongest check made.Upgrading
Section titled “Upgrading”perch upgradeIt works out which of the channels above installed this Perch and hands the work
back to that one — brew upgrade perch on Homebrew, npm update -g perch-cli
on npm — because those binaries belong to Homebrew and npm, and a Perch that
wrote over one would be reverted at the next brew upgrade or thrown away at
the next npm install. It prints the command before running it. Perch replaces itself only where the
installer script put it — ~/.local/bin, %LOCALAPPDATA%\Perch\bin on
Windows, or $PERCH_INSTALL_DIR if you set one — by re-running that same
installer, which is what it did before this command existed.
A binary you unpacked from the releases page by hand belongs to no channel, and
Perch will not write over a file it did not put there. Re-run the installer to
move to a managed installation, or use --channel homebrew|npm|installer to
say which one this really is — for a relocated or symlinked binary, say.
To ask without installing anything:
perch upgrade --check # what is installed, what is newest, from whereperch upgrade --check --json # the same, for a script--check exits 0 either way, so branch on upgrade_available in the JSON rather
than on the exit code.
--release takes a particular one, with or without the leading v:
perch upgrade --release v0.2.0Going backwards is allowed and is confirmed first, because a Perch older than
the one that last wrote your Registry will refuse to read it — --yes says you
have accounted for that. Homebrew installs whatever its formula names and cannot
be pointed at an older release, so --release is refused there rather than
quietly ignored; the installer script takes PERCH_VERSION if you need to hold
a particular one.
On Windows, an npm installation prints the command instead of running it: npm
would be replacing perch.exe while it is the running process, and Windows will
not allow that. Run it from a terminal where Perch is not running. An installer
installation on Windows is fine — it renames the running binary aside, which
leaves a perch.exe.old beside it that the next upgrade clears.
Being told about new releases
Section titled “Being told about new releases”perch version says what is installed, and adds a line when a newer release
exists. It is the only thing in Perch that looks — perch status never touches
the network, and nothing else mentions upgrades. The check happens only when
you are at a terminal, is abandoned after two seconds, and says nothing at all
if it fails, so a machine that is offline or behind a proxy just doesn’t get the
line.
To switch it off entirely:
export PERCH_NO_UPGRADE_CHECK=1That is checked before the request rather than after it, so nothing goes out.
On macOS, if you download an archive in a browser
Section titled “On macOS, if you download an archive in a browser”Gatekeeper marks it as quarantined, and the binary inside is unsigned. Perch does not use Apple notarization. macOS will refuse to run it until you clear the mark:
xattr -d com.apple.quarantine perchHomebrew, npm and both installers avoid this entirely — none of them set the flag. Building from source does too.
From source
Section titled “From source”Builds and runs on macOS, Linux and Windows, with the same command surface
everywhere. The toolchain is pinned in rust-toolchain.toml — Rust 1.97.1,
edition 2024 — so rustup will fetch the right one on first build.
# builds a release binary and puts it on ~/.cargo/bin, which is on your PATH# if rustup set it upcargo install --path .
# the same binary, left at target/release/perch for you to put somewherecargo build --releaseThe tests, if you want to run them first:
# touches nothing you own: every suite but `your_machine.rs`, which is held# back by a feature rather than by a list somebody has to maintaincargo test
# reads and writes state you own — your login keychain, your ~/.claude, the# Claude Code you have installed — so it wants Claude Code installedcargo test --features your-machine --test your_machine
# bothcargo test --all-featuresOn macOS your_machine.rs reads and writes items of its own in the login
keychain, under Perch test-*, and deletes them again. It never writes Claude
Code’s item. Set PERCH_SKIP_KEYCHAIN=1 to skip those where the keychain
cannot be unlocked — they are macOS-only, because only macOS compiles them in.
The rest of the suite needs no opt-out: it touches only temporary directories
of its own.
Once it is installed
Section titled “Once it is installed”$ perch statusAdopted the Claude Code login as you@example.com (Acme, pro).Account you@example.comOrganization AcmePlan proUtilization never observedThe first command you run adopts the Claude Code login already on the machine as your first Account. Accounts picks up from there.
Letting the Wizard organize it
Section titled “Letting the Wizard organize it”$ perch wizard Account Alias Group State Headroom Utilization* you@example.com - none - never observed never observed overflow@example.com - none - never observed never observed
* is the active Account.
Add an Account? [y/N]:Group for you@example.com [none] (Enter keeps, `none` for no Group): workDeclared the Group `work`. perch group add workMoved you@example.com into `work`. perch group move you@example.com workGroup for overflow@example.com [none] (Enter keeps, `none` for no Group): workMoved overflow@example.com into `work`. perch group move overflow@example.com work
`strategy` within Group `work` [most-headroom] (Enter keeps; `most-headroom` or `soonest-reset`):`prefer-fable` within Group `work` [false] (Enter keeps; `true` or `false`):The Watcher only observes within Group `work` until `watcher-may-act` is true. Most people turn it on.`watcher-may-act` within Group `work` [false] (Enter keeps; `true` or `false`): true`watcher-may-act` on Group `work` is now true. perch config set work watcher-may-act true
Install the Watcher as a Service, starting when you log in? [y/N]: yInstalled the Watcher. It checks every 150 seconds. perch watcher installFive steps, one question at a time: what you hold, more Accounts, each Account’s Group, each Scope’s Settings, and the Watcher as a Service. Enter keeps what is there, so answering Enter to everything changes nothing. A step that changed something prints the command that does the same thing on its own, indented under it.
Run it again whenever you want to reorganize. Ctrl-C keeps every step you answered. Without a terminal it refuses and lists the five commands instead.