Open source · Apache-2.0 · v0.1.0
Stacked diffs.
Simplified.
stkd is an open-source CLI for managing stacked pull requests on GitHub and GitLab. Break large changes into small, reviewable PRs that stay in sync automatically. Graphite-compatible. Self-hosted. Multi-platform. AI-ready.
brew install neul-labs/tap/stkd · cargo install stkd-cli · npm i -g stkd-cli
- GitHub + GitLab Both providers supported, including self-hosted GitLab.
- Rust · npm · pip Install via your favorite ecosystem. Same single binary.
- Apache-2.0 Permissive licensing. No vendor lock-in. No telemetry by default.
- MCP-ready First-class Model Context Protocol server for AI agents.
The shape of a stack
One feature, four small PRs — instead of one giant blob.
Stacked diffs let you keep coding while reviewers are still on PR #1. Every branch in the stack is a focused, reviewable unit that builds on the one beneath it.
With stkd
● main
└─ ● feature/auth-base PR #1 · in review
└─ ● feature/auth-oauth PR #2 · ready
└─ ● feature/auth-2fa PR #3 · draft
└─ ◉ feature/auth-recovery ← you - Edit any branch — dependents auto-restack.
- Merge PR #1 — the stack collapses cleanly.
- One command opens or updates all four PRs.
Without stkd
● main
└─ ● feature/auth-everything PR #1 · +4,200 / -187
# 4 weeks of work in one diff
# 3 reviewers, 142 comments
# merge conflicts daily - One huge PR that nobody wants to review.
- Blocked work while you wait for sign-off.
- Merge conflicts compound each rebase.
Why stkd
A complete stacked-diff workflow.
Everything you need to ship stacked changes — and nothing you don't.
Stacks that stay in sync
Edit any branch and stkd auto-restacks every dependent branch on top. No more manual `git rebase --onto` gymnastics.
GitHub and GitLab — first class
Create, update, and land stacked PRs and merge requests with one command. GitLab support includes self-hosted instances.
Interactive terminal UI
Browse stacks, view PR status, and navigate branches with vim-style keybindings. `gt tui` is a stack browser, not a wizard.
MCP server for AI agents
Drop-in MCP server lets Claude, Cursor, and other agents create branches, submit stacks, and resolve conflicts natively.
Self-hosted web dashboard
Optional REST + WebSocket dashboard you can run on your own infrastructure. SQLite or Postgres backed. Zero vendor lock-in.
Truly open source
Apache-2.0 licensed. Single-binary install. Rust core with npm and pip wrappers. The whole stack is yours to audit.
Graphite migration in minutes
`gt` is the same command. Same metadata model. Existing Graphite stacks come over cleanly — no retraining required.
Fast where it matters
Rust core, parallel git2 reads, and a smart commit DAG keep `gt log` and `gt restack` instant — even on monorepos.
Three surfaces
CLI for humans. API for code. MCP for AI.
Same stacked-diff engine. Three ways to drive it — pick whichever fits the workflow at hand.
$ gt create feature/api-v2
$ git commit -am "add v2 routes"
$ gt create feature/api-v2-tests
$ git commit -am "tests for v2"
$ gt submit --stack
✓ PR #421 opened (feature/api-v2)
✓ PR #422 opened (feature/api-v2-tests) Build a stack with the gt command — Graphite users feel at home.
use stkd_engine::{submit, SubmitOptions};
let repo = Repository::open(".")?;
let ctx = ProviderContext::from_repo(&repo).await?;
let result = submit(
&repo,
SubmitOptions { stack: true, ..Default::default() },
ctx.provider(),
&ctx.repo_id,
).await?;
println!("opened {} PRs", result.created.len()); Drive stacks from your own automation, bots, or CI jobs.
{
"mcpServers": {
"stkd": {
"command": "stkd-mcp"
}
}
}
# Claude can now call gt_create,
# gt_submit, gt_restack, gt_sync,
# gt_land — natively. AI agents become first-class stack participants via MCP.
Install
One command. Five package managers.
Pick the ecosystem you already use. Every install ships the same Rust binary — no Node or Python runtime needed at runtime.
brew install neul-labs/tap/stkdmacOS · Linux — single tap, formula auto-updates with releases.
Prefer pre-built binaries? Grab them on GitHub Releases — or read the full install guide.
How stkd compares
Same workflow. Open source. Multi-platform.
stkd was designed as a drop-in replacement for Graphite that opens the toolset to GitLab and AI agents.
| Feature | stkd | Graphite | Plain git |
|---|---|---|---|
| Open source license | Apache-2.0 | Source-available | GPL |
| GitHub support | ✓ | ✓ | ✓ |
| GitLab support | ✓ | — | ✓ |
| Self-hosted GitLab support | ✓ | — | ✓ |
| Auto-restack | ✓ | ✓ | Manual `rebase --onto` |
| Interactive TUI | ✓ | — | — |
| MCP server for AI agents | ✓ | — | — |
| Self-hosted web dashboard | Yes (optional) | SaaS only | — |
| Per-seat pricing | Free | Paid team tier | Free |
From the blog
Stacked diffs, explained.
A tour of the stkd interactive TUI
Most stacked-diff workflows are typed commands. stkd ships an interactive TUI — gt tui — that lets you browse stacks, inspect PR status, and navigate branches with vim-style keys.
Read article →Self-hosting the stkd web dashboard
stkd ships an optional, self-hostable web dashboard with a Graphite-web-style view of stacks, PRs, and merges — running on your own infrastructure. Here's how to deploy it.
Read article →How to review a stacked PR (without losing your mind)
Stacked PRs feel intimidating to reviewers the first time. They're actually faster to review than one giant PR — once you know the rhythm. Here's how to do it well.
Read article →Stacked diffs vs feature branches — when each one wins
Feature branches are familiar; stacked diffs are faster for big work. Here's a side-by-side comparison of the two workflows — when to use which, and how stkd lets you stack only when it pays off.
Read article →FAQ
Questions, answered.
Stacked diffs are a code-review pattern where you split a large change into a chain of small, dependent branches — each opened as its own pull request. Reviewers approve one PR at a time, you keep coding on top of the stack, and tools like stkd automatically rebase the dependent branches whenever an earlier one changes or lands.
Ready to stack your next change?
Install stkd in under a minute. Apache-2.0, single binary, every major platform.