HeadlinesBriefing favicon HeadlinesBriefing.com

Maiao: Stacked GitHub PRs from CLI

Hacker News •
×

Maiao is a community fork of adevinta/maiao that brings Gerrit-style stacked pull requests to GitHub, GitLab, Gitea, Forgejo, Bitbucket Cloud, and Cursor Origin. It enables developers to break large features into small, reviewable commits, where each commit becomes its own PR/MR with proper parent-child dependencies.

The tool provides the `git review` command, which creates one PR/MR per commit, stacks them automatically, registers native stacks when available (GitHub Stacks, GitLab auto-detected stacks), manages fixups using `git commit --fixup`, tracks commits via Change-IDs using the Gerrit commit-msg hook, and auto-rebases the stack when PRs/MRs get merged. Maiao auto-detects the provider from the remote URL for known hosts and prompts for self-hosted instances.

Key benefits include granular reviews, clear history, easy fixups, automatic stacking, native stack integration, merge detection, rebase integration, and multi-provider support. For GitHub, Maiao treats native stacks as a progressive enhancement, probing the Stacks API and registering PRs as a stack when supported.

Maiao is free and open source under the MIT License. Contributions are welcome via CONTRIBUTING.md. It implements the stacked diffs methodology, with further reading available from Jackson Gabbard's foundational article and Graphite's guide.

Named after a tiny island, Maiao encourages smaller and nicer commits in pull requests.