Quickstart
Your first stack in five minutes.
Six commands take you from an empty repo to a submitted, self-syncing stack of pull requests. Every command below is a real stkd command — copy them as you go.
-
Install stkd
Install the CLI with Homebrew, Cargo, npm, pip, or the curl script. The same Rust binary runs on macOS, Linux, and Windows.
brew install neul-labs/tap/stkdor cargo install stkd-cli · npm i -g stkd-cli · pip install stkd-cli
-
Initialize the repo
Run gt repo init inside any git repo to tell stkd which branch is your trunk (usually main). This reads existing Graphite metadata too, so migrations are instant.
cd your-repo gt repo initdetects your trunk and provider (GitHub or GitLab) automatically
-
Create the bottom of your stack
From the trunk, gt create starts a tracked branch. Make your first focused change and commit it — this becomes the first PR in the stack.
gt create schema-migration # edit files git commit -am 'Add users table'gt create tracks the parent for you — no manual branch bookkeeping
-
Stack the next change on top
Run gt create again to stack a dependent branch. Keep going: each gt create adds a link, and gt log shows the whole chain and its PR status.
gt create user-api # edit files git commit -am 'Add /users endpoint' gt logthe DAG of your stack is stored in .git/config
-
Submit the whole stack
gt submit --stack opens (or updates) one pull request per branch on GitHub — or one merge request per branch on GitLab — cross-linked with a stacked-navigation comment.
gt submit --stackreviewers see small, isolated PRs and don't need stkd installed
-
Restack after edits and merges
When you amend an earlier branch or the bottom PR lands, gt restack (or gt sync) replays every dependent branch onto its updated parent automatically. Resolve any conflict once and run gt continue.
gt restack # after editing a lower branch gt sync # after the bottom PR mergesno more manual git rebase --onto across four branches
Where to next
- How stkd works — the restack engine and the stack DAG, explained.
- Every feature — auto-restack, TUI, MCP, self-hosted dashboard.
- Use cases — large features, unblocking teammates, AI agents, GitLab.
- MCP server — drive stacks from Claude Code and Cursor.
- Full command reference — every subcommand and flag.
That's the whole loop.
Create, submit, restack. Everything else in stkd is a refinement of those three verbs.