← All tools

@kitlangton/stack

Popularity 65 Updated Development & Build

Squash-safe stacked PR/MR repair CLI for GitHub and GitLab

npmauto-collected

Installation

npm
npm install -g @kitlangton/stack

Install with npm.

stack

╭───STACK───╮
dev
└─ #101
   └─ #102
      └─ #103
╰───────────╯

Squash-safe stacked PR/MR repair for coding agents working in GitHub or GitLab repos that squash-merge and delete branches.

stack is agent-first. Humans can run it directly, but the happy path is: let the agent do normal code work with plain git, then use stack for stack inspection, repair, merge, and undo workflows.

Install

npm install -g @kitlangton/stack

Install the agent skill too:

npx skills add kitlangton/stack --skill stack

Install and authenticate the matching host CLI:

gh auth login      # GitHub
glab auth login    # GitLab

Agent Happy Path

  • Create stacked changes using normal git branches.
  • Open the root PR/MR against trunk, for example main or dev.
  • Open each child PR/MR against its parent branch.
  • Preview the stack:
stack sync
  • Apply the safe maintenance workflow:
stack sync --apply
  • Merge from the root when ready:
stack merge
stack merge --apply

Use stack merge --auto when the code host should wait for merge requirements, then repair descendants automatically after the root lands.