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
# Already installed? Self-update to the latest release.
$ ezs upgrade
Self-update ezs (and the companion ezs-mcp) to the latest GitHub release in one command. Verifies the SHA-256 and replaces the running binary atomically — no brew upgrade, no go install, no manual download.
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. ezs sync --continue honors the same scope flags as sync and re-syncs the entire descendant subtree from the resolved branch. Sync also fast-forwards each local to origin/<branch> first, so collaborator commits get picked up automatically. 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.
ezs doctor validates your environment — git, gh, fzf, and config — in one pass. Run ezs status --watch for an auto-refreshing view of your stack as PRs and CI move.
ezs new --template <name> seeds fresh worktrees from ~/.ezstack/templates/<name> — scaffold files, scratch notes, or env stubs on every new branch.
ezs delete --cascade removes a branch and every descendant in one shot — no more clicking through children to clean up an abandoned subtree.
ezs pr --draft-all opens draft PRs across every branch in your stack in a single command — perfect for kicking off a feature where you want everything visible but not yet ready.
Drop shell scripts into ~/.ezstack/hooks/ as pre-commit, post-commit, pre-push, post-push, pre-sync, or post-sync. Each hook gets rich env-var context and a defined exit-code contract to abort or continue the operation.
Every major command accepts --examples to print a focused cheatsheet, and unknown subcommands get did-you-mean suggestions so typos land you on the right command fast.
Run ezs upgrade and the running binary self-updates to the latest GitHub release — SHA-256 verified, atomic replace, and the companion ezs-mcp stays in lock-step. No brew upgrade, no go install, no manual downloads.
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.8.5... ✓
Registering ezstack MCP with claude (user scope)... ✓
Launching claude in ~/worktrees/auth-service...
Stack context injected (3 branches, 2 PRs, 28 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 |
doctor | Check that ezstack's runtime dependencies and on-disk config are healthy. |
upgrade | Self-update the running ezs binary (and the companion ezs-mcp if installed) to the latest published GitHub release. |
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.8.5.vsix from the release pageCmd+Shift+P → "Install from VSIX" → select the fileDrive ezs from Claude Code and any MCP-compatible agent. 28 stack operations exposed as Model Context Protocol tools — inspect (status, list, diff, log, doctor, config_show), mutate (commit, amend, sync, push, new, delete, reparent, stack, unstack, config_set, config_import), navigate (goto, up, down), and manage PRs (pr_create, pr_update, pr_merge, pr_draft, pr_draft_all, pr_stack, pr_refresh), plus config export. 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.nvim" }:Ezs to open the stack viewer, or :Telescope ezstack branches for fuzzy pickingezs CLI installed, Neovim 0.10+, and optionally telescope.nvim