Skip to content

neul-labs/stkd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CI License Docs

Stack

Stacked diffs. Simplified.

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

Why Stacked Diffs?

Large PRs 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.

Installation

# Quick install (downloads binary or builds from source)
curl -fsSL https://raw.githubusercontent.com/neul-labs/stkd/main/install.sh | bash

# Or build from source
cargo install --path crates/stkd-cli

The binary is named gt for Graphite compatibility.

Quick Start

# Initialize in your repository
gt init

# Authenticate with GitHub or GitLab
gt auth login

# Create a stack of branches
gt create feature/step-1    # First branch on main
# ... make changes, commit ...

gt create feature/step-2    # Stacks on step-1
# ... make changes, commit ...

gt create feature/step-3    # Stacks on step-2
# ... make changes, commit ...

# See your stack
gt log
# ○ feature/step-1
#   ○ feature/step-2
#     ◉ feature/step-3  ← you are here

# Submit all as PRs
gt submit --stack

Core Workflow

Command Description
gt create <name> Create a branch stacked on current
gt log Visualize the stack
gt up / gt down Navigate between branches
gt restack Rebase all dependent branches
gt submit --stack Create/update PRs for the stack
gt sync Fetch, restack, clean merged branches
gt land --stack Merge the stack in order

Key Features

  • Auto-restack: Edit any branch, all dependents rebase automatically
  • GitHub + GitLab: Full support for both platforms
  • PR automation: Reviewers, labels, templates, draft PRs
  • Stack-aware submit: One command creates PRs for your entire stack
  • Conflict handling: gt continue / gt abort for rebase conflicts
  • Undo/redo: Recover from mistakes with gt undo

Try the Demo

See Stack in action with an interactive demo:

./demo.sh

Documentation

Full documentation at docs.neullabs.com/stkd:

Architecture

crates/
├── stkd-cli          # CLI binary (gt)
├── stkd-core         # Core library (Repository, Stack, DAG)
├── stkd-provider-api # Provider trait definitions
├── stkd-github       # GitHub implementation
├── stkd-gitlab       # GitLab implementation
├── stkd-db           # Database layer (SQLite/PostgreSQL)
└── stkd-server       # Web dashboard API

Comparison with Graphite

Feature Graphite Stack
Open source No Yes
Self-hosted No Yes
GitHub Yes Yes
GitLab No Yes
CLI compatible gt gt

Contributing

git clone https://github.com/neul-labs/stkd
cd stkd
cargo build
cargo test

See CONTRIBUTING.md for guidelines.

License

Apache-2.0 - See LICENSE for details.


Built by Neul Labs

About

Stacked diffs. Simplified.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published