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.

  1. 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/stkd

    or cargo install stkd-cli · npm i -g stkd-cli · pip install stkd-cli

  2. 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 init

    detects your trunk and provider (GitHub or GitLab) automatically

  3. 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

  4. 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 log

    the DAG of your stack is stored in .git/config

  5. 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 --stack

    reviewers see small, isolated PRs and don't need stkd installed

  6. 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 merges

    no more manual git rebase --onto across four branches

That's the whole loop.

Create, submit, restack. Everything else in stkd is a refinement of those three verbs.