branch/work

bw

One small binary that turns the commits already on your machine into a stack of reviewable changes. No runtime to install, no Node, no Python, no surprises.

$ bw submit

Download it

One file. Nothing to install alongside it.

Then put it on your PATH

On macOS or Linux:

chmod +x ~/Downloads/bw-darwin-arm64
sudo mv ~/Downloads/bw-darwin-arm64 /usr/local/bin/bw
bw version

Or let the script do it:

curl -fsSL https://branchwork.info/install.sh | sh

It picks the right binary, checks it against the published checksums, and installs it. Read it before you pipe anything into a shell.

On Windows, rename the file to bw.exe and put it in a folder on your PATH.

The binaries are not code signed yet, so macOS Gatekeeper and Windows SmartScreen will warn about them. On macOS, run xattr -d com.apple.quarantine /usr/local/bin/bw after installing, or build from source instead.

Or build it yourself

git clone https://github.com/lizzyonit/Branchwork
cd Branchwork
go build -o bw ./cli/cmd/bw

The idea

One commit, one change

Squashing five commits into one review throws away the history a reviewer wants. bw keeps them separate and stacks them in order.

Rebases do not lose the thread

Every commit carries a Change-Id trailer, so rewriting hashes does not orphan the review attached to it.

It fails loudly

A conflict mid-stack stops and waits for you. A tool that silently drops a commit during a rebase is worse than no tool.

Commands

bw auth loginSign in. Opens your browser, stores a token in the OS keychain.
bw stack create <name>Start a stack from the current branch.
bw submitPush your commits as a stack of changes, one change per commit.
bw syncRebase the stack on its base and repush what moved.
bw stack statusShow the local stack against what the server has.
bw review listChanges waiting on your review.
bw review show <id>The incremental diff, right in the terminal.
bw checkout <id>Check out someone else's change locally.

A normal afternoon

$ bw auth login
  Opening your browser. Code: TRQK-8812
  Signed in as nadia.

$ git commit -m "Tokenize search queries"
$ git commit -m "Plan index scans"
$ bw submit
  chg_parser   Tokenize search queries into typed nodes   r1  created
  chg_planner  Plan index scans from typed query nodes    r1  created
  Stack pushed. 2 changes, review at branchwork.info/stack/stk_search

$ git commit --amend
$ bw submit
  chg_parser   r2  pushed
  chg_planner  unchanged
  1 reviewer will see only what changed since r1.

The CLI documentation covers every command, the sign-in flow, and what to do when a rebase goes sideways. Questions go to contact.