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.

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.

terminal
$ 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.

stkd-engine · Rust
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.

claude_desktop_config.json
{
  "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/stkd

macOS · Linux — single tap, formula auto-updates with releases.

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 GraphitePlain git
Open source license Apache-2.0 Source-availableGPL
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 tierFree

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.