cw

command module
v0.0.0-...-3358164 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2026 License: MIT Imports: 7 Imported by: 0

README

cw — Copilot Worktree Launcher

A TUI launcher that manages git worktrees and starts GitHub Copilot CLI sessions in them. Run parallel Copilot sessions on different branches without cloning the repo multiple times.

Install

go install github.com/vhvb1989/cw@latest

Or build from source:

git clone https://github.com/vhvb1989/cw.git
cd cw
go install .

Usage

Run cw from any git repository:

$ cw

  ⚡ Copilot Worktree Launcher (azure-dev)

  ▸ azure-dev (main) ← current
    azure-dev-issue-789 (fix/issue-789)
    azure-dev-feat-api (feat/new-api)
    + New worktree
    ✕ Quit

  ↑↓/jk navigate • enter select • n new • r remove • q quit

Keys

Key Action
/ or j/k Navigate (scrolls with large lists)
Enter Select worktree → launches copilot in it
n Create new worktree (prompts for name + base branch)
r Remove selected worktree (with confirmation)
q / Esc Quit

Why?

When working on multiple issues/PRs in the same repo, you need isolated workspaces. git worktree gives you that without full clones, and cw makes it seamless:

  1. Run cw → pick or create a worktree
  2. Copilot CLI launches in that directory
  3. Work on your issue, push, iterate
  4. Exit Copilot → run cw again for the next task

Each worktree gets its own branch, files, and Copilot session — fully isolated.

How It Works

  • Lists all git worktrees for the current repo
  • Lets you create new ones (../<repo-name>-<feature> with a new branch)
  • Launches copilot in the selected worktree directory
  • When copilot exits, cw exits too

License

MIT

Documentation

Overview

cw (copilot worktree) is a launcher that manages git worktrees and starts GitHub Copilot CLI sessions in them. It provides an interactive TUI for selecting, creating, and removing worktrees.

Jump to

Keyboard shortcuts

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