Manage stacked pull requests with git worktrees. Create branches, sync rebases, manage PRs — all from one CLI.
Choose your preferred installation method.
$ go install github.com/KulkarniKaustubh/ezstack/v4/cmd/ezs@latest
$ brew tap KulkarniKaustubh/ezstack
$ brew install ezstack
$ git clone https://github.com/KulkarniKaustubh/ezstack.git
$ cd ezstack
$ make install
Enable automatic directory changes for navigation commands.
# Add to ~/.bashrc or ~/.zshrc
$ eval "$(ezs --shell-init)"
gh) for PR operationsStop waiting on code reviews. Stack your PRs and develop in parallel.
Launch an AI coding agent scoped to your stack with full context injected — branches, worktrees, commands, docs. Describe a feature and the agent builds it as incremental stacked branches. Fully customizable prompt templates. Requires worktree mode (the default).
Every branch gets its own directory. Edit feature-1 and feature-2 side by side — no stashing, no context switching.
ezs commit and ezs amend automatically rebase every child branch. Your stack stays in sync without you thinking about it.
Create, update, merge, and toggle draft status from the CLI. Stack descriptions update across all PRs with ezs pr stack.
No daemon, no server, no custom storage. ezstack reads from git directly and stores minimal metadata. Delete it and your repo is unchanged.
Every command works with zero arguments (powered by fzf) or fully scripted with flags, --json output, and structured exit codes.
Rebase conflicts pause with clear recovery instructions. Run ezs sync --continue to resume, push, and re-sync children. Autostash and --dry-run included.
Tree-style branch display shows parent-child relationships at a glance. ezs ls includes +/- diff stats per branch and strikes through merged PRs.
Three steps to unblock your team.
Branch off any parent. Each branch gets its own worktree directory.
$ ezs new auth-service
Created branch 'auth-service' with worktree
$ ezs new auth-middleware --parent auth-service
Created branch 'auth-middleware' with worktree
Each branch is a real directory. Open them in separate editor windows. Commit and children auto-sync.
$ ezs commit -m "Add auth middleware"
[auth-middleware abc1234] Add auth middleware
Syncing children... done.
Create PRs, sync the stack, merge — all from the CLI. Stack descriptions auto-update.
$ ezs pr create -t "Add auth service"
https://github.com/you/repo/pull/42
$ ezs pr stack
Updated 2 PR descriptions with stack info
Check out any remote branch into its own worktree and stack. See PR info, review status, and line diffs instantly. Work on it, push, sync — everything just works.
Fetch, create a tracking branch, and open a worktree — all in one step. PR metadata and diff stats are shown automatically.
$ ezs new origin/add-jwt-auth
Creating worktree for remote branch 'add-jwt-auth'...
Created worktree for 'add-jwt-auth' at ~/worktrees/add-jwt-auth
PR #42: Add JWT authentication
State: OPEN Base: main Review: REVIEW_REQUIRED
Diff vs main: +320 / -45 lines
Launch an AI agent with full stack context injected. Work on a branch or describe a feature and let the agent build it as stacked PRs. With Claude Code, the ezstack MCP server is auto-installed and registered on first launch — zero setup.
The agent sees your stack structure, worktree paths, and all ezstack commands. It works within a single branch.
$ ezs agent
Installing ezs-mcp@v4.4.2... ✓
Registering ezstack MCP with claude (user scope)... ✓
Launching claude in ~/worktrees/auth-service...
Stack context injected (3 branches, 2 PRs, 21 MCP tools)
$ ezs agent --branch auth-middleware
Launching claude in ~/worktrees/auth-middleware...
The agent explores your codebase, plans a series of stacked branches, and implements each one with commits and PRs.
$ ezs agent feature "Add JWT auth"
Agent will plan and implement as stacked branches...
# Agent creates:
main
└── jwt-types PR #44
└── jwt-middleware PR #45
└── jwt-routes PR #46
26 commands. Everything aliased for speed. Run ezs <command> --help for details.
new n | Create a new branch in the stack. |
list ls | List all stacks and branches. |
status st | Show status of current stack with PR and CI info. |
stack | Add an untracked branch/worktree to an existing stack, start a new stack, or rename a stack. |
unstack | Remove a branch from stack tracking without deleting the git branch or worktree. |
delete del, rm | Delete a branch and its worktree. |
reparent rp | Change the parent of a branch and sync commits onto the new parent. |
goto go | Navigate to a branch worktree. |
up | Navigate up the stack toward parent |
down | Navigate down the stack toward children |
sync | Sync stack with remote. |
commit ci | Commit and auto-sync child branches |
amend | Amend last commit and auto-sync children |
push | Push current branch or entire stack to remote. |
diff | Show diff against parent branch. |
pr create | Create a new pull request |
pr update | Push changes and update PR metadata |
pr merge | Merge a pull request (merge, squash, or rebase) |
pr draft | Toggle PR between draft and ready |
pr stack | Update all PR descriptions with stack info |
config cfg | Interactive configuration setup |
config set | Set a configuration value |
config show | Show current configuration |
menu | Interactive command menu |
agent | Launch AI agent scoped to a stack with full context |
agent feature | Break a feature into stacked branches via AI |
agent prompt | View or edit agent prompt templates |
Agent prompts are stored as editable Markdown files in ~/.ezstack/:
agent-work-prompt.md — Work session promptagent-feature-prompt.md — Feature builder promptPrompts use template variables replaced at runtime: {{STACK_JSON}}, {{BRANCH_NAME}}, {{PARENT_NAME}}, {{WORKTREE_PATH}}, {{EZS_DOCS}}, {{FEATURE_DESCRIPTION}}.
Use ezstack wherever you work. CLI, editor, or desktop.
Visual stacks board powered by Tauri. See all your stacks as a tree, manage branches, sync, create PRs, and even drive a remote ezs install over SSH — all from a native UI.
.dmg (macOS), .msi/.exe (Windows), or .AppImage/.deb/.rpm (Linux)ezs CLI installed and on your PATHStack viewer panel in your sidebar. Browse branches, explore file trees per branch, see PR status, and open any branch in a new window — all without leaving the editor.
ezstack-4.4.2.vsix from the release pageCmd+Shift+P → "Install from VSIX" → select the fileDrive ezs from Claude Code and any MCP-compatible agent. Eleven stack operations exposed as Model Context Protocol tools — status, list, sync, push, PR create/merge, goto, new, delete, reparent. Destructive tools are annotated so clients can prompt before running.
brew install ezstack (ships ezs-mcp alongside ezs), or go install github.com/KulkarniKaustubh/ezstack/v4/cmd/ezs-mcp@latestclaude mcp add ezstack --scope user -- ezs-mcpezs CLI and an ezstack-configured repositoryNative Lua plugin with Telescope integration, stack viewer, statusline component, and fugitive auto-refresh. Manage your entire stack without leaving Neovim.
{ "KulkarniKaustubh/ezstack", subdir = "neovim-plugin" }:Ezs to open the stack viewer, or :Telescope ezstack branches for fuzzy pickingezs CLI installed, Neovim 0.10+, and optionally telescope.nvim