git-paw 0.4.0

Parallel AI Worktrees โ€” orchestrate multiple AI coding CLI sessions across git worktrees
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
# git-paw

**Parallel AI Worktrees** โ€” orchestrate multiple AI coding CLI sessions across git worktrees from a single terminal using tmux.

[![CI](https://github.com/bearicorn/git-paw/actions/workflows/ci.yml/badge.svg)](https://github.com/bearicorn/git-paw/actions/workflows/ci.yml)
[![Crates.io](https://img.shields.io/crates/v/git-paw.svg)](https://crates.io/crates/git-paw)
[![Downloads](https://img.shields.io/crates/d/git-paw.svg)](https://crates.io/crates/git-paw)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
[![MSRV: stable](https://img.shields.io/badge/MSRV-stable-brightgreen.svg)](rust-toolchain.toml)

## Demo

```
$ git paw

  ๐Ÿพ git-paw โ€” Parallel AI Worktrees

  ? Select mode:
  > Same CLI for all branches
    Different CLI per branch

  ? Select branches (space to toggle, enter to confirm):
  > [x] feat/auth
    [x] feat/api
    [ ] fix/typo
    [ ] main

  ? Select AI CLI:
  > claude
    codex
    gemini

  โœ” Creating worktrees...
    ../myproject-feat-auth/
    ../myproject-feat-api/

  โœ” Launching tmux session: paw-myproject
    Pane 1: feat/auth โ†’ claude
    Pane 2: feat/api โ†’ claude

  Attaching to tmux session...
```

## What It Does

git-paw lets you run multiple AI coding assistants in parallel, each in its own git worktree and tmux pane. Pick your branches, pick your AI CLI(s), and git-paw handles the rest โ€” creating worktrees, launching a tmux session, and wiring everything together. Stop and resume sessions at will; your worktrees and uncommitted work are preserved.

## Features

- **Parallel AI sessions** โ€” run Claude, Codex, Gemini, or any AI CLI across multiple branches simultaneously
- **Git worktree isolation** โ€” each branch gets its own working directory, no stashing or switching needed
- **Smart session management** โ€” reattach to active sessions, auto-recover after crashes or reboots
- **Interactive or scripted** โ€” fuzzy branch picker and CLI selector, or pass `--cli` and `--branches` flags
- **Per-branch CLI assignment** โ€” use Claude on one branch and Gemini on another in the same session
- **Presets** โ€” save branch + CLI combos in config for one-command launches
- **Custom CLI support** โ€” register any AI CLI with `git paw add-cli`
- **Session persistence** โ€” state saved to disk, survives tmux crashes and system reboots
- **Dry run** โ€” preview the session plan before executing with `--dry-run`
- **Mouse-friendly tmux** โ€” click to switch panes, drag borders to resize, scroll with mouse wheel
- **Spec-driven launch** โ€” auto-discover specs and launch sessions with `--from-specs`
- **AGENTS.md integration** โ€” auto-inject session context into worktree AGENTS.md files
- **Session logging** โ€” capture raw terminal output per pane for later review
- **Replay** โ€” view session logs with ANSI stripping or colored output via `less -R`
- **Project init** โ€” `git paw init` bootstraps `.git-paw/`, config, and gitignore
- **Standards-based** โ€” uses `AGENTS.md` following the Linux Foundation standard for AI agent instructions
- **Agent coordination** โ€” built-in HTTP broker lets agents share status, artifacts, and blocked requests
- **Dashboard TUI** โ€” live status table in pane 0 shows agent progress at a glance
- **Broker messages panel** โ€” optional dashboard section showing real-time agent communication (configurable via `[dashboard] show_message_log = true`)
- **Skill templates** โ€” coordination instructions auto-injected into each agent's AGENTS.md
- **Boot-prompt injection** โ€” standardized boot instructions automatically prepended to all agent prompts, ensuring reliable self-reporting (register, done, blocked, question operations) โ€” always enabled for broker sessions
- **Cursor-based messaging** โ€” lossless message polling with sequence tracking

> **Tip:** git-paw uses `AGENTS.md` as the standard agent instruction file. If your AI CLI reads a different file (e.g., `CLAUDE.md`, `GEMINI.md`), you can symlink it:
> ```bash
> ln -s AGENTS.md CLAUDE.md   # Claude Code reads CLAUDE.md
> ln -s AGENTS.md GEMINI.md   # Gemini reads GEMINI.md
> ```
> Add these symlinks to `.gitignore` so they stay local to each developer.

## Platform Support

| Platform | Status | Notes |
|----------|--------|-------|
| macOS (ARM) | Supported | Primary development platform |
| macOS (x86) | Supported | |
| Linux (x86_64) | Supported | |
| Linux (ARM64) | Supported | |
| Windows | WSL only | tmux is a Unix tool โ€” use Windows Subsystem for Linux |

> **Why no native Windows?** git-paw relies on tmux for terminal multiplexing, which is not available natively on Windows. WSL provides a full Linux environment where git-paw works perfectly.

## Quick Start: Same CLI

Use the same AI CLI across all branches:

```bash
# Interactive โ€” pick branches and CLI from prompts
git paw

# Non-interactive โ€” specify everything upfront
git paw start --cli claude --branches feat/auth,feat/api
```

This creates:
- A worktree for each branch (`../yourproject-feat-auth/`, `../yourproject-feat-api/`)
- A tmux session with one pane per branch, each running `claude`

## Quick Start: Per-Branch CLI

Use different AI CLIs on different branches:

```bash
# Interactive mode โ€” select "Different CLI per branch"
git paw
# โ†’ Pick branches: feat/auth, feat/api
# โ†’ Pick CLI for feat/auth: claude
# โ†’ Pick CLI for feat/api: gemini
```

Result: a tmux session where `feat/auth` runs Claude and `feat/api` runs Gemini, side by side.

## Quick Start: Supervisor Mode

Run an unattended supervisor agent that orchestrates the worker agents on your behalf:

```bash
git paw start --supervisor
```

The supervisor agent runs in its own pane, polls each worker agent for progress and artifacts via the broker, runs the configured test command between merges, and writes a session summary when work completes. Use this mode when you want to leave a multi-branch session running without continually steering each agent yourself.

## Installation

### From crates.io

```bash
cargo install git-paw
```

### Homebrew

```bash
brew install bearicorn/tap/git-paw
```

### Shell installer

```bash
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/bearicorn/git-paw/releases/latest/download/git-paw-installer.sh | sh
```

### Windows (WSL)

Install [WSL](https://learn.microsoft.com/en-us/windows/wsl/install), then use any of the Linux installation methods above inside your WSL environment:

```bash
# Inside WSL
sudo apt install tmux
cargo install git-paw
```

### Prerequisites

- [tmux]https://github.com/tmux/tmux โ€” terminal multiplexer
- [Git]https://git-scm.com/ โ€” with worktree support (2.5+)

### `git paw` vs `git-paw`

Once installed to your PATH, git-paw works as a git subcommand:

```bash
git paw start    # git finds `git-paw` on PATH automatically
```

You can also call the binary directly โ€” useful during development or if it's not on PATH:

```bash
git-paw start    # equivalent
cargo run -- start  # during development
```

All examples below use `git paw`, but `git-paw` works identically.

## Usage

### `init` โ€” Initialize project

```bash
git paw init
```

Creates `.git-paw/` directory with default config and sets up `.gitignore` for logs.

### `start` โ€” Launch or reattach

```bash
# Interactive launch
git paw start

# Specify CLI and branches
git paw start --cli claude --branches feat/auth,feat/api

# Launch from spec files (OpenSpec or Markdown)
git paw start --from-specs
git paw start --from-specs --cli claude

# Use a preset from config
git paw start --preset backend

# Preview without executing
git paw start --dry-run
```

Smart behavior:
- **Active session exists** โ†’ reattaches
- **Stopped/crashed session** โ†’ auto-recovers (reuses worktrees, relaunches CLIs)
- **No session** โ†’ full interactive launch

### `stop` โ€” Pause session

```bash
git paw stop
```

Kills the tmux session but preserves worktrees and state. Run `git paw start` later to pick up where you left off.

### `purge` โ€” Remove everything

```bash
# With confirmation prompt
git paw purge

# Skip confirmation
git paw purge --force
```

Removes the tmux session, all worktrees, and session state.

### `status` โ€” Check session state

```bash
git paw status
```

Shows session name, branches, CLIs, and status (active/stopped/no session).

### `list-clis` โ€” Show available CLIs

```bash
git paw list-clis
```

Lists auto-detected and custom AI CLIs with their source.

### `add-cli` โ€” Register a custom CLI

```bash
# With absolute path
git paw add-cli my-agent /usr/local/bin/my-agent

# With display name
git paw add-cli my-agent my-agent --display-name "My Agent"
```

### `remove-cli` โ€” Unregister a custom CLI

```bash
git paw remove-cli my-agent
```

Only custom CLIs can be removed โ€” auto-detected CLIs cannot.

### `replay` โ€” View session logs

```bash
# List available log sessions
git paw replay --list

# View a branch's log (ANSI stripped)
git paw replay feat/auth

# View with colors via less -R
git paw replay feat/auth --color

# Replay from a specific session
git paw replay feat/auth --session paw-myproject
```

Requires session logging to be enabled in config.

## Configuration

### Per-repo config (`.git-paw/config.toml`)

```toml
# Pre-select a CLI in the interactive picker
default_cli = "my-cli"
mouse = true

# Bypass picker entirely for --from-specs mode
default_spec_cli = "my-cli"

# Prefix for spec-derived branches (default: "spec/")
branch_prefix = "spec/"

# Spec scanning
[specs]
dir = "specs"
type = "openspec"  # or "markdown"

# Session logging
[logging]
enabled = true

# Dashboard configuration
[dashboard]
# Show broker messages panel for real-time agent communication
show_message_log = true

[presets.backend]
branches = ["feat/api", "fix/db"]
cli = "my-cli"
```

### Global config (`~/.config/git-paw/config.toml`)

```toml
default_cli = "my-cli"
mouse = true

[clis.my-agent]
command = "/usr/local/bin/my-agent"
display_name = "My Agent"

[clis.local-llm]
command = "ollama-code"
display_name = "Local LLM"

[presets.backend]
branches = ["feat/api", "fix/db"]
cli = "my-cli"
```

Per-repo config overrides global config for overlapping fields.

## Supported AI CLIs

| CLI | Binary | Link |
|-----|--------|------|
| Claude Code | `claude` | [claude.ai]https://claude.ai/download |
| OpenAI Codex | `codex` | [github.com/openai/codex]https://github.com/openai/codex |
| Google Gemini CLI | `gemini` | [github.com/google-gemini/gemini-cli]https://github.com/google-gemini/gemini-cli |
| Aider | `aider` | [aider.chat]https://aider.chat |
| Vibe | `vibe` | [docs.mistral.ai/capabilities/vibe]https://docs.mistral.ai/capabilities/vibe/ |
| Qwen | `qwen` | [github.com/QwenLM/qwen-agent]https://github.com/QwenLM/qwen-agent |
| Amp | `amp` | [amp.dev]https://amp.dev |

Don't see your CLI? Register it:

```bash
git paw add-cli my-cli /path/to/my-cli --display-name "My CLI"
```

## How It Works

```
git paw start
    โ”‚
    โ”œโ”€ 1. Validate git repo
    โ”œโ”€ 2. Load config (global + repo)
    โ”œโ”€ 3. Detect AI CLIs on PATH + custom
    โ”œโ”€ 4. Interactive selection (or use flags)
    โ”œโ”€ 5. Create git worktrees
    โ”‚      ../project-feat-auth/
    โ”‚      ../project-feat-api/
    โ”œโ”€ 6. Create tmux session (paw-project)
    โ”‚      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚      โ”‚ feat/auth        โ”‚ feat/api         โ”‚
    โ”‚      โ”‚ โ†’ claude         โ”‚ โ†’ claude         โ”‚
    โ”‚      โ”‚                  โ”‚                  โ”‚
    โ”‚      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
    โ”œโ”€ 7. Save session state to disk
    โ””โ”€ 8. Attach to tmux session

git paw stop   โ†’ kills tmux, keeps worktrees + state
git paw start  โ†’ auto-recovers from saved state
git paw purge  โ†’ removes everything
```

## Contributing

Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.

## Releases

Releases follow a single `chore: prepare vX.Y.Z release` commit on `main` that
bumps `Cargo.toml`, regenerates `CHANGELOG.md` via `git cliff`, and archives
completed OpenSpec changes (moving them under
`openspec/changes/archive/<date>-<change>/` and syncing their delta specs into
`openspec/specs/`). Pushing the `vX.Y.Z` tag triggers
[`cargo-dist`](https://github.com/axodotdev/cargo-dist) on GitHub Actions to
build cross-platform binaries and update the Homebrew tap.

After the tag, the maintainer publishes to crates.io **manually** (it is not
wired into cargo-dist):

```bash
cargo publish --dry-run   # verify
cargo publish             # upload vX.Y.Z
```

The full procedure (archive ordering, changelog regeneration, tag rules,
crates.io publish step, recovery from a botched prep commit) lives in
[`AGENTS.md` ยง Release & Distribution](AGENTS.md#release--distribution).

## License

[MIT](LICENSE) โ€” Copyright 2026 bearicorn