stackit

module
v0.21.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2026 License: MIT

README ΒΆ

Stackit

Tests

Stackit is a command-line tool that makes working with stacked changes fast and intuitive.

Table of Contents


What is Stacking?

Stacked changes (or "stacked diffs") is a development workflow where you break a large feature into small, focused branches that build on top of each other. Instead of one massive Pull Request, you have a "stack" of smaller PRs. Stacks can be linear (a simple chain of branches) or they can branch out into a tree structure when you need to work on multiple parallel features that share a common base.

How it helps engineers:
  • Faster Reviews: Reviewers can process small, 50-line PRs much faster than a single 500-line PR.
  • Parallel Work: You don't have to wait for a PR to be merged before starting the next part of your feature. Just stack a new branch on top.
  • Incremental Shipping: Parts of a feature can be merged and deployed as they are approved, reducing the risk of large, complex merges.
  • Cleaner History: Each PR represents a logical step in your feature's development, making the Git history easier to follow.
The Stacked Workflow
graph BT
    main[main branch] --- B1[PR 1: API Changes]
    B1 --- B2[PR 2: Implementation]
    B2 --- B3[PR 3: UI Components]
    B2 --- B4[PR 4: CLI Support]
    B3 --- B5[PR 5: Integration Tests]

    style main stroke-dasharray: 5 5

Stacks naturally form a tree structureβ€”a single branch can have multiple children when you need to work on parallel features. Stackit manages the complexity of this workflowβ€”automatically handling rebases, keeping track of parent-child relationships, and submitting the entire stack to GitHub with a single command.


Features

  • 🌳 Visual branch tree β€” See your entire stack at a glance with stackit tree
  • πŸ”„ Automatic restacking β€” Keep all branches up to date when you rebase or modify a parent
  • πŸ“€ Submit entire stacks β€” Push all branches and create/update PRs in one command with progress tracking
  • πŸ”€ Smart merging β€” Merge stacks bottom-up or squash top-down
  • πŸ”§ Absorb changes β€” Automatically amend changes to the right commit in your stack
  • 🧭 Easy navigation β€” Move up, down, top, or bottom of your stack
  • 🧹 Auto cleanup β€” Detect and delete merged branches during sync
  • 🎯 Smart scoping β€” Associate branches with Jira tickets, Linear IDs, or other logical scopes
  • πŸ”’ Branch protection β€” lock or freeze branches to prevent accidental modifications
  • πŸ” Branch inspection β€” Easily see parent/child relationships with children and parent commands
  • βš™οΈ Advanced configuration β€” Customize branch naming patterns and submit behavior
  • πŸ€– AI assistant integration β€” Generate integration files for Cursor, Claude Code, and Codex
  • πŸ™ GitHub Integration β€” Install CI checks to prevent merging locked PRs
  • βš“ Git Hooks β€” Automatically validate branch state before committing with precommit
  • πŸ“‚ Worktrees β€” Work on multiple stacks in parallel with dedicated directories and post-creation hooks
  • πŸ§ͺ Web dashboard (experimental) β€” Visualize your stacks in a swimlane dashboard with real-time updates (docs)

Installation

Homebrew (macOS and Linux)
brew install getstackit/tap/stackit

After installation, you can use either stackit or st, and worktree or wt.

Homebrew Server (Web UI + API)
brew install getstackit/tap/stackit-server
stackit-server --port 8080

Open http://localhost:8080 to use the web UI.

Enable shell integration to automatically change directories when creating worktrees with stackit create -w. Add one of the following to your shell configuration:

# For zsh (~/.zshrc):
eval "$(stackit shell zsh)"

# For bash (~/.bashrc):
eval "$(stackit shell bash)"

# For fish (~/.config/fish/config.fish):
stackit shell fish | source

This is separate from shell completions. You likely want both:

# zsh example:
eval "$(stackit completion zsh)"
eval "$(stackit shell zsh)"

Getting Started

1. Initialize Stackit

In your repository, run:

stackit init

This detects your trunk branch (usually main) and prepares the repo for stacking. You'll be prompted to install optional integrations (GitHub Actions, pre-commit hooks, AI agent files).

2. Create your first branch

Stage some changes, then create a branch:

git add internal/api.go
stackit create add-api -m "feat: add base api"
3. Stack another branch on top

Make more changes and create another branch:

git add internal/logic.go
stackit create add-logic -m "feat: implement logic"
4. Visualize the stack

See your current position in the stack:

stackit tree
● add-logic ← you are here
β”‚
β—― add-api
β”‚
main

Stacks can also branch when you have parallel work:

β—― add-tests
β”‚
β”‚ ● add-ui ← you are here
β”œβ”€β”˜
β—― add-logic
β”‚
β—― add-api
β”‚
main
5. Submit your PRs

Submit the entire stack to GitHub:

stackit submit

This pushes both branches and creates two PRs on GitHub, with add-logic correctly pointing its base to add-api.

6. Merge your stack

Once your PRs are approved, merge the entire stack:

stackit merge          # Interactive wizard
stackit merge next     # Merge bottom PR, then restack
stackit merge ship     # Consolidate into single PR and merge
  • stackit merge launches an interactive wizard to guide you through merging
  • stackit merge next merges the bottom-most unmerged PR using GitHub automerge, then restacks remaining branches
  • stackit merge ship consolidates all branches into a single PR for atomic merging

AI Agent Integration

Stackit includes specialized skills for Claude Code and Codex, providing intelligent automation for common stacking workflows. These skills understand stack context and can perform complex operations with minimal user input.

Available Agent Skills
Command Description When to Use
stack-status View current stack state, branch position, and health status Getting oriented in a complex stack
stack-create [branch-name] Create a new stacked branch with intelligent naming and commit messages Adding a new feature branch to your stack
stack-submit [--stack | --draft] Submit branches as PRs with auto-generated descriptions Creating or updating pull requests
stack-sync Sync with trunk, cleanup merged branches, and restack Keeping your stack up-to-date with main
stack-restack Rebase branches with scoped or multi-stack targeting Fixing branch relationships after changes
stack-absorb Intelligently absorb working changes into correct commits Applying fixes across multiple stack branches, with conflict resolution guidance
stack-fix Diagnose and fix common stack issues Resolving compilation errors or structural problems
stack-describe Generate or update stack description from changes Documenting your stack for PRs
Setting Up AI Agent Integration
stackit agent install

This creates integration files for Claude Code, Codex, and Cursor.

Generated files include:

  • ~/.claude/skills/stackit/ plus ~/.claude/skills/stack-*/ for Claude Code
  • ~/.codex/skills/stackit/ plus ~/.codex/skills/stack-*/ for Codex
  • Repository workflow guidance for CLAUDE.md or AGENTS.md when you opt in

The generated skills are designed to:

  • Understand Context: Each command analyzes your current stack state and git status
  • Provide Validation: Commands include quality checks and error handling
  • Guide Through Issues: When conflicts or errors occur, commands provide step-by-step resolution guidance
  • Ensure Safety: All commands prioritize data safety and provide undo capabilities
Example Agent Workflow
# Start Claude Code or Codex in a fresh generated worktree
stackit wt run -- claude
stackit wt run -- codex

# Inside the generated worktree, create the first real branch under its anchor
stackit create add-user-auth -m "feat: add user auth"

# Claude Code or Codex can help with complex stacking operations
# Make changes...
stack-absorb                 # Intelligently distributes changes across commits
stack-fix                    # Diagnoses and fixes any issues
stack-submit --stack         # Creates/updates all PRs in the stack

Command Reference

Navigation
Command Description
stackit state Snapshot of the stack, working tree, and any in-progress operation (--json for a complete machine-readable snapshot)
stackit tree Display the branch tree
stackit t Display the short branch tree (stackit tree short)
stackit log Show trunk commit history with consolidated stacks collapsed
stackit checkout Interactive branch switcher
stackit up / down Move to the child or parent branch
stackit top / bottom Move to the top or bottom of the stack
stackit trunk Return to the main/trunk branch
stackit children Show the children of the current branch
stackit parent Show the parent of the current branch
stackit share Print the current stack as Slack-ready markdown for copy-paste
Branch Management
Command Description
stackit create [name] Create a new branch on top of current (use -w to create with worktree)
stackit modify Amend the current commit (like git commit --amend)
stackit absorb Intelligently amend changes to the correct commits in the stack
stackit split Split commits into branches (by commit, hunk, or file; use --above for upstack)
stackit squash Squash all commits on the current branch
stackit fold Merge the current branch into its parent
stackit pop Delete current branch but keep its changes in working tree
stackit delete Delete the current branch and its metadata
stackit rename [name] Rename the current branch and update metadata
stackit describe Set a title and description for the current stack
stackit scope [name] Manage logical scope (Jira ticket, Linear ID) for current branch
stackit lock [branch] Lock a branch and its downstack (prevent local changes)
stackit unlock [branch] Unlock a branch and its upstack (allow local changes)
stackit freeze [branch] Freeze a branch (prevent local changes, local only)
stackit unfreeze [branch] Unfreeze a branch
Worktree Management
Command Description
stackit worktree create <name> Create a new worktree (auto-cd with shell integration; use --no-open to skip)
stackit worktree list List all managed worktrees
stackit worktree remove <stack> Remove an empty managed worktree and delete its hidden anchor (--force discards dirty files only)
stackit worktree open <stack> Open a worktree (auto-cd with shell integration, or print path for cd $(...))
stackit worktree attach <branch> Move an existing stack into a managed worktree by inserting a hidden anchor above it
stackit worktree detach <name> Remove a managed worktree but keep and reparent its real branches
stackit worktree prune Clean up empty or stale managed worktrees
stackit worktree run -- <cmd> Create a generated anchored worktree and run a command inside it
stackit worktree repair [name] Repair stale or legacy managed worktree registrations
Stack Operations
Command Description
stackit flatten Move branches closer to trunk where possible
stackit restack Rebase branches to ensure proper ancestry (--branch X --upstack, --all-stacks, --stacks root1,root2, --parallel)
`stackit get [branch PR]`
stackit foreach Run a shell command on each branch (--upstack, --all-stacks, --stacks, --parallel)
stackit submit Push branches and create/update GitHub PRs (alias: ss for --stack)
stackit sync Pull trunk, delete merged branches, and restack
stackit merge Interactive merge wizard (use merge next or merge ship for non-interactive)
stackit reorder Interactively reorder branches in your stack
stackit move Rebase a branch (and its children) onto a new parent
stackit pluck Extract a single branch from a stack (reparents children to grandparent)
Integrations
Command Description
stackit agent install Setup integration files for Cursor, Claude Code, and Codex
stackit github install Install GitHub Action CI checks for branch locking
stackit precommit install Install git pre-commit hook for branch state validation
stackit precommit uninstall Remove the git pre-commit hook
Utilities & System
Command Description
stackit undo Restore the repository to a state before a command
stackit doctor Diagnose and fix issues with your stackit setup
stackit info Show detailed info about the current branch
stackit track / untrack Manually start/stop tracking a branch with stackit
stackit config Manage stackit configuration
stackit debug Dump debugging information about recent commands and stack state
stackit continue / abort Continue or abort an interrupted operation (like a rebase)
Global Flags

These flags are available on all stackit commands:

Flag Description
--cwd <path> Working directory in which to perform operations.
--debug Write debug output to the terminal.
--interactive Enable interactive features like prompts, pagers, and editors. (Default: true)
--no-interactive Disable all interactive features.
--verify Enable git hooks (pre-commit, etc.). (Default: true)
--no-verify Disable git hooks.
--quiet, -q Minimize output to the terminal. Implies --no-interactive.

Common Workflows

Updating after Code Review

If you receive feedback on a branch in the middle of your stack:

  1. stackit checkout <branch> to move to that branch.
  2. Make your changes and run stackit modify.
  3. Run stackit restack --upstack to update child branches (or --all-stacks to cover every independent stack).
  4. Run stackit submit to update the PRs on GitHub.
Using stackit absorb

absorb is like magic for stacked PRs. If you have small fixes for multiple branches in your stack, just stage them all and run stackit absorb. Stackit will figure out which changes belong to which branch and amend them automatically.

Flattening a Stack

After landing PRs from the middle of a stack, or when you have independent changes that were developed as a chain but don't actually depend on each other, use flatten to move branches closer to trunk:

stackit flatten

This analyzes each branch and tests whether it can be rebased directly onto trunk (or closer to it). Branches that depend on changes from their parent will stay in place.

Syncing with the Main Branch

To keep your stack up-to-date with main:

stackit sync

This pulls the latest changes from main, deletes branches that have already been merged, and restacks your remaining branches on top of the new main.

Safety: Sync protects branches that have unpushed local commits. If a branch has been merged on GitHub but has local commits that were never pushed, sync will skip deleting it and warn you, preventing accidental data loss.

Working on Multiple Stacks in Parallel

To work on separate features simultaneously, each in their own directory:

# Create a new stack with its own worktree
stackit create my-feature -m "feat: start new feature" -w

# This creates:
# - A hidden worktree anchor branch at trunk
# - A new branch 'my-feature' parented under that anchor
# - A worktree at ../your-repo-stacks/my-feature/

Navigate to the worktree:

# With shell integration: auto-changes directory
stackit worktree open my-feature

# Without shell integration: use command substitution
cd $(stackit worktree open my-feature)

To hand a fresh isolated workspace to an AI coding tool without choosing a name:

stackit wt run -- claude
stackit wt run -- codex

Stackit generates the worktree name, creates a hidden anchor at trunk, and runs the tool inside that worktree. When the tool exits, your shell stays in the original directory. The first stackit create run inside that worktree creates the first real branch under the anchor.

During stackit sync, Stackit can automatically clean up managed worktrees that are clean and empty after merged or deleted branches are removed.

If you upgrade from an older Stackit version with pre-anchor managed worktrees, run stackit worktree list once. Any legacy or repair entries can be migrated in place with stackit worktree repair.

Collaborating on Stacks

To work on a stack created by someone else or on another machine:

# Sync an entire stack by providing a PR number or branch name
stackit get 123

By default, get freezes the fetched branches locally. This prevents accidental local modifications while you build on top of them, without affecting the original author's metadata. Use stackit unfreeze if you need to modify them.


Frozen & Locked Branches

Stackit provides two ways to protect branches from accidental modification.

Frozen Branches (Local)

Frozen status is strictly local to your machine. It's the recommended way to protect branches you've fetched from others.

  • Use Case: You want to stack your own work on top of someone else's PRs without accidentally changing their commits.
  • Behavior: Prevents modify, squash, absorb, and restack. st sync will update frozen branches by hard-resetting them to their remote tracking branch instead of rebasing.
  • Commands: st freeze, st unfreeze
Locked Branches (Shared)

Locked status is shared with everyone collaborating on the stack via remote metadata.

  • Use Case: You want to signal to your team that a set of branches are stable and should not be modified by anyone.
  • Behavior: Same restrictions as frozen branches, but visible to all users who st get or st sync the stack.
  • Commands: st lock, st unlock

Automation & CI

Stackit is designed to be easily scriptable. Use global flags to control behavior in non-interactive environments:

# Run stackit on a specific repository from a script
stackit sync --cwd /path/to/repo --no-interactive --no-verify

Interactive features are also disabled automatically when there is no attached terminal (pipes, CI, agents). To force non-interactive mode without repeating --no-interactive on every command β€” handy for AI agents and scripts β€” set the environment variable once:

export STACKIT_NO_INTERACTIVE=1
stackit create -F - < msg.txt   # no --no-interactive needed

An explicit --interactive always overrides both the env var and TTY detection.

For machine-readable status, stackit state --json is the single snapshot to read: the current branch and trunk, working-tree state (staged/unstaged/ untracked), any in-progress operation (rebase/merge) with its conflicted_files, and the full stack. The embedded stack is the same shape as stackit tree --json β€” each branch reports its structure (parent, children), PR/CI state (pr.state, pr.ci_status, pr.review_status), and stack health (needs_restack, is_locked, is_frozen, scope), with the status booleans always present (an explicit false, never omitted). One stackit state --json call replaces combining git status, stackit tree --json, and stackit info (and stackit status still passes through to git status).

stackit log --json is a separate trunk-history feed for release tooling. It emits collapsed recently merged commits, not the branch tree shape.


Configuration

Stackit uses a layered configuration system:

  1. Personal settings (highest priority) β€” Stored in .git/config, not shared
  2. Team settings β€” Stored in .stackit.yaml, committed and shared with team
  3. Defaults (lowest priority) β€” Built-in sensible defaults

This allows teams to define shared settings that individual developers can override locally.

Configuration Options
Option Description Example
trunk Primary trunk branch (default: main) stackit config set trunk main
trunks.add Add an additional trunk branch stackit config set trunks.add develop
trunks.remove Remove an additional trunk branch stackit config set trunks.remove develop
branch.pattern Customize how branch names are generated stackit config set branch.pattern "{username}/{date}/{message}"
submit.footer Include PR footer linking back to the stack (default: true) stackit config set submit.footer false
merge.method Default merge strategy (squash, merge, or rebase) stackit config set merge.method squash
ci.command CI validation command to run with stackit foreach stackit config set ci.command "make test"
ci.timeout CI command timeout in seconds (default: 600) stackit config set ci.timeout 300
undo.depth Maximum undo snapshots to retain (default: 10) stackit config set undo.depth 20
worktree.basePath Customize where worktrees are created stackit config set worktree.basePath "../my-stacks"
worktree.autoClean Auto-remove clean, empty managed worktrees during sync (default: true) stackit config set worktree.autoClean false
split.hunkSelector Hunk selector mode: tui or git (default: tui) stackit config set split.hunkSelector git
maxConcurrency Maximum concurrent validation operations (default: auto) stackit config set maxConcurrency 4
navigation.when When to show navigation: always, never, or multiple (default: always) stackit config set navigation.when multiple
navigation.marker Symbol marking current PR in stack (default: πŸ‘ˆ, max 10 chars) stackit config set navigation.marker "<--"
navigation.location Where navigation appears: body, comment, or none (default: body) stackit config set navigation.location comment
navigation.showMerged Show previously merged branches in stack navigation for historical context (default: false) stackit config set navigation.showMerged true
Interactive Configuration

Use the interactive TUI to manage all settings:

stackit config
List Current Configuration

View all current configuration values:

stackit config --list
Team Configuration (.stackit.yaml)

For team-wide settings, create a .stackit.yaml file in your repository root. This file should be committed to version control and is shared across all team members. Team settings act as defaults that individual developers can override in their personal git config.

# .stackit.yaml - Team-wide defaults
trunk: main

# Additional trunk branches (e.g., release branches)
trunks:
  - develop
  - staging

# Branch naming pattern for the team
branch:
  pattern: "{username}/{date}/{message}"

# PR submission settings
submit:
  footer: true

# Default merge method
merge:
  method: squash

# CI validation
ci:
  command: "make test"
  timeout: 600

# Undo history
undo:
  depth: 10

# Worktree settings
worktree:
  basePath: ""
  autoClean: true

# Split settings
split:
  hunkSelector: tui

# Concurrency (0 = auto based on CPU count)
maxConcurrency: 0

# PR navigation display options
navigation:
  when: always        # always, never, or multiple (only show when stack has multiple PRs)
  marker: "πŸ‘ˆ"        # Symbol marking the current PR (max 10 chars)
  location: body      # body, comment, or none (where navigation appears)
  showMerged: false   # Show previously merged branches for historical context

# Worktree hooks
hooks:
  post-worktree-create:
    - npm install
    - cp .env.example .env
Worktree Hooks

The hooks.post-worktree-create option allows you to run commands automatically after Stackit creates a managed worktree, including stackit create -w, stackit worktree create, stackit worktree attach, and stackit worktree run. This is useful for:

  • Installing dependencies (npm install, bundle install, etc.)
  • Setting up environment files
  • Running initialization scripts

Security: The first time a hook is encountered, Stackit prompts for approval (defaulting to "No" for safety). Approvals are stored locally in git config and persist across sessions. Hooks have a 60-second timeout.

Performance Optimizations

Stackit uses parallel validation for rebase operations, providing 2-3x speedup for wide stacks with many sibling branches. Branches at the same depth are validated concurrently, with automatic early exit on first conflict to save resources.

For tuning remote operations (SSH connection reuse) and diagnosing a slow command with the built-in tracer, see docs/performance.md.


Troubleshooting

"Branch not tracked by stackit"

If you see this error, the branch wasn't created with stackit create. You can manually track it:

stackit track
Merge conflicts during restack

When stackit restack encounters conflicts (use --continue-on-conflict to skip conflicted stacks and keep going):

  1. Resolve the conflicts in your editor
  2. Stage the resolved files: git add .
  3. Continue the restack: stackit continue

Or abort and try a different approach: stackit abort

Recovering from a failed operation

Stackit automatically saves state before operations. To undo:

stackit undo

This restores branches and metadata to the state before the last command.

Stack is out of sync with remote

If your local stack diverged from remote (e.g., after force-pushes by collaborators):

stackit sync

This pulls the latest trunk, cleans up merged branches, and restacks.

PR base branch is wrong on GitHub

If a PR's base branch is pointing to the wrong parent:

stackit submit --stack

This updates all PRs in the stack with correct base branches.

"Cannot modify frozen/locked branch"

Frozen branches are protected from modification. To make changes:

stackit unfreeze <branch>  # For locally frozen branches
stackit unlock <branch>    # For shared locked branches
Need more help?

Run the doctor command to diagnose common issues:

stackit doctor

Monorepo Apps

This repository includes multiple first-class applications:

  • apps/cli - main stackit CLI
  • apps/server - HTTP API server (serves /api/v1 and compatibility /api) plus embedded web assets
  • apps/st-tui - TUI storyboard binary
  • apps/web - Next.js dashboard for visualizing stacked branches in a swimlane layout with real-time updates (see docs/web.md for architecture)
Full-Stack Local Development

Recommended: run both server and web UI with one command via overmind + Procfile:

# one-time setup
mise install
mise run web:install

# tmux is still required by overmind (install via system package manager)
mise run dev

This starts:

  • server: go run ./apps/server --port 8080
  • web: pnpm --filter @stackit/web dev

Open the web UI at http://localhost:3000.

Stop all dev processes:

mise run dev:stop

dev:stop first asks overmind to exit cleanly, then force-cleans any Stackit backend process from this repo still listening on :8080.

Manual two-terminal flow is also supported:

# Terminal 1: Server
go run ./apps/server --port 8080

# Terminal 2: Web (requires pnpm)
pnpm install
pnpm web:dev

For production-style serving via Go, build and sync web assets into apps/server/static:

mise run server:run:embedded

Optional environment variables:

STACKIT_SERVER_PORT=9090 mise run server:run:embedded
STACKIT_SERVER_CWD=/path/to/repo mise run server:run:embedded

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

Requirements
  • Git 2.25+
  • GitHub CLI (gh) for PR operations
  • Go 1.26+ (if building from source)
  • tmux (required by overmind)

License

MIT

Directories ΒΆ

Path Synopsis
apps
cli command
Package main is the entry point for the stackit CLI tool.
Package main is the entry point for the stackit CLI tool.
server command
internal
actions
Package actions provides high-level business logic for CLI commands.
Package actions provides high-level business logic for CLI commands.
actions/abort
Package abort implements the stackit abort command for canceling in-progress operations.
Package abort implements the stackit abort command for canceling in-progress operations.
actions/absorb
Package absorb provides functionality for absorbing staged changes into commits downstack.
Package absorb provides functionality for absorbing staged changes into commits downstack.
actions/create
Package create provides functionality for creating new stacked branches.
Package create provides functionality for creating new stacked branches.
actions/delete
Package delete provides functionality for deleting branches and their metadata.
Package delete provides functionality for deleting branches and their metadata.
actions/describe
Package describe implements the stackit describe command for managing stack descriptions.
Package describe implements the stackit describe command for managing stack descriptions.
actions/doctor
Package doctor provides diagnostic functionality for checking stackit environment and repository health.
Package doctor provides diagnostic functionality for checking stackit environment and repository health.
actions/flatten
Package flatten provides functionality for flattening stacked branches closer to trunk.
Package flatten provides functionality for flattening stacked branches closer to trunk.
actions/fold
Package fold provides functionality for folding stacked branches.
Package fold provides functionality for folding stacked branches.
actions/foreach
Package foreach provides functionality for executing a command on each branch in a stack.
Package foreach provides functionality for executing a command on each branch in a stack.
actions/handler
Package handler provides common handler types and base implementations for action handlers throughout the stackit codebase.
Package handler provides common handler types and base implementations for action handlers throughout the stackit codebase.
actions/hooks
Package hooks orchestrates hook discovery, approval, and execution at the actions layer.
Package hooks orchestrates hook discovery, approval, and execution at the actions layer.
actions/init
Package init provides functionality for initializing Stackit in a Git repository.
Package init provides functionality for initializing Stackit in a Git repository.
actions/integrations
Package integrations provides functionality for integrating Stackit with external tools and hooks.
Package integrations provides functionality for integrating Stackit with external tools and hooks.
actions/lock
Package lock provides functionality for locking and unlocking branches in a stack.
Package lock provides functionality for locking and unlocking branches in a stack.
actions/merge
Package merge provides functionality for merging stacked pull requests.
Package merge provides functionality for merging stacked pull requests.
actions/move
Package move provides functionality for moving branches to different parents in the stack.
Package move provides functionality for moving branches to different parents in the stack.
actions/navigation
Package navigation implements the stackit top/bottom commands for navigating stacked branches.
Package navigation implements the stackit top/bottom commands for navigating stacked branches.
actions/pluck
Package pluck provides functionality for extracting a single branch from a stack.
Package pluck provides functionality for extracting a single branch from a stack.
actions/scope
Package scope implements the stackit scope command for managing branch scopes.
Package scope implements the stackit scope command for managing branch scopes.
actions/split
Package split provides functionality for splitting stacked branches.
Package split provides functionality for splitting stacked branches.
actions/stacklog
Package stacklog gathers the current stack's commit band for the stack-aware `stackit log` view: the commits on the branch you're standing on and its ancestors down to (but not including) trunk, ordered top-down from HEAD.
Package stacklog gathers the current stack's commit band for the stack-aware `stackit log` view: the commits on the branch you're standing on and its ancestors down to (but not including) trunk, ordered top-down from HEAD.
actions/submit
Package submit provides functionality for submitting stacked branches as pull requests.
Package submit provides functionality for submitting stacked branches as pull requests.
actions/sync
Package sync provides functionality for synchronizing stacked branches with remote repositories.
Package sync provides functionality for synchronizing stacked branches with remote repositories.
actions/track
Package track implements the stackit track command for tracking branches in a stack.
Package track implements the stackit track command for tracking branches in a stack.
actions/trunklog
Package trunklog gathers stack-aware trunk commit history for the `stackit log` command.
Package trunklog gathers stack-aware trunk commit history for the `stackit log` command.
actions/undo
Package undo provides functionality for undoing stackit operations using snapshots.
Package undo provides functionality for undoing stackit operations using snapshots.
actions/untrack
Package untrack implements the stackit untrack command for stopping branch tracking.
Package untrack implements the stackit untrack command for stopping branch tracking.
actions/validation
Package validation provides reusable precondition validators for actions.
Package validation provides reusable precondition validators for actions.
actions/worktree
Package worktree provides actions for managing stackit-managed worktrees.
Package worktree provides actions for managing stackit-managed worktrees.
api
Package api provides the HTTP server for the stackit-web application.
Package api provides the HTTP server for the stackit-web application.
api/auth
Package auth implements GitHub OAuth + session cookies + an allowlist gate so stackit-server can be safely exposed on the public web.
Package auth implements GitHub OAuth + session cookies + an allowlist gate so stackit-server can be safely exposed on the public web.
api/githubwebhook
Package githubwebhook contains the pure, transport-free pieces of the GitHub webhook receiver: verifying a delivery's HMAC signature and extracting the repository coordinates from a push payload.
Package githubwebhook contains the pure, transport-free pieces of the GitHub webhook receiver: verifying a delivery's HMAC signature and extracting the repository coordinates from a push payload.
api/provision
Package provision builds registry entries from repo coordinates, resolving the per-repo engine and GitHub client through the app bootstrap layer.
Package provision builds registry entries from repo coordinates, resolving the per-repo engine and GitHub client through the app bootstrap layer.
api/registry
Package registry holds the set of repositories served by the stackit server, keyed by a stable repoID.
Package registry holds the set of repositories served by the stackit server, keyed by a stable repoID.
api/reposync
Package reposync keeps server-managed repo checkouts in step with their remotes.
Package reposync keeps server-managed repo checkouts in step with their remotes.
api/reqid
Package reqid holds the request-ID context plumbing shared between the middleware that mints the ID (internal/api) and the handlers that want to include it in audit log lines (internal/api/handlers).
Package reqid holds the request-ID context plumbing shared between the middleware that mints the ID (internal/api) and the handlers that want to include it in audit log lines (internal/api/handlers).
api/store
Package store is the API server's PostgreSQL-backed repo configuration store.
Package store is the API server's PostgreSQL-backed repo configuration store.
api/store/testpostgres
Package testpostgres provisions a Postgres backend for store tests.
Package testpostgres provisions a Postgres backend for store tests.
api/watcher
Package watcher provides file system monitoring for git ref changes.
Package watcher provides file system monitoring for git ref changes.
app
Package app provides the execution context for stackit commands.
Package app provides the execution context for stackit commands.
cli
Package cli provides command-line interface definitions using Cobra, including all subcommands and their flag definitions.
Package cli provides command-line interface definitions using Cobra, including all subcommands and their flag definitions.
cli/branch
Package branch provides CLI commands for managing branches in a stack.
Package branch provides CLI commands for managing branches in a stack.
cli/common
Package common provides shared helper functions for CLI commands.
Package common provides shared helper functions for CLI commands.
cli/dashboard
Package dashboard provides the interactive shippable work TUI.
Package dashboard provides the interactive shippable work TUI.
cli/integrations
Package integrations provides commands for managing various integrations
Package integrations provides commands for managing various integrations
cli/navigation
Package navigation provides CLI commands for navigating branches in a stack.
Package navigation provides CLI commands for navigating branches in a stack.
cli/shell
Package shell provides shell integration for stackit.
Package shell provides shell integration for stackit.
cli/stack
Package stack provides CLI commands for operating on entire stacks.
Package stack provides CLI commands for operating on entire stacks.
cli/stack/merge
Package merge provides CLI commands for merging stacked PRs.
Package merge provides CLI commands for merging stacked PRs.
cli/worktree
Package worktree provides CLI commands for managing stackit-managed worktrees.
Package worktree provides CLI commands for managing stackit-managed worktrees.
config
Package config provides repository configuration management, including reading and writing stackit configuration files.
Package config provides repository configuration management, including reading and writing stackit configuration files.
contracts/http
Package httpcontract defines JSON-serializable API response types for stackit HTTP surfaces.
Package httpcontract defines JSON-serializable API response types for stackit HTTP surfaces.
demo
Package demo provides a simulated engine for testing TUI interactions without requiring a real git repository.
Package demo provides a simulated engine for testing TUI interactions without requiring a real git repository.
engine
Package engine provides the core branch state management interface and implementation.
Package engine provides the core branch state management interface and implementation.
errors
Package errors provides sentinel errors and custom error types for the stackit application.
Package errors provides sentinel errors and custom error types for the stackit application.
git
Package git provides low-level Git operations, including repository access, branch operations, commit information, PR operations, and metadata management.
Package git provides low-level Git operations, including repository access, branch operations, commit information, PR operations, and metadata management.
github
Package github provides a client for interacting with the GitHub API.
Package github provides a client for interacting with the GitHub API.
handlers
Package handlers provides shared handler interfaces for CLI output.
Package handlers provides shared handler interfaces for CLI output.
hooks
Package hooks executes user-defined hook commands with a timeout and optional environment-variable injection.
Package hooks executes user-defined hook commands with a timeout and optional environment-variable injection.
output
Package output provides user-facing output and file logging.
Package output provides user-facing output and file logging.
pr
Package pr provides PR title and body generation for GitHub pull requests.
Package pr provides PR title and body generation for GitHub pull requests.
shippable
Package shippable provides analysis and management of shippable work.
Package shippable provides analysis and management of shippable work.
timeutil
Package timeutil provides utilities for time formatting and manipulation.
Package timeutil provides utilities for time formatting and manipulation.
tui
Package tui provides terminal UI utilities.
Package tui provides terminal UI utilities.
tui/components/flatten
Package flatten provides a TUI component for displaying flatten progress.
Package flatten provides a TUI component for displaying flatten progress.
tui/components/foreach
Package foreach provides a TUI component for displaying the progress of foreach command execution.
Package foreach provides a TUI component for displaying the progress of foreach command execution.
tui/components/merge
Package merge provides a TUI component for displaying merge progress.
Package merge provides a TUI component for displaying merge progress.
tui/components/split
Package split provides a unified TUI component for split operations.
Package split provides a unified TUI component for split operations.
tui/components/submit
Package submit provides a TUI component for displaying the progress of a stack submission.
Package submit provides a TUI component for displaying the progress of a stack submission.
tui/components/sync
Package sync provides a TUI component for displaying sync progress.
Package sync provides a TUI component for displaying sync progress.
tui/components/tree
Package tree provides a renderer for branch tree visualizations.
Package tree provides a renderer for branch tree visualizations.
tui/config
Package config provides TUI components for configuration management.
Package config provides TUI components for configuration management.
tui/core
Package core provides foundational TUI types that can be imported without cycles.
Package core provides foundational TUI types that can be imported without cycles.
tui/keys
Package keys provides shared keybindings for TUI views.
Package keys provides shared keybindings for TUI views.
tui/style
Package style provides styling and coloring for the TUI.
Package style provides styling and coloring for the TUI.
utils
Package utils provides shared utility functions for the stackit codebase.
Package utils provides shared utility functions for the stackit codebase.
worktree
Package worktree provides utilities for executing operations in Git worktrees.
Package worktree provides utilities for executing operations in Git worktrees.
Package testhelpers provides testing utilities for the Stackit CLI, including a scene system, Git repository helpers, and custom assertions.
Package testhelpers provides testing utilities for the Stackit CLI, including a scene system, Git repository helpers, and custom assertions.
golden
Package golden provides shared helpers for golden-file (snapshot) tests.
Package golden provides shared helpers for golden-file (snapshot) tests.
inprocess
Package inprocess provides in-process CLI execution for tests.
Package inprocess provides in-process CLI execution for tests.
scenario
Package scenario provides a high-level test scenario that combines a Scene, an Engine, and a runtime Context to provide a terse API for integration tests.
Package scenario provides a high-level test scenario that combines a Scene, an Engine, and a runtime Context to provide a terse API for integration tests.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL