wt-manager 1.4.0
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/LICENSE +21 -0
- package/README.md +343 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +26 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/clean.d.ts +3 -0
- package/dist/commands/clean.d.ts.map +1 -0
- package/dist/commands/clean.js +339 -0
- package/dist/commands/clean.js.map +1 -0
- package/dist/commands/init.d.ts +3 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +12 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/list.d.ts +3 -0
- package/dist/commands/list.d.ts.map +1 -0
- package/dist/commands/list.js +202 -0
- package/dist/commands/list.js.map +1 -0
- package/dist/commands/new.d.ts +3 -0
- package/dist/commands/new.d.ts.map +1 -0
- package/dist/commands/new.js +147 -0
- package/dist/commands/new.js.map +1 -0
- package/dist/commands/remove.d.ts +3 -0
- package/dist/commands/remove.d.ts.map +1 -0
- package/dist/commands/remove.js +192 -0
- package/dist/commands/remove.js.map +1 -0
- package/dist/commands/wt.d.ts +3 -0
- package/dist/commands/wt.d.ts.map +1 -0
- package/dist/commands/wt.js +78 -0
- package/dist/commands/wt.js.map +1 -0
- package/dist/commands/wtclean.d.ts +3 -0
- package/dist/commands/wtclean.d.ts.map +1 -0
- package/dist/commands/wtclean.js +190 -0
- package/dist/commands/wtclean.js.map +1 -0
- package/dist/commands/wtlist.d.ts +3 -0
- package/dist/commands/wtlist.d.ts.map +1 -0
- package/dist/commands/wtlist.js +202 -0
- package/dist/commands/wtlist.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/utils/clipboard.d.ts +2 -0
- package/dist/utils/clipboard.d.ts.map +1 -0
- package/dist/utils/clipboard.js +23 -0
- package/dist/utils/clipboard.js.map +1 -0
- package/dist/utils/git.d.ts +45 -0
- package/dist/utils/git.d.ts.map +1 -0
- package/dist/utils/git.js +202 -0
- package/dist/utils/git.js.map +1 -0
- package/dist/utils/github.d.ts +21 -0
- package/dist/utils/github.d.ts.map +1 -0
- package/dist/utils/github.js +113 -0
- package/dist/utils/github.js.map +1 -0
- package/package.json +61 -0
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import chalk from 'chalk';
|
|
3
|
+
import ora from 'ora';
|
|
4
|
+
import { checkbox } from '@inquirer/prompts';
|
|
5
|
+
import { basename, dirname, join } from 'node:path';
|
|
6
|
+
import { readdirSync, statSync, existsSync, readFileSync } from 'node:fs';
|
|
7
|
+
import { execa } from 'execa';
|
|
8
|
+
import { listWorktrees, getRepoName, getRemoteUrl, hasUncommittedChanges, removeWorktree, deleteBranch, getCurrentWorktreePath, isPathInWorktree, } from '../utils/git.js';
|
|
9
|
+
import { getPRStatus, parseGitHubRepo, isGhCliAvailable } from '../utils/github.js';
|
|
10
|
+
function countContents(dirPath) {
|
|
11
|
+
let fileCount = 0;
|
|
12
|
+
let folderCount = 0;
|
|
13
|
+
try {
|
|
14
|
+
const entries = readdirSync(dirPath);
|
|
15
|
+
for (const entry of entries) {
|
|
16
|
+
const fullPath = join(dirPath, entry);
|
|
17
|
+
const stat = statSync(fullPath);
|
|
18
|
+
if (stat.isDirectory()) {
|
|
19
|
+
folderCount++;
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
fileCount++;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
}
|
|
28
|
+
return { fileCount, folderCount };
|
|
29
|
+
}
|
|
30
|
+
function findAbandonedFolders(worktreesDir) {
|
|
31
|
+
const abandoned = [];
|
|
32
|
+
if (!existsSync(worktreesDir)) {
|
|
33
|
+
return abandoned;
|
|
34
|
+
}
|
|
35
|
+
try {
|
|
36
|
+
const entries = readdirSync(worktreesDir);
|
|
37
|
+
for (const entry of entries) {
|
|
38
|
+
const fullPath = join(worktreesDir, entry);
|
|
39
|
+
const stat = statSync(fullPath);
|
|
40
|
+
if (stat.isDirectory()) {
|
|
41
|
+
const gitPath = join(fullPath, '.git');
|
|
42
|
+
if (!existsSync(gitPath)) {
|
|
43
|
+
const { fileCount, folderCount } = countContents(fullPath);
|
|
44
|
+
abandoned.push({
|
|
45
|
+
path: fullPath,
|
|
46
|
+
dirname: entry,
|
|
47
|
+
fileCount,
|
|
48
|
+
folderCount,
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
catch {
|
|
55
|
+
}
|
|
56
|
+
return abandoned;
|
|
57
|
+
}
|
|
58
|
+
function findOrphanWorktrees(worktreesDir) {
|
|
59
|
+
const orphans = [];
|
|
60
|
+
if (!existsSync(worktreesDir)) {
|
|
61
|
+
return orphans;
|
|
62
|
+
}
|
|
63
|
+
try {
|
|
64
|
+
const entries = readdirSync(worktreesDir);
|
|
65
|
+
for (const entry of entries) {
|
|
66
|
+
const fullPath = join(worktreesDir, entry);
|
|
67
|
+
const stat = statSync(fullPath);
|
|
68
|
+
if (stat.isDirectory()) {
|
|
69
|
+
const gitPath = join(fullPath, '.git');
|
|
70
|
+
if (existsSync(gitPath)) {
|
|
71
|
+
const gitStat = statSync(gitPath);
|
|
72
|
+
if (gitStat.isFile()) {
|
|
73
|
+
try {
|
|
74
|
+
const content = readFileSync(gitPath, 'utf-8');
|
|
75
|
+
const match = content.match(/^gitdir:\s*(.+)$/m);
|
|
76
|
+
if (match) {
|
|
77
|
+
const gitdir = match[1].trim();
|
|
78
|
+
if (!existsSync(gitdir)) {
|
|
79
|
+
orphans.push({
|
|
80
|
+
path: fullPath,
|
|
81
|
+
dirname: entry,
|
|
82
|
+
brokenGitdir: gitdir,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
catch {
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
catch {
|
|
95
|
+
}
|
|
96
|
+
return orphans;
|
|
97
|
+
}
|
|
98
|
+
export function cleanCommand() {
|
|
99
|
+
const cmd = new Command('clean');
|
|
100
|
+
cmd
|
|
101
|
+
.description('Remove merged/closed worktrees')
|
|
102
|
+
.option('-d, --dry-run', 'Show what would be removed without actually removing')
|
|
103
|
+
.option('-f, --force', 'Skip confirmation prompt')
|
|
104
|
+
.action(async (options) => {
|
|
105
|
+
const spinner = ora();
|
|
106
|
+
try {
|
|
107
|
+
const ghStatus = await isGhCliAvailable();
|
|
108
|
+
if (!ghStatus.available) {
|
|
109
|
+
console.error(chalk.red("Error: 'gh' CLI is required for wt clean"));
|
|
110
|
+
console.log('Install it with: brew install gh');
|
|
111
|
+
process.exit(1);
|
|
112
|
+
}
|
|
113
|
+
if (!ghStatus.authenticated) {
|
|
114
|
+
console.error(chalk.red('Error: gh CLI is not authenticated'));
|
|
115
|
+
console.log('Authenticate with: gh auth login');
|
|
116
|
+
process.exit(1);
|
|
117
|
+
}
|
|
118
|
+
spinner.start('Scanning worktrees...');
|
|
119
|
+
const repoName = await getRepoName();
|
|
120
|
+
const worktrees = await listWorktrees();
|
|
121
|
+
let githubInfo = null;
|
|
122
|
+
try {
|
|
123
|
+
const remoteUrl = await getRemoteUrl();
|
|
124
|
+
githubInfo = parseGitHubRepo(remoteUrl);
|
|
125
|
+
if (!githubInfo) {
|
|
126
|
+
console.error(chalk.red('Error: Not a GitHub repository'));
|
|
127
|
+
process.exit(1);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
catch {
|
|
131
|
+
console.error(chalk.red('Error: No remote repository configured'));
|
|
132
|
+
process.exit(1);
|
|
133
|
+
}
|
|
134
|
+
const mainWorktree = worktrees[0];
|
|
135
|
+
const worktreesDir = join(dirname(mainWorktree.path), `${repoName}-worktrees`);
|
|
136
|
+
const filteredWorktrees = worktrees.filter((wt) => wt.path.includes(worktreesDir));
|
|
137
|
+
if (filteredWorktrees.length === 0) {
|
|
138
|
+
spinner.stop();
|
|
139
|
+
console.log(chalk.yellow(`No worktrees found in ${worktreesDir}`));
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
spinner.text = 'Checking PR status...';
|
|
143
|
+
const currentPath = await getCurrentWorktreePath();
|
|
144
|
+
const cleanable = [];
|
|
145
|
+
for (const wt of filteredWorktrees) {
|
|
146
|
+
if (!wt.branch)
|
|
147
|
+
continue;
|
|
148
|
+
if (isPathInWorktree(currentPath, wt.path)) {
|
|
149
|
+
continue;
|
|
150
|
+
}
|
|
151
|
+
try {
|
|
152
|
+
const pr = await getPRStatus(githubInfo.owner, githubInfo.repo, wt.branch);
|
|
153
|
+
if (!pr)
|
|
154
|
+
continue;
|
|
155
|
+
const prState = pr.state;
|
|
156
|
+
if (prState === 'merged' || prState === 'closed') {
|
|
157
|
+
const uncommitted = await hasUncommittedChanges(wt.path);
|
|
158
|
+
cleanable.push({
|
|
159
|
+
path: wt.path,
|
|
160
|
+
dirname: basename(wt.path),
|
|
161
|
+
branch: wt.branch,
|
|
162
|
+
prState,
|
|
163
|
+
hasUncommittedChanges: uncommitted,
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
catch {
|
|
168
|
+
continue;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
const skipped = cleanable.filter((w) => w.hasUncommittedChanges);
|
|
172
|
+
const toRemove = cleanable.filter((w) => !w.hasUncommittedChanges);
|
|
173
|
+
spinner.text = 'Scanning for abandoned folders...';
|
|
174
|
+
const abandonedFolders = findAbandonedFolders(worktreesDir);
|
|
175
|
+
const orphanWorktrees = findOrphanWorktrees(worktreesDir);
|
|
176
|
+
spinner.stop();
|
|
177
|
+
if (cleanable.length === 0 && abandonedFolders.length === 0 && orphanWorktrees.length === 0) {
|
|
178
|
+
console.log(chalk.green('✓ No merged/closed worktrees, abandoned folders, or orphan worktrees found'));
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
const choices = [];
|
|
182
|
+
for (const wt of toRemove) {
|
|
183
|
+
const stateLabel = wt.prState === 'merged' ? chalk.green('MERGED') : chalk.yellow('CLOSED');
|
|
184
|
+
choices.push({
|
|
185
|
+
name: `${wt.dirname} (${stateLabel})`,
|
|
186
|
+
value: { type: 'worktree', data: wt },
|
|
187
|
+
checked: false,
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
for (const folder of abandonedFolders) {
|
|
191
|
+
choices.push({
|
|
192
|
+
name: `${folder.dirname} ${chalk.gray('(abandoned)')}`,
|
|
193
|
+
value: { type: 'abandoned', data: folder },
|
|
194
|
+
checked: false,
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
for (const orphan of orphanWorktrees) {
|
|
198
|
+
choices.push({
|
|
199
|
+
name: `${orphan.dirname} ${chalk.hex('#FFA500')('(orphan)')}`,
|
|
200
|
+
value: { type: 'orphan', data: orphan },
|
|
201
|
+
checked: false,
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
if (skipped.length > 0) {
|
|
205
|
+
console.log(chalk.yellow('⚠ Skipped (uncommitted changes):'));
|
|
206
|
+
for (const wt of skipped) {
|
|
207
|
+
console.log(` ${wt.dirname} (${wt.branch})`);
|
|
208
|
+
}
|
|
209
|
+
console.log();
|
|
210
|
+
}
|
|
211
|
+
if (choices.length === 0) {
|
|
212
|
+
console.log(chalk.yellow('No worktrees can be removed (all have uncommitted changes)'));
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
if (options.dryRun) {
|
|
216
|
+
console.log(chalk.bold('Would remove:'));
|
|
217
|
+
for (const choice of choices) {
|
|
218
|
+
console.log(` ${choice.name}`);
|
|
219
|
+
}
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
let selectedItems;
|
|
223
|
+
if (options.force) {
|
|
224
|
+
selectedItems = choices.map(c => c.value);
|
|
225
|
+
}
|
|
226
|
+
else {
|
|
227
|
+
selectedItems = await checkbox({
|
|
228
|
+
message: 'Select worktrees to remove:',
|
|
229
|
+
choices,
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
if (selectedItems.length === 0) {
|
|
233
|
+
console.log(chalk.yellow('No worktrees selected'));
|
|
234
|
+
return;
|
|
235
|
+
}
|
|
236
|
+
console.log();
|
|
237
|
+
let removed = 0;
|
|
238
|
+
let failed = 0;
|
|
239
|
+
let abandonedRemoved = 0;
|
|
240
|
+
let abandonedFailed = 0;
|
|
241
|
+
let orphanRemoved = 0;
|
|
242
|
+
let orphanFailed = 0;
|
|
243
|
+
const removeSpinner = ora();
|
|
244
|
+
for (const item of selectedItems) {
|
|
245
|
+
if (item.type === 'worktree') {
|
|
246
|
+
const wt = item.data;
|
|
247
|
+
removeSpinner.start(`Removing ${wt.dirname}...`);
|
|
248
|
+
try {
|
|
249
|
+
await removeWorktree(wt.path, true);
|
|
250
|
+
try {
|
|
251
|
+
await deleteBranch(wt.branch, true);
|
|
252
|
+
removeSpinner.succeed(`Removed: ${wt.dirname} (branch deleted)`);
|
|
253
|
+
}
|
|
254
|
+
catch {
|
|
255
|
+
removeSpinner.succeed(`Removed: ${wt.dirname}` + chalk.yellow(` (branch kept)`));
|
|
256
|
+
}
|
|
257
|
+
removed++;
|
|
258
|
+
}
|
|
259
|
+
catch (error) {
|
|
260
|
+
removeSpinner.fail(`Failed to remove: ${wt.dirname}`);
|
|
261
|
+
if (error instanceof Error) {
|
|
262
|
+
console.log(chalk.red(` ${error.message}`));
|
|
263
|
+
}
|
|
264
|
+
failed++;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
else if (item.type === 'abandoned') {
|
|
268
|
+
const folder = item.data;
|
|
269
|
+
removeSpinner.start(`Removing ${folder.dirname}...`);
|
|
270
|
+
try {
|
|
271
|
+
await execa('rm', ['-rf', folder.path]);
|
|
272
|
+
removeSpinner.succeed(`Removed: ${folder.dirname}`);
|
|
273
|
+
abandonedRemoved++;
|
|
274
|
+
}
|
|
275
|
+
catch (error) {
|
|
276
|
+
removeSpinner.fail(`Failed to remove: ${folder.dirname}`);
|
|
277
|
+
if (error instanceof Error) {
|
|
278
|
+
console.log(chalk.red(` ${error.message}`));
|
|
279
|
+
}
|
|
280
|
+
abandonedFailed++;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
else {
|
|
284
|
+
const orphan = item.data;
|
|
285
|
+
removeSpinner.start(`Removing ${orphan.dirname}...`);
|
|
286
|
+
try {
|
|
287
|
+
await execa('rm', ['-rf', orphan.path]);
|
|
288
|
+
removeSpinner.succeed(`Removed: ${orphan.dirname}`);
|
|
289
|
+
orphanRemoved++;
|
|
290
|
+
}
|
|
291
|
+
catch (error) {
|
|
292
|
+
removeSpinner.fail(`Failed to remove: ${orphan.dirname}`);
|
|
293
|
+
if (error instanceof Error) {
|
|
294
|
+
console.log(chalk.red(` ${error.message}`));
|
|
295
|
+
}
|
|
296
|
+
orphanFailed++;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
console.log('━'.repeat(60));
|
|
301
|
+
const foldersRemoved = abandonedRemoved + orphanRemoved;
|
|
302
|
+
const foldersFailed = abandonedFailed + orphanFailed;
|
|
303
|
+
const totalRemoved = removed + foldersRemoved;
|
|
304
|
+
if (removed > 0 && foldersRemoved > 0) {
|
|
305
|
+
console.log(chalk.green(`✓ Cleaned up ${removed} worktree(s) and ${foldersRemoved} folder(s)!`));
|
|
306
|
+
}
|
|
307
|
+
else if (removed > 0) {
|
|
308
|
+
console.log(chalk.green(`✓ Cleaned up ${removed} worktree(s)!`));
|
|
309
|
+
}
|
|
310
|
+
else if (foldersRemoved > 0) {
|
|
311
|
+
console.log(chalk.green(`✓ Cleaned up ${foldersRemoved} folder(s)!`));
|
|
312
|
+
}
|
|
313
|
+
if (failed > 0 && foldersFailed > 0) {
|
|
314
|
+
console.log(chalk.red(`✗ Failed to remove ${failed} worktree(s) and ${foldersFailed} folder(s)`));
|
|
315
|
+
}
|
|
316
|
+
else if (failed > 0) {
|
|
317
|
+
console.log(chalk.red(`✗ Failed to remove ${failed} worktree(s)`));
|
|
318
|
+
}
|
|
319
|
+
else if (foldersFailed > 0) {
|
|
320
|
+
console.log(chalk.red(`✗ Failed to remove ${foldersFailed} folder(s)`));
|
|
321
|
+
}
|
|
322
|
+
if (totalRemoved > 0) {
|
|
323
|
+
console.log("Run 'wt list' to see remaining worktrees.");
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
catch (error) {
|
|
327
|
+
spinner.stop();
|
|
328
|
+
if (error instanceof Error) {
|
|
329
|
+
console.error(chalk.red(`Error: ${error.message}`));
|
|
330
|
+
}
|
|
331
|
+
else {
|
|
332
|
+
console.error(chalk.red('An unknown error occurred'));
|
|
333
|
+
}
|
|
334
|
+
process.exit(1);
|
|
335
|
+
}
|
|
336
|
+
});
|
|
337
|
+
return cmd;
|
|
338
|
+
}
|
|
339
|
+
//# sourceMappingURL=clean.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clean.js","sourceRoot":"","sources":["../../src/commands/clean.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,GAAG,MAAM,KAAK,CAAA;AACrB,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AACnD,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACzE,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EACL,aAAa,EACb,WAAW,EACX,YAAY,EACZ,qBAAqB,EACrB,cAAc,EACd,YAAY,EACZ,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[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAMnC,wBAAgB,WAAW,YAM1B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
const SHELL_FUNCTION = `wtl() {
|
|
3
|
+
wt new "$@" && cd "$(pbpaste)" && webstorm . && claude
|
|
4
|
+
}`;
|
|
5
|
+
export function initCommand() {
|
|
6
|
+
return new Command('init')
|
|
7
|
+
.description('Output shell function for ~/.zshrc')
|
|
8
|
+
.action(() => {
|
|
9
|
+
console.log(SHELL_FUNCTION);
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=init.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEnC,MAAM,cAAc,GAAG;;EAErB,CAAA;AAEF,MAAM,UAAU,WAAW;IACzB,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC;SACvB,WAAW,CAAC,oCAAoC,CAAC;SACjD,MAAM,CAAC,GAAG,EAAE;QACX,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAA;IAC7B,CAAC,CAAC,CAAA;AACN,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/commands/list.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAkCnC,wBAAgB,WAAW,YA0P1B"}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import chalk from 'chalk';
|
|
3
|
+
import ora from 'ora';
|
|
4
|
+
import { basename, dirname, join } from 'node:path';
|
|
5
|
+
import { listWorktrees, getRepoName, getDefaultBranch, getCreationTime, hasUncommittedChanges, getAheadBehind, isPathInWorktree, getRemoteUrl, } from '../utils/git.js';
|
|
6
|
+
import { getPRStatus, parseGitHubRepo, isGhCliAvailable } from '../utils/github.js';
|
|
7
|
+
export function listCommand() {
|
|
8
|
+
const cmd = new Command('list');
|
|
9
|
+
cmd
|
|
10
|
+
.description('List all worktrees with status')
|
|
11
|
+
.option('--json', 'Output in JSON format')
|
|
12
|
+
.action(async (options) => {
|
|
13
|
+
const spinner = options.json ? null : ora('Gathering worktree information...').start();
|
|
14
|
+
try {
|
|
15
|
+
const repoName = await getRepoName();
|
|
16
|
+
const worktrees = await listWorktrees();
|
|
17
|
+
if (worktrees.length === 0) {
|
|
18
|
+
spinner?.stop();
|
|
19
|
+
console.log(chalk.yellow('No worktrees found'));
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
const mainWorktree = worktrees[0];
|
|
23
|
+
const worktreesDir = join(dirname(mainWorktree.path), `${repoName}-worktrees`);
|
|
24
|
+
const filteredWorktrees = worktrees.filter((wt) => wt.path.includes(worktreesDir));
|
|
25
|
+
if (filteredWorktrees.length === 0) {
|
|
26
|
+
spinner?.stop();
|
|
27
|
+
console.log(chalk.yellow(`No worktrees found in ${worktreesDir}`));
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
let githubInfo = null;
|
|
31
|
+
let githubError = null;
|
|
32
|
+
try {
|
|
33
|
+
const remoteUrl = await getRemoteUrl();
|
|
34
|
+
githubInfo = parseGitHubRepo(remoteUrl);
|
|
35
|
+
if (!githubInfo) {
|
|
36
|
+
githubError = 'not-github';
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
githubError = 'no-remote';
|
|
41
|
+
}
|
|
42
|
+
if (githubInfo) {
|
|
43
|
+
const ghStatus = await isGhCliAvailable();
|
|
44
|
+
if (!ghStatus.available || !ghStatus.authenticated) {
|
|
45
|
+
githubError = 'gh-unavailable';
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
const currentPath = process.cwd();
|
|
49
|
+
const defaultBranch = await getDefaultBranch();
|
|
50
|
+
if (spinner) {
|
|
51
|
+
spinner.text = 'Fetching status for worktrees...';
|
|
52
|
+
}
|
|
53
|
+
const worktreeInfos = await Promise.all(filteredWorktrees.map(async (wt) => {
|
|
54
|
+
const creationTime = await getCreationTime(wt.path);
|
|
55
|
+
const uncommitted = await hasUncommittedChanges(wt.path);
|
|
56
|
+
const isInWorktree = isPathInWorktree(currentPath, wt.path);
|
|
57
|
+
let ahead = 0;
|
|
58
|
+
let behind = 0;
|
|
59
|
+
if (wt.branch) {
|
|
60
|
+
const aheadBehind = await getAheadBehind(wt.branch, defaultBranch);
|
|
61
|
+
ahead = aheadBehind.ahead;
|
|
62
|
+
behind = aheadBehind.behind;
|
|
63
|
+
}
|
|
64
|
+
let prStatus;
|
|
65
|
+
if (githubInfo && wt.branch && !githubError) {
|
|
66
|
+
try {
|
|
67
|
+
const pr = await getPRStatus(githubInfo.owner, githubInfo.repo, wt.branch);
|
|
68
|
+
if (pr) {
|
|
69
|
+
let state;
|
|
70
|
+
if (pr.isDraft) {
|
|
71
|
+
state = 'draft';
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
state = pr.state;
|
|
75
|
+
}
|
|
76
|
+
prStatus = {
|
|
77
|
+
state,
|
|
78
|
+
url: pr.url,
|
|
79
|
+
checksStatus: pr.checksStatus,
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
prStatus = { state: 'no-pr' };
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
catch {
|
|
87
|
+
prStatus = { state: 'no-pr' };
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
prStatus = { state: 'no-pr' };
|
|
92
|
+
}
|
|
93
|
+
return {
|
|
94
|
+
path: wt.path,
|
|
95
|
+
dirname: basename(wt.path),
|
|
96
|
+
branch: wt.branch || 'no-branch',
|
|
97
|
+
creationTime,
|
|
98
|
+
isCurrentWorktree: isInWorktree,
|
|
99
|
+
hasUncommittedChanges: uncommitted,
|
|
100
|
+
ahead,
|
|
101
|
+
behind,
|
|
102
|
+
prStatus,
|
|
103
|
+
};
|
|
104
|
+
}));
|
|
105
|
+
spinner?.stop();
|
|
106
|
+
worktreeInfos.sort((a, b) => a.creationTime - b.creationTime);
|
|
107
|
+
if (options.json) {
|
|
108
|
+
console.log(JSON.stringify(worktreeInfos, null, 2));
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
console.log(chalk.bold(`Worktrees for ${repoName}:`));
|
|
112
|
+
console.log('━'.repeat(60));
|
|
113
|
+
console.log();
|
|
114
|
+
for (const info of worktreeInfos) {
|
|
115
|
+
let statusColor = chalk.gray;
|
|
116
|
+
if (info.prStatus?.state === 'open') {
|
|
117
|
+
statusColor = chalk.green;
|
|
118
|
+
}
|
|
119
|
+
else if (info.prStatus?.state === 'merged' || info.prStatus?.state === 'closed') {
|
|
120
|
+
statusColor = chalk.magenta;
|
|
121
|
+
}
|
|
122
|
+
let statusLine = `${statusColor(info.dirname.padEnd(40))} ${statusColor(info.prStatus?.state || 'no-pr')}`;
|
|
123
|
+
if (info.branch !== 'no-branch') {
|
|
124
|
+
statusLine += ` ${chalk.gray(`(↑${info.ahead} ↓${info.behind})`)}`;
|
|
125
|
+
}
|
|
126
|
+
if (info.hasUncommittedChanges) {
|
|
127
|
+
statusLine += ` ${chalk.yellow('(uncommitted changes)')}`;
|
|
128
|
+
}
|
|
129
|
+
if (info.behind > 10) {
|
|
130
|
+
statusLine += ` ${chalk.yellow('⚠️ outdated')}`;
|
|
131
|
+
}
|
|
132
|
+
if (info.prStatus?.checksStatus === 'failure') {
|
|
133
|
+
statusLine += ` ${chalk.red('❌ checks failing')}`;
|
|
134
|
+
}
|
|
135
|
+
if (info.isCurrentWorktree) {
|
|
136
|
+
statusLine += ` ${chalk.cyan('← you are here')}`;
|
|
137
|
+
}
|
|
138
|
+
console.log(statusLine);
|
|
139
|
+
console.log(` ${chalk.gray('Branch:')} ${info.branch}`);
|
|
140
|
+
if (info.prStatus?.url) {
|
|
141
|
+
console.log(` ${chalk.gray('PR:')} ${info.prStatus.url}`);
|
|
142
|
+
}
|
|
143
|
+
console.log();
|
|
144
|
+
}
|
|
145
|
+
console.log('━'.repeat(60));
|
|
146
|
+
const counts = {
|
|
147
|
+
total: worktreeInfos.length,
|
|
148
|
+
open: worktreeInfos.filter((w) => w.prStatus?.state === 'open').length,
|
|
149
|
+
draft: worktreeInfos.filter((w) => w.prStatus?.state === 'draft').length,
|
|
150
|
+
merged: worktreeInfos.filter((w) => w.prStatus?.state === 'merged').length,
|
|
151
|
+
closed: worktreeInfos.filter((w) => w.prStatus?.state === 'closed').length,
|
|
152
|
+
noPr: worktreeInfos.filter((w) => w.prStatus?.state === 'no-pr').length,
|
|
153
|
+
};
|
|
154
|
+
const parts = [];
|
|
155
|
+
if (counts.open > 0)
|
|
156
|
+
parts.push(`${counts.open} open`);
|
|
157
|
+
if (counts.draft > 0)
|
|
158
|
+
parts.push(`${counts.draft} draft`);
|
|
159
|
+
if (counts.merged > 0)
|
|
160
|
+
parts.push(`${counts.merged} merged`);
|
|
161
|
+
if (counts.closed > 0)
|
|
162
|
+
parts.push(`${counts.closed} closed`);
|
|
163
|
+
if (counts.noPr > 0)
|
|
164
|
+
parts.push(`${counts.noPr} no-pr`);
|
|
165
|
+
let summary = `Summary: ${counts.total} worktrees`;
|
|
166
|
+
if (parts.length > 0) {
|
|
167
|
+
summary += ` (${parts.join(', ')})`;
|
|
168
|
+
}
|
|
169
|
+
console.log(summary);
|
|
170
|
+
const cleanable = counts.merged + counts.closed;
|
|
171
|
+
if (cleanable > 0) {
|
|
172
|
+
console.log(chalk.blue(`💡 Run 'wt clean' to remove ${cleanable} merged/closed worktree(s)`));
|
|
173
|
+
}
|
|
174
|
+
if (githubError) {
|
|
175
|
+
if (githubError === 'not-github') {
|
|
176
|
+
console.log(chalk.blue('💡 Not a GitHub repository - PR status unavailable'));
|
|
177
|
+
}
|
|
178
|
+
else if (githubError === 'gh-unavailable') {
|
|
179
|
+
const ghStatus = await isGhCliAvailable();
|
|
180
|
+
if (!ghStatus.available) {
|
|
181
|
+
console.log(chalk.blue('💡 Install gh CLI for PR status: brew install gh'));
|
|
182
|
+
}
|
|
183
|
+
else if (!ghStatus.authenticated) {
|
|
184
|
+
console.log(chalk.blue('💡 Authenticate gh CLI for PR status: gh auth login'));
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
catch (error) {
|
|
190
|
+
spinner?.stop();
|
|
191
|
+
if (error instanceof Error) {
|
|
192
|
+
console.error(chalk.red(`Error: ${error.message}`));
|
|
193
|
+
}
|
|
194
|
+
else {
|
|
195
|
+
console.error(chalk.red('An unknown error occurred'));
|
|
196
|
+
}
|
|
197
|
+
process.exit(1);
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
return cmd;
|
|
201
|
+
}
|
|
202
|
+
//# sourceMappingURL=list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../src/commands/list.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,GAAG,MAAM,KAAK,CAAA;AACrB,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AACnD,OAAO,EACL,aAAa,EACb,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,qBAAqB,EACrB,cAAc,EACd,gBAAgB,EAChB,YAAY,GACb,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAoBnF,MAAM,UAAU,WAAW;IACzB,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IAE/B,GAAG;SACA,WAAW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