@akiojin/gwt 6.30.3 → 9.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cargo/config.toml +2 -0
- package/.claude-plugin/marketplace.json +18 -0
- package/.coderabbit.yaml +8 -0
- package/.codex/skills/gwt-fix-issue/scripts/inspect_issue.py +833 -0
- package/.dockerignore +63 -0
- package/.gitattributes +27 -0
- package/.husky/commit-msg +2 -0
- package/.husky/pre-commit +9 -0
- package/.husky/pre-push +12 -0
- package/.markdownlint.json +18 -0
- package/.markdownlintignore +2 -0
- package/Dockerfile +58 -0
- package/README.ja.md +161 -484
- package/README.md +164 -444
- package/cliff.toml +56 -0
- package/clippy.toml +2 -0
- package/cmake/ci-disable-native.cmake +16 -0
- package/codecov.yml +16 -0
- package/commitlint.config.cjs +107 -0
- package/deny.toml +35 -0
- package/docker-compose.yml +59 -0
- package/messages/errors.toml +52 -0
- package/package.json +12 -22
- package/rustfmt.toml +8 -0
- package/scripts/check-e2e-coverage-threshold.mjs +238 -0
- package/scripts/entrypoint.sh +36 -25
- package/scripts/install-linux-deps.sh +46 -0
- package/scripts/postinstall.js +79 -227
- package/scripts/release_issue_refs.py +317 -0
- package/scripts/run-local-backend-tests-on-commit.sh +15 -0
- package/scripts/run-local-e2e-coverage-on-commit.sh +69 -0
- package/scripts/run-local-e2e-on-commit.sh +60 -0
- package/scripts/test-all.sh +13 -0
- package/scripts/test_release_issue_refs.py +257 -0
- package/scripts/validate-skill-frontmatter.sh +108 -0
- package/scripts/verify-ci-node-toolchain.sh +76 -0
- package/scripts/verify-husky-hooks.sh +6 -0
- package/scripts/voice-eval.sh +48 -0
- package/tests/voice_eval/README.md +53 -0
- package/tests/voice_eval/manifest.template.json +55 -0
- package/tests/voice_eval/samples/.gitkeep +1 -0
- package/tests/voice_eval/script-ja.txt +10 -0
- package/vendor/ratatui-core/src/backend/test.rs +1077 -0
- package/vendor/ratatui-core/src/backend.rs +405 -0
- package/vendor/ratatui-core/src/buffer/assert.rs +71 -0
- package/vendor/ratatui-core/src/buffer/buffer.rs +1388 -0
- package/vendor/ratatui-core/src/buffer/cell.rs +377 -0
- package/vendor/ratatui-core/src/buffer.rs +9 -0
- package/vendor/ratatui-core/src/layout/alignment.rs +89 -0
- package/vendor/ratatui-core/src/layout/constraint.rs +526 -0
- package/vendor/ratatui-core/src/layout/direction.rs +63 -0
- package/vendor/ratatui-core/src/layout/flex.rs +212 -0
- package/vendor/ratatui-core/src/layout/layout.rs +2838 -0
- package/vendor/ratatui-core/src/layout/margin.rs +79 -0
- package/vendor/ratatui-core/src/layout/offset.rs +66 -0
- package/vendor/ratatui-core/src/layout/position.rs +253 -0
- package/vendor/ratatui-core/src/layout/rect/iter.rs +356 -0
- package/vendor/ratatui-core/src/layout/rect/ops.rs +136 -0
- package/vendor/ratatui-core/src/layout/rect.rs +1114 -0
- package/vendor/ratatui-core/src/layout/size.rs +147 -0
- package/vendor/ratatui-core/src/layout.rs +333 -0
- package/vendor/ratatui-core/src/lib.rs +82 -0
- package/vendor/ratatui-core/src/style/anstyle.rs +348 -0
- package/vendor/ratatui-core/src/style/color.rs +788 -0
- package/vendor/ratatui-core/src/style/palette/material.rs +608 -0
- package/vendor/ratatui-core/src/style/palette/tailwind.rs +653 -0
- package/vendor/ratatui-core/src/style/palette.rs +6 -0
- package/vendor/ratatui-core/src/style/palette_conversion.rs +82 -0
- package/vendor/ratatui-core/src/style/stylize.rs +668 -0
- package/vendor/ratatui-core/src/style.rs +1069 -0
- package/vendor/ratatui-core/src/symbols/bar.rs +51 -0
- package/vendor/ratatui-core/src/symbols/block.rs +51 -0
- package/vendor/ratatui-core/src/symbols/border.rs +709 -0
- package/vendor/ratatui-core/src/symbols/braille.rs +21 -0
- package/vendor/ratatui-core/src/symbols/half_block.rs +3 -0
- package/vendor/ratatui-core/src/symbols/line.rs +259 -0
- package/vendor/ratatui-core/src/symbols/marker.rs +82 -0
- package/vendor/ratatui-core/src/symbols/merge.rs +748 -0
- package/vendor/ratatui-core/src/symbols/pixel.rs +30 -0
- package/vendor/ratatui-core/src/symbols/scrollbar.rs +46 -0
- package/vendor/ratatui-core/src/symbols/shade.rs +5 -0
- package/vendor/ratatui-core/src/symbols.rs +15 -0
- package/vendor/ratatui-core/src/terminal/frame.rs +192 -0
- package/vendor/ratatui-core/src/terminal/terminal.rs +926 -0
- package/vendor/ratatui-core/src/terminal/viewport.rs +58 -0
- package/vendor/ratatui-core/src/terminal.rs +40 -0
- package/vendor/ratatui-core/src/text/grapheme.rs +84 -0
- package/vendor/ratatui-core/src/text/line.rs +1678 -0
- package/vendor/ratatui-core/src/text/masked.rs +149 -0
- package/vendor/ratatui-core/src/text/span.rs +904 -0
- package/vendor/ratatui-core/src/text/text.rs +1434 -0
- package/vendor/ratatui-core/src/text.rs +64 -0
- package/vendor/ratatui-core/src/widgets/stateful_widget.rs +193 -0
- package/vendor/ratatui-core/src/widgets/widget.rs +174 -0
- package/vendor/ratatui-core/src/widgets.rs +9 -0
- package/bin/gwt.js +0 -131
- package/scripts/postinstall.test.js +0 -71
- package/scripts/release-download.js +0 -66
package/README.md
CHANGED
|
@@ -1,512 +1,232 @@
|
|
|
1
|
-
#
|
|
1
|
+
# gwt
|
|
2
2
|
|
|
3
3
|
[日本語](README.ja.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
gwt is a terminal-based (TUI) tool for managing Git worktrees and launching
|
|
6
|
+
coding agents (`Claude Code`, `Codex`, `Gemini`, `OpenCode`) on a project basis.
|
|
6
7
|
|
|
7
|
-
##
|
|
8
|
+
## Install
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
Download the binary for your platform from
|
|
11
|
+
[GitHub Releases](https://github.com/akiojin/gwt/releases) and place it in
|
|
12
|
+
your `PATH`.
|
|
10
13
|
|
|
11
|
-
|
|
14
|
+
### macOS
|
|
12
15
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
## Key Features
|
|
16
|
-
|
|
17
|
-
- **Modern TUI**: Built with Ratatui for a smooth, responsive terminal interface
|
|
18
|
-
- **Full-screen Layout**: Persistent header with repo context and boxed branch list
|
|
19
|
-
- **Branch Summary Panel**: Real-time branch details panel with commit history, change stats, branch metadata, plus a Tab-switchable session summary view
|
|
20
|
-
- **Smart Branch Creation**: Create feature, bugfix, hotfix, or release branches with guided prompts and automatic base branch selection
|
|
21
|
-
- **Advanced Worktree Management**: Complete lifecycle management including creation, cleanup of worktree-backed branches, and path optimization
|
|
22
|
-
- **Coding Agent Selection**: Choose between built-in agents (Claude Code / Codex CLI / Gemini CLI / OpenCode) or custom coding agents defined in `~/.gwt/tools.json`
|
|
23
|
-
- **Coding Agent Integration**: Launch the selected agent in the worktree (Claude Code includes permission handling and post-change flow)
|
|
24
|
-
- **GitHub PR Integration**: Automatic cleanup of merged pull request branches and worktrees
|
|
25
|
-
- **Change Management**: Built-in support for committing, stashing, or discarding changes after development sessions
|
|
26
|
-
- **tmux Multi-Agent Mode**: Run multiple coding agents in parallel using tmux panes (automatically enabled when running inside tmux)
|
|
27
|
-
- **Universal Package**: Install once, use across all your projects with consistent behavior
|
|
28
|
-
|
|
29
|
-
## Installation
|
|
30
|
-
|
|
31
|
-
GitHub Releases are the source of truth for prebuilt binaries. The npm/bunx wrapper automatically downloads the matching release asset on install.
|
|
32
|
-
|
|
33
|
-
### From GitHub Releases (Recommended)
|
|
34
|
-
|
|
35
|
-
Download pre-built binaries from the [Releases page](https://github.com/akiojin/gwt/releases). Each release includes binaries for all supported platforms:
|
|
36
|
-
|
|
37
|
-
- `gwt-linux-x86_64` - Linux x86_64
|
|
38
|
-
- `gwt-linux-aarch64` - Linux ARM64
|
|
39
|
-
- `gwt-macos-x86_64` - macOS Intel
|
|
40
|
-
- `gwt-macos-aarch64` - macOS Apple Silicon
|
|
41
|
-
- `gwt-windows-x86_64.exe` - Windows x86_64
|
|
16
|
+
Run the installer:
|
|
42
17
|
|
|
43
18
|
```bash
|
|
44
|
-
|
|
45
|
-
curl -L https://github.com/akiojin/gwt/releases/latest/download/gwt-linux-x86_64 -o gwt
|
|
46
|
-
chmod +x gwt
|
|
47
|
-
sudo mv gwt /usr/local/bin/
|
|
19
|
+
curl -fsSL https://raw.githubusercontent.com/akiojin/gwt/main/installers/macos/install.sh | bash
|
|
48
20
|
```
|
|
49
21
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
Install globally or run without installation:
|
|
22
|
+
Install a specific version:
|
|
53
23
|
|
|
54
24
|
```bash
|
|
55
|
-
|
|
56
|
-
npm install -g @akiojin/gwt
|
|
57
|
-
bun add -g @akiojin/gwt
|
|
58
|
-
|
|
59
|
-
# One-time execution
|
|
60
|
-
npx @akiojin/gwt
|
|
61
|
-
bunx @akiojin/gwt
|
|
25
|
+
curl -fsSL https://raw.githubusercontent.com/akiojin/gwt/main/installers/macos/install.sh | bash -s -- --version 6.30.3
|
|
62
26
|
```
|
|
63
27
|
|
|
64
|
-
###
|
|
65
|
-
|
|
66
|
-
Install the CLI with Cargo:
|
|
28
|
+
### Windows
|
|
67
29
|
|
|
68
|
-
|
|
69
|
-
# With cargo-binstall (faster, downloads prebuilt binary from GitHub Releases)
|
|
70
|
-
cargo binstall gwt-cli
|
|
71
|
-
|
|
72
|
-
# From GitHub (latest development version)
|
|
73
|
-
cargo install --git https://github.com/akiojin/gwt --package gwt-cli --bin gwt --locked
|
|
30
|
+
Download the binary from GitHub Releases and add it to your `PATH`.
|
|
74
31
|
|
|
75
|
-
|
|
76
|
-
cargo install --path crates/gwt-cli
|
|
32
|
+
### Linux
|
|
77
33
|
|
|
78
|
-
|
|
79
|
-
cargo run -p gwt-cli
|
|
80
|
-
```
|
|
34
|
+
Download the binary from GitHub Releases and add it to your `PATH`.
|
|
81
35
|
|
|
82
|
-
###
|
|
36
|
+
### Uninstall (macOS)
|
|
83
37
|
|
|
84
38
|
```bash
|
|
85
|
-
|
|
86
|
-
git clone https://github.com/akiojin/gwt.git
|
|
87
|
-
cd gwt
|
|
88
|
-
|
|
89
|
-
# Build release binary (default: gwt-cli)
|
|
90
|
-
cargo build --release
|
|
91
|
-
|
|
92
|
-
# Build all workspace crates (including web/wasm)
|
|
93
|
-
cargo build --workspace
|
|
94
|
-
|
|
95
|
-
# The binary is at target/release/gwt
|
|
96
|
-
./target/release/gwt
|
|
39
|
+
curl -fsSL https://raw.githubusercontent.com/akiojin/gwt/main/installers/macos/uninstall.sh | bash
|
|
97
40
|
```
|
|
98
41
|
|
|
99
|
-
##
|
|
42
|
+
## Usage
|
|
100
43
|
|
|
101
|
-
|
|
44
|
+
Launch the TUI in the current directory:
|
|
102
45
|
|
|
103
46
|
```bash
|
|
104
|
-
# If installed globally or in PATH
|
|
105
47
|
gwt
|
|
106
|
-
|
|
107
|
-
# Or use bunx for one-time execution
|
|
108
|
-
bunx @akiojin/gwt
|
|
109
48
|
```
|
|
110
49
|
|
|
111
|
-
|
|
50
|
+
### Terminal requirements
|
|
51
|
+
|
|
52
|
+
- 256-color terminal recommended (most modern terminals support this)
|
|
53
|
+
- Minimum 80x24 terminal size
|
|
54
|
+
|
|
55
|
+
## First-time usage
|
|
56
|
+
|
|
57
|
+
1. Run `gwt` in a Git repository.
|
|
58
|
+
2. Browse branches and worktrees in the sidebar.
|
|
59
|
+
3. Use branch actions to:
|
|
60
|
+
- create/list/clean worktrees
|
|
61
|
+
- launch an agent
|
|
62
|
+
4. Open **Settings** to set up AI profile settings if you use Agent or
|
|
63
|
+
summary features.
|
|
64
|
+
|
|
65
|
+
## Key bindings
|
|
66
|
+
|
|
67
|
+
Most TUI key bindings use the `Ctrl+G` prefix. Dragging terminal text copies
|
|
68
|
+
the selection immediately.
|
|
69
|
+
|
|
70
|
+
| Key binding | Action |
|
|
71
|
+
|---|---|
|
|
72
|
+
| `Ctrl+G`, `c` | New shell tab |
|
|
73
|
+
| `Ctrl+G`, `n` | New agent tab |
|
|
74
|
+
| `Ctrl+G`, `1`-`9` | Switch to tab N |
|
|
75
|
+
| `Ctrl+G`, `]` | Next tab |
|
|
76
|
+
| `Ctrl+G`, `[` | Previous tab |
|
|
77
|
+
| `Ctrl+G`, `x` | Close current tab |
|
|
78
|
+
| `Ctrl+G`, `w` | Worktree list |
|
|
79
|
+
| `Ctrl+G`, `s` | Settings |
|
|
80
|
+
| `Ctrl+G`, `?` | Help / key binding reference |
|
|
81
|
+
| `Ctrl+G`, `q` | Quit |
|
|
82
|
+
|
|
83
|
+
Drag across terminal text to copy it. When the host terminal forwards the
|
|
84
|
+
shortcut, the platform copy shortcut also works:
|
|
85
|
+
|
|
86
|
+
- macOS: `Cmd+C`
|
|
87
|
+
- Linux / Windows: `Ctrl+Shift+C`
|
|
88
|
+
|
|
89
|
+
To investigate Japanese IME candidate selection in a shell or agent terminal,
|
|
90
|
+
launch gwt with `GWT_INPUT_TRACE_PATH=/tmp/gwt-input-trace.jsonl`. The JSONL
|
|
91
|
+
trace records raw `crossterm` key events, keybind decisions, and forwarded PTY
|
|
92
|
+
bytes without adding a runtime input-mode toggle.
|
|
93
|
+
|
|
94
|
+
To compare that routed trace with raw terminal input, run
|
|
95
|
+
`cargo run -p gwt-tui --example keytest -- --mode raw` in the same terminal.
|
|
96
|
+
The probe logs every raw `crossterm::event::Event` to
|
|
97
|
+
`/tmp/gwt-crossterm-events.jsonl` by default, or to the positional output path
|
|
98
|
+
you pass.
|
|
99
|
+
|
|
100
|
+
To isolate redraw-related IME regressions, the same probe also supports
|
|
101
|
+
`--mode redraw` and `--mode ratatui`. `redraw` repaints the same committed-text
|
|
102
|
+
surface on a periodic tick using direct `crossterm` commands, while `ratatui`
|
|
103
|
+
uses the same surface through ratatui on the same tick. Use `--tick-ms <N>` to
|
|
104
|
+
change the redraw interval when comparing modes.
|
|
105
|
+
|
|
106
|
+
gwt also requests minimal kitty keyboard enhancements during terminal startup
|
|
107
|
+
(`DISAMBIGUATE_ESCAPE_CODES | REPORT_ALL_KEYS_AS_ESCAPE_CODES |
|
|
108
|
+
REPORT_ALTERNATE_KEYS | REPORT_EVENT_TYPES`) and pops them on shutdown.
|
|
109
|
+
Unsupported terminals fail open and continue with existing behavior. Repeated
|
|
110
|
+
key events from compatible terminals now stay on the same input path as normal
|
|
111
|
+
key presses, which matters when IME candidate navigation advances to another
|
|
112
|
+
page. While the terminal pane owns focus, idle 100 ms ticks now avoid repainting
|
|
113
|
+
the TUI unless an overlay or other explicit periodic UI surface still needs
|
|
114
|
+
animation, which reduces IME candidate interruption from background redraws.
|
|
115
|
+
PTY output still requests an immediate redraw, so committed text and normal
|
|
116
|
+
shell output are not delayed until the next keypress.
|
|
117
|
+
|
|
118
|
+
## Environment and requirements
|
|
119
|
+
|
|
120
|
+
### Required
|
|
121
|
+
|
|
122
|
+
- `git` command available in `PATH`.
|
|
123
|
+
|
|
124
|
+
### Optional (depends on use)
|
|
125
|
+
|
|
126
|
+
- AI provider keys in environment variables (or saved in gwt profile settings):
|
|
127
|
+
- `ANTHROPIC_API_KEY` or `ANTHROPIC_AUTH_TOKEN`
|
|
128
|
+
- `OPENAI_API_KEY`
|
|
129
|
+
- `GOOGLE_API_KEY` or `GEMINI_API_KEY`
|
|
130
|
+
- `bunx` or `npx` for local agent launch fallback.
|
|
131
|
+
- Python 3.9+ on `PATH` when gwt needs to bootstrap or repair the shared project-index runtime
|
|
132
|
+
(for example during startup or repository initialization).
|
|
133
|
+
gwt bootstraps `~/.gwt/runtime/chroma-venv` automatically, then reuses that managed runtime.
|
|
134
|
+
On Windows, make sure either `python` or `py -3` works in Command Prompt or PowerShell.
|
|
135
|
+
- Vector index data (SPECs / Issues / source files) is stored under `~/.gwt/index/<repo-hash>/`.
|
|
136
|
+
Issues and SPECs are repo-scoped and shared across worktrees; source files are worktree-scoped.
|
|
137
|
+
The TUI runs a per-Worktree filesystem watcher and refreshes the Issue index asynchronously
|
|
138
|
+
(15-minute TTL) at startup. The first search after a fresh install downloads the
|
|
139
|
+
`intfloat/multilingual-e5-base` embedding model (~440 MB) into `~/.cache/huggingface/`.
|
|
140
|
+
SPECs live as GitHub Issues labeled `gwt-spec` and are cached locally at
|
|
141
|
+
`~/.gwt/cache/issues/<repo-hash>/`; use `gwt issue spec <n>` to read and `gwt issue spec <n> --edit <section> -f <file>` to write.
|
|
142
|
+
|
|
143
|
+
### Hook file ownership
|
|
144
|
+
|
|
145
|
+
- gwt regenerates `.claude/settings.local.json` as a local machine file and manages its Git exclusion.
|
|
146
|
+
- gwt creates or merges `.codex/hooks.json`, but does not add it to `.gitignore` or `info/exclude`.
|
|
147
|
+
- Whether `.codex/hooks.json` is version-controlled is a repository decision. When the file already exists, gwt replaces only gwt-managed hook entries and keeps user hooks plus unrelated top-level settings.
|
|
148
|
+
|
|
149
|
+
### GitHub Token (PAT) requirements
|
|
150
|
+
|
|
151
|
+
gwt uses `gh` CLI for GitHub operations. Authenticate with:
|
|
112
152
|
|
|
113
153
|
```bash
|
|
114
|
-
|
|
115
|
-
gwt --help
|
|
116
|
-
|
|
117
|
-
# Check version
|
|
118
|
-
gwt --version
|
|
119
|
-
|
|
120
|
-
# List worktrees
|
|
121
|
-
gwt list
|
|
122
|
-
|
|
123
|
-
# Add worktree for existing branch
|
|
124
|
-
gwt add feature/my-feature
|
|
125
|
-
|
|
126
|
-
# Create new branch with worktree
|
|
127
|
-
gwt add -n feature/new-feature --base develop
|
|
128
|
-
|
|
129
|
-
# Remove worktree
|
|
130
|
-
gwt remove feature/old-feature
|
|
131
|
-
|
|
132
|
-
# Cleanup orphaned worktrees
|
|
133
|
-
gwt clean
|
|
134
|
-
|
|
135
|
-
# Show logs
|
|
136
|
-
gwt logs --limit 100
|
|
137
|
-
|
|
138
|
-
# Follow logs
|
|
139
|
-
gwt logs --follow
|
|
154
|
+
gh auth login
|
|
140
155
|
```
|
|
141
156
|
|
|
142
|
-
|
|
157
|
+
#### Fine-grained PAT recommended permissions
|
|
143
158
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
### Branch List Screen
|
|
152
|
-
|
|
153
|
-
| Key | Action |
|
|
154
|
-
|-----|--------|
|
|
155
|
-
| `Enter` | Focus existing agent pane / Show hidden pane / Open wizard |
|
|
156
|
-
| `d` | Delete agent pane (with confirmation) |
|
|
157
|
-
| `v` | Open GitView (git status details for selected branch) |
|
|
158
|
-
| `Space` | Select/Deselect branch |
|
|
159
|
-
| `Up/Down` | Navigate branches |
|
|
160
|
-
| `PageUp/PageDown` | Page navigation |
|
|
161
|
-
| `Home/End` | Jump to first/last branch |
|
|
162
|
-
| `f` | Enter filter mode |
|
|
163
|
-
| `r` | Refresh branch list |
|
|
164
|
-
| `c` | Cleanup merged branches |
|
|
165
|
-
| `l` | View logs |
|
|
166
|
-
| `?` | Help |
|
|
167
|
-
| `q` / `Ctrl+C` | Quit |
|
|
168
|
-
|
|
169
|
-
Mouse:
|
|
170
|
-
- Double-click a branch row to trigger the Enter action (focus pane / open wizard).
|
|
171
|
-
|
|
172
|
-
### Filter Mode
|
|
173
|
-
|
|
174
|
-
| Key | Action |
|
|
175
|
-
|-----|--------|
|
|
176
|
-
| `Esc` | Exit filter mode |
|
|
177
|
-
| Type | Filter branches by name |
|
|
178
|
-
|
|
179
|
-
### GitView Screen
|
|
180
|
-
|
|
181
|
-
The GitView screen shows detailed git status for a branch, including files and recent commits.
|
|
182
|
-
|
|
183
|
-
| Key | Action |
|
|
184
|
-
|-----|--------|
|
|
185
|
-
| `Up/Down` | Navigate files and commits |
|
|
186
|
-
| `Space` | Expand/collapse file diff or commit details |
|
|
187
|
-
| `Enter` | Open PR link in browser (when focused on header) |
|
|
188
|
-
| `v` / `Esc` | Return to branch list |
|
|
189
|
-
|
|
190
|
-
Mouse:
|
|
191
|
-
- Click on the PR link in the header to open it in your browser.
|
|
192
|
-
|
|
193
|
-
## Status Icons Legend
|
|
194
|
-
|
|
195
|
-
| Icon | Color | Meaning |
|
|
196
|
-
|------|-------|---------|
|
|
197
|
-
| `o` | Green | Safe - No uncommitted or unpushed changes |
|
|
198
|
-
| `!` | Red | Uncommitted - Has local changes |
|
|
199
|
-
| `^` | Yellow | Unpushed - Has commits not pushed to remote |
|
|
200
|
-
| `*` | Yellow | Unmerged - Has unmerged changes |
|
|
201
|
-
|
|
202
|
-
## Agent Status Display
|
|
203
|
-
|
|
204
|
-
In the branch list, running agents are displayed on the right side:
|
|
205
|
-
|
|
206
|
-
| Format | Meaning |
|
|
207
|
-
|--------|---------|
|
|
208
|
-
| `[/] Claude 01:23:45` | Running agent (spinner, name, uptime) |
|
|
209
|
-
| `[BG] Claude 01:23:45` | Hidden (background) agent (grayed out) |
|
|
210
|
-
|
|
211
|
-
## Coding Agents
|
|
212
|
-
|
|
213
|
-
gwt detects agents available on PATH and lists them in the launcher.
|
|
214
|
-
|
|
215
|
-
Supported agents (built-in):
|
|
216
|
-
|
|
217
|
-
- Claude Code (`claude`)
|
|
218
|
-
- Codex CLI (`codex`)
|
|
219
|
-
- Gemini CLI (`gemini`)
|
|
220
|
-
- OpenCode (`opencode`)
|
|
221
|
-
|
|
222
|
-
### Custom coding agents
|
|
223
|
-
|
|
224
|
-
Custom agents are defined in `~/.gwt/tools.json` and will appear in the launcher.
|
|
225
|
-
|
|
226
|
-
Minimal example:
|
|
227
|
-
|
|
228
|
-
```json
|
|
229
|
-
{
|
|
230
|
-
"version": "1.0.0",
|
|
231
|
-
"customCodingAgents": [
|
|
232
|
-
{
|
|
233
|
-
"id": "aider",
|
|
234
|
-
"displayName": "Aider",
|
|
235
|
-
"type": "command",
|
|
236
|
-
"command": "aider",
|
|
237
|
-
"defaultArgs": ["--no-git"],
|
|
238
|
-
"modeArgs": {
|
|
239
|
-
"normal": [],
|
|
240
|
-
"continue": ["--resume"],
|
|
241
|
-
"resume": ["--resume"]
|
|
242
|
-
},
|
|
243
|
-
"permissionSkipArgs": ["--yes"],
|
|
244
|
-
"env": {
|
|
245
|
-
"OPENAI_API_KEY": "sk-..."
|
|
246
|
-
},
|
|
247
|
-
"models": [
|
|
248
|
-
{ "id": "gpt-4o", "label": "GPT-4o" },
|
|
249
|
-
{ "id": "claude-3-opus", "label": "Claude 3 Opus" }
|
|
250
|
-
],
|
|
251
|
-
"versionCommand": "aider --version"
|
|
252
|
-
}
|
|
253
|
-
]
|
|
254
|
-
}
|
|
255
|
-
```
|
|
256
|
-
|
|
257
|
-
Notes:
|
|
258
|
-
|
|
259
|
-
- `type` supports `path`, `bunx`, or `command`.
|
|
260
|
-
- `modeArgs` defines args per execution mode (Normal/Continue/Resume).
|
|
261
|
-
- `env` is optional per-agent environment variables.
|
|
262
|
-
- `models` is optional. If defined, model selection step will be shown for this agent.
|
|
263
|
-
- `versionCommand` is optional. If defined, version detection will use this command instead of skipping version selection.
|
|
264
|
-
|
|
265
|
-
## Bare Repository Workflow
|
|
266
|
-
|
|
267
|
-
gwt supports a bare repository workflow for efficient worktree management. This approach keeps the bare repository (`.git` data) separate from worktrees, providing cleaner project organization.
|
|
268
|
-
|
|
269
|
-
### Directory Structure
|
|
270
|
-
|
|
271
|
-
```text
|
|
272
|
-
/project/
|
|
273
|
-
├── repo.git/ # Bare repository
|
|
274
|
-
├── main/ # Worktree (main branch)
|
|
275
|
-
├── feature-x/ # Worktree (feature/x branch)
|
|
276
|
-
└── .gwt/ # gwt configuration
|
|
277
|
-
└── project.json
|
|
278
|
-
```
|
|
279
|
-
|
|
280
|
-
### Setting Up a Bare Repository
|
|
281
|
-
|
|
282
|
-
```bash
|
|
283
|
-
# Clone as bare repository
|
|
284
|
-
git clone --bare https://github.com/user/repo.git repo.git
|
|
159
|
+
| Permission | Access | Used for |
|
|
160
|
+
|---|---|---|
|
|
161
|
+
| **Contents** | Read and Write | Repository browsing, branch operations, releases |
|
|
162
|
+
| **Pull requests** | Read and Write | PR create / edit / merge / review |
|
|
163
|
+
| **Issues** | Read and Write | Issue create / edit / comment |
|
|
164
|
+
| **Metadata** | Read | Implicitly granted |
|
|
285
165
|
|
|
286
|
-
|
|
287
|
-
cd repo.git
|
|
288
|
-
git worktree add ../main main
|
|
289
|
-
git worktree add ../feature-x feature/x
|
|
290
|
-
```
|
|
291
|
-
|
|
292
|
-
### Using gwt with Bare Repositories
|
|
293
|
-
|
|
294
|
-
When you run gwt in a bare repository or its worktrees:
|
|
295
|
-
|
|
296
|
-
| Location | Header Display |
|
|
297
|
-
|----------|----------------|
|
|
298
|
-
| Normal repository | `Working Directory: /path [branch]` |
|
|
299
|
-
| Bare repository | `Working Directory: /path/repo.git [bare]` |
|
|
300
|
-
| Worktree (normal) | `Working Directory: /path [branch]` |
|
|
301
|
-
| Worktree (bare-based) | `Working Directory: /path [branch] (repo.git)` |
|
|
302
|
-
|
|
303
|
-
### Migration from `.worktrees/` Method
|
|
304
|
-
|
|
305
|
-
If you have an existing repository using the `.worktrees/` directory method, gwt will detect this and offer migration to the bare repository method:
|
|
166
|
+
#### Read-only minimum
|
|
306
167
|
|
|
307
|
-
|
|
308
|
-
2. **Create bare repo**: Creates `{repo-name}.git`
|
|
309
|
-
3. **Migrate worktrees**: Moves existing worktrees to new structure
|
|
310
|
-
4. **Cleanup**: Removes old `.worktrees/` directory
|
|
311
|
-
5. **Configure**: Creates `.gwt/project.json`
|
|
168
|
+
For browse-only usage (no PR creation or branch management):
|
|
312
169
|
|
|
313
|
-
|
|
170
|
+
| Permission | Access |
|
|
171
|
+
|---|---|
|
|
172
|
+
| **Contents** | Read |
|
|
173
|
+
| **Pull requests** | Read |
|
|
174
|
+
| **Issues** | Read |
|
|
175
|
+
| **Metadata** | Read |
|
|
314
176
|
|
|
315
|
-
|
|
177
|
+
### Optional advanced toggles
|
|
316
178
|
|
|
317
|
-
|
|
179
|
+
- `GWT_AGENT_AUTO_INSTALL_DEPS` (`true` / `false`)
|
|
180
|
+
- `GWT_DOCKER_FORCE_HOST` (`true` / `false`)
|
|
318
181
|
|
|
319
|
-
###
|
|
182
|
+
### Logging and profiling
|
|
320
183
|
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
- **`main`**: Production-ready code. Protected branch for releases only.
|
|
324
|
-
- **`develop`**: Integration branch for features. All feature branches merge here.
|
|
325
|
-
- **`feature/*`**: New features and enhancements. **Must be based on and target `develop`**.
|
|
326
|
-
- **`hotfix/*`**: Critical production fixes. Based on and target `main`.
|
|
327
|
-
- **`release/*`**: Release preparation branches.
|
|
328
|
-
|
|
329
|
-
**Important**: When creating feature branches, always use `develop` as the base branch:
|
|
330
|
-
|
|
331
|
-
```bash
|
|
332
|
-
# Correct: Create feature branch from develop
|
|
333
|
-
git checkout develop
|
|
334
|
-
git pull origin develop
|
|
335
|
-
git checkout -b feature/my-feature
|
|
336
|
-
|
|
337
|
-
# Or use this tool which handles it automatically
|
|
338
|
-
gwt
|
|
339
|
-
# → Select "Create new branch" → "feature" → automatically uses develop as base
|
|
340
|
-
```
|
|
341
|
-
|
|
342
|
-
### Branch Creation Workflow
|
|
343
|
-
|
|
344
|
-
> **Important**: This workflow is intended for human developers. Autonomous agents must never create or delete branches unless a human gives explicit, task-specific instructions.
|
|
345
|
-
|
|
346
|
-
1. Select "Create new branch" from the main menu
|
|
347
|
-
2. Choose branch type (feature, bugfix, hotfix, release)
|
|
348
|
-
3. Enter branch name with automatic prefix application
|
|
349
|
-
4. Select base branch from available options (feature → develop, hotfix → main)
|
|
350
|
-
5. Confirm worktree creation path
|
|
351
|
-
6. Automatic worktree setup and selected tool launch
|
|
352
|
-
|
|
353
|
-
### Worktree Management
|
|
354
|
-
|
|
355
|
-
- **Open Existing**: Launch the selected tool in existing worktrees
|
|
356
|
-
- **Remove Worktree**: Clean removal with optional branch deletion
|
|
357
|
-
- **Batch Operations**: Handle multiple worktrees efficiently
|
|
358
|
-
|
|
359
|
-
### GitHub Integration
|
|
360
|
-
|
|
361
|
-
- **Branch Cleanup**: Automatically detect and remove merged pull request branches or branches that no longer differ from their base
|
|
362
|
-
- **Authentication Check**: Verify GitHub CLI setup before operations
|
|
363
|
-
- **Remote Sync**: Fetch latest changes before cleanup operations
|
|
364
|
-
|
|
365
|
-
## System Requirements
|
|
366
|
-
|
|
367
|
-
- **Rust**: Stable toolchain (for building from source)
|
|
368
|
-
- **Git**: Latest version with worktree support
|
|
369
|
-
- **Coding Agent**: At least one built-in agent or a custom coding agent should be available
|
|
370
|
-
- **GitHub CLI**: Required for PR cleanup features (optional)
|
|
371
|
-
- **bun/npm**: Required for bunx/npx execution method
|
|
372
|
-
|
|
373
|
-
## Project Structure
|
|
374
|
-
|
|
375
|
-
```text
|
|
376
|
-
@akiojin/gwt/
|
|
377
|
-
├── Cargo.toml # Workspace configuration
|
|
378
|
-
├── crates/
|
|
379
|
-
│ ├── gwt-cli/ # CLI entry point and TUI (Ratatui)
|
|
380
|
-
│ ├── gwt-core/ # Core library (worktree management)
|
|
381
|
-
│ ├── gwt-web/ # Web server (Axum)
|
|
382
|
-
│ └── gwt-frontend/ # Web frontend (Leptos CSR)
|
|
383
|
-
├── package.json # npm distribution wrapper
|
|
384
|
-
├── bin/gwt.js # Binary wrapper script
|
|
385
|
-
├── scripts/postinstall.js # Binary download script
|
|
386
|
-
├── specs/ # Feature specifications
|
|
387
|
-
└── docs/ # Documentation
|
|
388
|
-
```
|
|
184
|
+
Normal logs are stored per project as JSON Lines under `~/.gwt/logs/<repo-hash>/gwt.log.YYYY-MM-DD`. Performance profiling can be enabled in **Settings > Profiling**.
|
|
185
|
+
See [#1758](https://github.com/akiojin/gwt/issues/1758) for the logging specification.
|
|
389
186
|
|
|
390
187
|
## Development
|
|
391
188
|
|
|
392
|
-
###
|
|
189
|
+
### Build
|
|
393
190
|
|
|
394
191
|
```bash
|
|
395
|
-
|
|
396
|
-
git clone https://github.com/akiojin/gwt.git
|
|
397
|
-
cd gwt
|
|
398
|
-
|
|
399
|
-
# Build the project
|
|
400
|
-
cargo build
|
|
401
|
-
|
|
402
|
-
# Run tests
|
|
403
|
-
cargo test
|
|
404
|
-
|
|
405
|
-
# Run with debug output
|
|
406
|
-
cargo run
|
|
192
|
+
cargo build -p gwt-tui
|
|
407
193
|
```
|
|
408
194
|
|
|
409
|
-
###
|
|
195
|
+
### Run (development)
|
|
410
196
|
|
|
411
197
|
```bash
|
|
412
|
-
|
|
413
|
-
cargo build
|
|
414
|
-
|
|
415
|
-
# Release build
|
|
416
|
-
cargo build --release
|
|
417
|
-
|
|
418
|
-
# Run tests
|
|
419
|
-
cargo test
|
|
420
|
-
|
|
421
|
-
# Run clippy lints
|
|
422
|
-
cargo clippy --all-targets --all-features -- -D warnings
|
|
423
|
-
|
|
424
|
-
# Format code
|
|
425
|
-
cargo fmt
|
|
426
|
-
|
|
427
|
-
# Run the CLI locally
|
|
428
|
-
cargo run
|
|
198
|
+
cargo run -p gwt-tui
|
|
429
199
|
```
|
|
430
200
|
|
|
431
|
-
###
|
|
432
|
-
|
|
433
|
-
1. **Fork and Clone**: Fork the repository and clone your fork
|
|
434
|
-
2. **Create Branch**: Use the tool itself to create a feature branch
|
|
435
|
-
3. **Development**: Make changes with Rust
|
|
436
|
-
4. **Testing**: Test CLI functionality with `cargo run`
|
|
437
|
-
5. **Quality Checks**: Run `cargo clippy` and `cargo fmt --check`
|
|
438
|
-
6. **Pull Request**: Submit a PR with clear description
|
|
439
|
-
|
|
440
|
-
### Code Structure
|
|
441
|
-
|
|
442
|
-
- **Entry Point**: `crates/gwt-cli/src/main.rs` - Main application logic
|
|
443
|
-
- **Core Modules**: Git operations, worktree management in `gwt-core`
|
|
444
|
-
- **TUI Components**: Ratatui-based interface in `gwt-cli/src/tui/`
|
|
445
|
-
- **Type Safety**: Comprehensive Rust type definitions
|
|
446
|
-
- **Error Handling**: Robust error management with `thiserror`
|
|
447
|
-
|
|
448
|
-
## Release Process
|
|
449
|
-
|
|
450
|
-
End users can install the latest published package (via npm or the GitHub Releases tab). Maintainers should follow the release flow requirements in `specs/SPEC-77b1bc70/spec.md`.
|
|
451
|
-
|
|
452
|
-
## Troubleshooting
|
|
453
|
-
|
|
454
|
-
### Common Issues
|
|
455
|
-
|
|
456
|
-
**Permission Errors**: Ensure proper directory permissions
|
|
457
|
-
**Git Worktree Conflicts**: Use the cleanup feature to remove stale worktrees
|
|
458
|
-
**GitHub Authentication**: Run `gh auth login` before using PR cleanup features
|
|
459
|
-
**Binary Not Found**: Ensure the gwt binary is in your PATH
|
|
460
|
-
**Unicode Character Corruption in Docker + tmux**: If Unicode characters (like the Claude Code logo) appear as underscores in Docker containers with tmux, start tmux with UTF-8 mode:
|
|
201
|
+
### Test
|
|
461
202
|
|
|
462
203
|
```bash
|
|
463
|
-
|
|
204
|
+
cargo test -p gwt-core -p gwt-tui
|
|
464
205
|
```
|
|
465
206
|
|
|
466
|
-
|
|
207
|
+
### Lint
|
|
467
208
|
|
|
468
|
-
```
|
|
469
|
-
|
|
209
|
+
```bash
|
|
210
|
+
cargo clippy --all-targets --all-features -- -D warnings
|
|
470
211
|
```
|
|
471
212
|
|
|
472
|
-
|
|
213
|
+
### Format
|
|
473
214
|
|
|
474
215
|
```bash
|
|
475
|
-
|
|
476
|
-
sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen
|
|
477
|
-
locale-gen
|
|
478
|
-
export LANG=en_US.UTF-8
|
|
479
|
-
export LC_ALL=en_US.UTF-8
|
|
216
|
+
cargo fmt
|
|
480
217
|
```
|
|
481
218
|
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
For verbose output, set the environment variable:
|
|
219
|
+
## Project structure
|
|
485
220
|
|
|
486
|
-
```
|
|
487
|
-
|
|
221
|
+
```text
|
|
222
|
+
├── Cargo.toml # Workspace configuration
|
|
223
|
+
├── crates/
|
|
224
|
+
│ ├── gwt-core/ # Core library (Git operations, PTY management, config)
|
|
225
|
+
│ ├── gwt-github/ # GitHub Issue SOT for SPEC management (SPEC-12)
|
|
226
|
+
│ └── gwt-tui/ # ratatui TUI frontend + CLI dispatch (`gwt issue spec ...`)
|
|
227
|
+
└── package.json # Development scripts
|
|
488
228
|
```
|
|
489
229
|
|
|
490
230
|
## License
|
|
491
231
|
|
|
492
|
-
MIT
|
|
493
|
-
|
|
494
|
-
## Contributing
|
|
495
|
-
|
|
496
|
-
We welcome contributions! Please read our contributing guidelines:
|
|
497
|
-
|
|
498
|
-
1. **Issues**: Report bugs or request features via GitHub Issues
|
|
499
|
-
2. **Pull Requests**: Follow the development workflow above
|
|
500
|
-
3. **Code Style**: Maintain Rust best practices and existing patterns
|
|
501
|
-
4. **Documentation**: Update README and code comments for significant changes
|
|
502
|
-
|
|
503
|
-
### Contributors
|
|
504
|
-
|
|
505
|
-
- AI Novel Project Team
|
|
506
|
-
- Community contributors welcome
|
|
507
|
-
|
|
508
|
-
## Support
|
|
509
|
-
|
|
510
|
-
- **Documentation**: This README and inline code documentation
|
|
511
|
-
- **Issues**: GitHub Issues for bug reports and feature requests
|
|
512
|
-
- **Discussions**: GitHub Discussions for questions and community support
|
|
232
|
+
MIT
|