A TUI for managing git worktrees with issue tracker integration (Linear + Jira) and AI-assisted conflict resolution. See all your worktrees at a glance with issue status, dirty file counts, and quick actions.
| OS | Status |
|---|---|
| macOS (arm64, amd64) | Fully supported |
| Linux (arm64, amd64) | Fully supported |
| Windows (WSL) | Supported via WSL |
| Windows (native) | Not supported (syscall.Exec used for git proxy) |
Requires: Go 1.21+, git
# From source
go install github.com/magucc/gw-interactive@latest
# Or clone and build
git clone https://github.com/magucc/gw-interactive && cd gw
go install .The binary lands in $GOPATH/bin/gw (usually ~/go/bin/gw).
# Run interactive setup in any git repo
gw initThe onboarding flow asks for:
- Issue tracker — Linear, Jira (Cloud), or none
- Credentials — Linear API key or Jira email + API token
- AI tool — detects installed coding assistants (Claude, GitHub Copilot, Gemini)
This creates two files:
| File | Contents | Committed? |
|---|---|---|
~/.config/gw/config.json |
Credentials + AI tool | No (global, private) |
.pm.json (repo root) |
Tracker type, prefix, agent | Yes (per-project) |
A per-project config that declares which issue tracker and AI agent a repo uses. Safe to commit — no secrets.
{
"$schema": "https://raw.githubusercontent.com/magucc/gw-interactive/main/schema/pm.schema.json",
"tracker": "jira",
"prefix": "PROJ",
"base_url": "https://company.atlassian.net",
"agent": "claude"
}| Field | Required | Description |
|---|---|---|
tracker |
yes | "linear" or "jira" |
prefix |
no | Issue key prefix (e.g. KJU, PROJ). Filters branch name matching |
base_url |
jira only | Jira Cloud instance URL |
agent |
no | AI coding agent: "claude", "copilot", or "gemini" |
Env var overrides: LINEAR_API_KEY, JIRA_EMAIL, JIRA_API_TOKEN, JIRA_BASE_URL
# Launch TUI
gw
# Initialize project config
gw init
# Or use as git worktree alias
gw list
gw add ../feature-branch -b feature-branch
gw remove ../old-branchAny arguments (except init) are proxied directly to git worktree.
Press ? inside the app to see the full shortcut overlay.
| Key | Action |
|---|---|
j / k / ↑ / ↓ |
Move cursor up/down |
enter |
Inspect worktree (changes, issue info, tracker diagnostics) |
| Key | Action |
|---|---|
c |
Create worktree — issue picker (Linear/Jira) or manual ID input |
d |
Delete worktree — confirm with y/n (disabled for main worktree) |
s |
Sync — fetch + rebase onto default branch (with AI conflict resolution) |
f |
Fetch latest from remote for selected worktree |
t |
Terminal — open a shell in the worktree directory (exit to return) |
a |
Agent — open your configured AI tool in the worktree directory |
P |
Prune stale worktree entries |
o |
Open issue in browser (Linear or Jira) |
r |
Refresh all data |
When s (sync) hits merge conflicts, gw shows the conflicted files and offers:
| Key | Action |
|---|---|
a |
Resolve with AI — launches your configured AI tool to fix conflicts |
s |
Skip this commit (git rebase --skip) |
x |
Abort the rebase (git rebase --abort) |
Supported AI tools: Claude Code, GitHub Copilot, Gemini CLI
| Key | Action |
|---|---|
? |
Toggle shortcut help overlay |
q / esc |
Quit app or go back from sub-view |
ctrl+c |
Force quit |
- Worktree discovery — Parses
git worktree list --porcelainto find all worktrees - Issue matching — Extracts issue IDs from branch names using pattern
[A-Z]+-\d+(e.g.kju-100-add-auth→KJU-100). When aprefixis set in.pm.json, only that prefix is matched. - Issue fetching — Linear: batched GraphQL query (1 API call). Jira: JQL search via REST API v3.
- Status detection — Runs
git status --porcelainper worktree to count dirty files - Conflict resolution — On rebase conflicts, suspends the TUI, launches the AI tool in the worktree directory, then continues the rebase
- Press
c - If a tracker is configured, browse your assigned issues with a filterable picker
- Select an issue (or type an ID manually if no tracker)
- A new worktree is created as a sibling directory with the lowercased issue ID as branch name
your-repo/ ← main worktree
../kju-100/ ← new worktree
gw/
├── main.go # Entry point, git proxy, gw init, tracker wiring
├── schema/
│ └── pm.schema.json # JSON Schema for .pm.json
├── internal/
│ ├── config/
│ │ └── config.go # Global config, ProjectConfig (.pm.json), AI tool detection
│ ├── git/
│ │ └── git.go # Worktree ops, sync, conflict detection, rebase
│ ├── tracker/
│ │ └── tracker.go # IssueTracker interface, shared Issue types
│ ├── linear/
│ │ └── linear.go # Linear GraphQL client, batched issue fetching
│ ├── jira/
│ │ └── jira.go # Jira Cloud REST API v3 client, JQL search
│ └── tui/
│ ├── model.go # Bubble Tea model (Update/View/Init)
│ ├── onboarding.go # Setup flow: tracker + credentials + AI tool
│ ├── styles.go # Lipgloss styles
│ └── commands.go # Async tea.Cmd functions
- Bubble Tea — TUI framework
- Lip Gloss — Styling
- Bubbles — Text input, spinner components
