stkd-cli
Stack CLI distributed via PyPI — Install the gt binary for managing stacked pull requests on GitHub and GitLab.
Stack is an open-source, Graphite-compatible CLI that breaks large changes into small, reviewable PRs that stay in sync automatically. This Python package downloads the correct prebuilt binary for your platform (macOS, Linux) and installs it as the gt command.
What is Stack?
Large pull requests are hard to review. Stacked diffs let you split work into a chain of dependent branches, each with its own focused PR:
main
└── feature/auth-base PR #1: Core authentication
└── feature/auth-oauth PR #2: OAuth support (depends on #1)
└── feature/auth-2fa PR #3: 2FA (depends on #2)
When you update a branch, Stack automatically rebases all dependent branches. When PRs merge, the stack collapses cleanly.
Why Stacked Diffs?
| Traditional PRs | Stacked Diffs |
|---|---|
| One large PR with many changes | Multiple small, focused PRs |
| Reviewers overwhelmed | Easy to review incrementally |
| All-or-nothing merging | Land changes as they're approved |
| Blocked waiting for review | Unblock yourself, keep coding |
Features
- Auto-restack — Edit any branch, all dependents rebase automatically
- GitHub + GitLab — Full support for both platforms, including self-hosted GitLab
- Stack-aware submit — One command creates PRs for your entire stack
- Interactive TUI — Keyboard-driven terminal UI for browsing stacks
- MCP Server — AI agent integration via Model Context Protocol
- Undo/redo — Recover from mistakes with
gt undo - Graphite compatible — Drop-in replacement for
gtcommands
Installation
pip install stkd-cli
With uv
uv pip install stkd-cli
In a virtual environment
python -m venv .venv
source .venv/bin/activate
pip install stkd-cli
Quick Start
# Initialize in your repository
gt init
# Authenticate with GitHub or GitLab
gt auth --github
# Create a stack
gt create feature/step-1
gt create feature/step-2
gt create feature/step-3
# Submit all as PRs
gt submit --stack
Platform Support
- macOS (Intel & Apple Silicon)
- Linux (x86_64 & aarch64)
If a prebuilt binary is not available for your platform, the installer falls back to building from source with cargo.
Python API
from stkd_cli import run, run_json
# Run a command
result = run(["log", "--json"])
print(result.stdout)
# Run and parse JSON
stack = run_json(["log"])
print(stack)
Documentation
Full documentation at docs.neullabs.com/stkd.
License
Apache-2.0. See LICENSE for details.
Built by Neul Labs.
Metadata
Release files for stkd-cli 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| stkd_cli-0.1.0.tar.gz | 5.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| stkd_cli-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 3.2 MB
Release files / stkd_cli-0.1.0.tar.gz
| Download URL | stkd_cli-0.1.0.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
223fe14b32cdc5b504e93f02dbfb9892f6612f1a4b708449330cee23c19ff6ed
|
|
BLAKE2b-256 checksum How to use checksums |
388876fd899976d631c575f694a3bec70fb0166602a3cad434685f90b15adf14
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / stkd_cli-0.1.0-py3-none-any.whl
| Download URL | stkd_cli-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.2 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
74d4bdc5d0e700a97d11778afe3326fc110f2331a1accac845687c04f9a7933d
|
|
BLAKE2b-256 checksum How to use checksums |
25c8126f3292603884cee68b065785967dc1a8f9b8bfcae5ed6ed7459035fc03
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|