A small Git/GitHub workflow helper.
- Go 1.22+
- GitHub CLI (
gh), authenticated viagh auth login
Clone the repo and install the binary into your GOBIN (typically ~/go/bin):
git clone https://github.com/plinehan/flow.git
cd flow
go install .Make sure ~/go/bin is on your PATH:
export PATH="$PATH:$(go env GOBIN):$(go env GOPATH)/bin"Install pre-commit and enable the hooks:
uv add --dev pre-commit
uv run pre-commit installflow branch [name]— create and check out a new branch (<user>/<name>or a random slug)flow create [-v]— push the current branch and open a PR (-vopens it in the browser)flow view— open the current branch's PR in the browserflow update— update the current branch's PR title and description from the HEAD commit messageflow amend— amend all changes into the HEAD commit, rebase onto the latest default branch, then force-pushflow merge— auto-squash-merge the current branch's PR, then return to the default (e.g.main) branchflow rebase— rebase the current branch onto the latest default branchflow push— force-push the current branch (refused on the default branch)flow clean— delete local branches whose PRs have been mergedflow prune— prune remote-tracking branches that no longer exist onoriginflow dirty— show the stash list and all local branches