Skip to content

One worktree per branch. One tmux session per worktree.

kwt is a Git worktree manager with two surfaces. The dashboard is for you: see and manage the worktrees across all your projects from one keyboard-driven view. The CLI is for your coding agents: plain commands and stable JSON for creating worktrees and working inside their tmux sessions.

The kwt terminal dashboard listing worktrees, branch state, activity, and workspace status

The dashboard, for you

go install go.kenn.io/kwt/cmd/kwt@latest
kwt

Run kwt inside a repository and it registers the project, discovers its worktrees, and opens a full-screen dashboard. From one view you can:

  • Attach to a worktree's tmux session (enter), creating it when needed.
  • Create a branch and worktree (n), or search local and remote branches for one (b).
  • See per-branch Git state — dirty, ahead, behind — across every project.
  • Delete worktrees (d), kill live sessions (K), and switch the active project (P).

A plain directory can be a workspace too: run kwt there and enter opens a tmux session in place. The quickstart walks through the full key map.

The CLI, for your agents

Every dashboard operation is also a plain command, so coding agents and scripts can manage worktrees and their bound tmux sessions without a UI:

kwt add -b feature/new-ui              # isolated checkout + tmux workspace
kwt exec feature/new-ui -- make test   # run a command in the worktree
cd "$(kwt get feature/new-ui)"         # resolve a worktree path
kwt list --json                        # machine-readable worktree state
kwt remove -b feature/new-ui           # delete the worktree and its branch

kwt pr import checks a GitHub pull request out into a fresh worktree, and kwt status shows which branches are dirty, ahead, or behind — useful when several agents are working in parallel. Configurable layouts define the tmux panes each workspace starts with, from a single shell to a preset arrangement of agents.

Guardrails

Checkouts of existing or remote branches are created inert: kwt skips repository hooks, setup commands, and workspace launch until you review the files and explicitly open the workspace. Pull-request imports use a protected session boundary and preserve exact push routing. Multi-machine sync stays off until you configure it.