@solaqua/gji 0.10.0 → 0.12.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.
Files changed (122) hide show
  1. package/README.md +83 -426
  2. package/dist/back.d.ts +3 -0
  3. package/dist/back.js +19 -7
  4. package/dist/bootstrap-output.d.ts +3 -0
  5. package/dist/bootstrap-output.js +27 -0
  6. package/dist/bootstrap-preview.d.ts +10 -0
  7. package/dist/bootstrap-preview.js +21 -0
  8. package/dist/clean.js +27 -3
  9. package/dist/cli.d.ts +4 -0
  10. package/dist/cli.js +140 -22
  11. package/dist/clone-failure-store.d.ts +18 -0
  12. package/dist/clone-failure-store.js +230 -0
  13. package/dist/command-runner.d.ts +6 -0
  14. package/dist/command-runner.js +38 -0
  15. package/dist/completion.js +7 -2
  16. package/dist/config-command.d.ts +1 -0
  17. package/dist/config-command.js +7 -1
  18. package/dist/config.d.ts +26 -1
  19. package/dist/config.js +110 -6
  20. package/dist/context-card.d.ts +1 -0
  21. package/dist/context-card.js +25 -0
  22. package/dist/dependency-bootstrap-prompt.d.ts +24 -0
  23. package/dist/dependency-bootstrap-prompt.js +103 -0
  24. package/dist/dependency-bootstrap.d.ts +129 -0
  25. package/dist/dependency-bootstrap.js +566 -0
  26. package/dist/dir-clone.d.ts +33 -0
  27. package/dist/dir-clone.js +505 -0
  28. package/dist/doctor.js +21 -0
  29. package/dist/done.d.ts +10 -0
  30. package/dist/done.js +210 -0
  31. package/dist/file-sync.js +71 -22
  32. package/dist/format-bytes.d.ts +1 -0
  33. package/dist/format-bytes.js +14 -0
  34. package/dist/fs-utils.d.ts +4 -0
  35. package/dist/fs-utils.js +26 -0
  36. package/dist/git.d.ts +5 -0
  37. package/dist/git.js +50 -0
  38. package/dist/gji-bundle.mjs +6189 -1313
  39. package/dist/go-resolver.d.ts +35 -0
  40. package/dist/go-resolver.js +185 -0
  41. package/dist/go.d.ts +6 -2
  42. package/dist/go.js +270 -62
  43. package/dist/hooks.d.ts +2 -1
  44. package/dist/hooks.js +20 -8
  45. package/dist/hub.d.ts +31 -0
  46. package/dist/hub.js +287 -0
  47. package/dist/init.js +30 -22
  48. package/dist/install-prompt.d.ts +1 -0
  49. package/dist/install-prompt.js +3 -25
  50. package/dist/ls.js +9 -1
  51. package/dist/navigation-output.d.ts +11 -0
  52. package/dist/navigation-output.js +6 -0
  53. package/dist/new.d.ts +14 -2
  54. package/dist/new.js +422 -38
  55. package/dist/pr-open.js +2 -10
  56. package/dist/pr.d.ts +6 -2
  57. package/dist/pr.js +135 -30
  58. package/dist/pull-requests.d.ts +1 -0
  59. package/dist/pull-requests.js +32 -3
  60. package/dist/remove.js +22 -0
  61. package/dist/repo.d.ts +4 -0
  62. package/dist/repo.js +61 -6
  63. package/dist/run-hook.js +2 -0
  64. package/dist/safe-destination.d.ts +15 -0
  65. package/dist/safe-destination.js +166 -0
  66. package/dist/shell-completion.js +52 -13
  67. package/dist/slots.d.ts +8 -0
  68. package/dist/slots.js +61 -0
  69. package/dist/status.d.ts +2 -0
  70. package/dist/status.js +9 -1
  71. package/dist/sync-directories.d.ts +33 -0
  72. package/dist/sync-directories.js +97 -0
  73. package/dist/sync-plan.d.ts +16 -0
  74. package/dist/sync-plan.js +128 -0
  75. package/dist/sync.js +7 -13
  76. package/dist/task-command.d.ts +9 -0
  77. package/dist/task-command.js +29 -0
  78. package/dist/task.d.ts +9 -0
  79. package/dist/task.js +37 -0
  80. package/dist/terminal-text.d.ts +4 -0
  81. package/dist/terminal-text.js +72 -0
  82. package/dist/undo.d.ts +36 -0
  83. package/dist/undo.js +392 -0
  84. package/dist/warp.d.ts +3 -1
  85. package/dist/warp.js +32 -125
  86. package/dist/worktree-bootstrap.d.ts +35 -0
  87. package/dist/worktree-bootstrap.js +96 -0
  88. package/dist/worktree-info.d.ts +6 -1
  89. package/dist/worktree-info.js +14 -4
  90. package/dist/worktree-management.d.ts +1 -0
  91. package/dist/worktree-management.js +23 -4
  92. package/dist/worktree-picker.d.ts +24 -11
  93. package/dist/worktree-picker.js +176 -95
  94. package/dist/worktree-prompts.js +1 -1
  95. package/dist/worktree-source.d.ts +6 -0
  96. package/dist/worktree-source.js +1 -0
  97. package/dist/worktree-sources.d.ts +4 -0
  98. package/dist/worktree-sources.js +77 -0
  99. package/man/man1/gji-back.1 +1 -1
  100. package/man/man1/gji-clean.1 +1 -1
  101. package/man/man1/gji-completion.1 +1 -1
  102. package/man/man1/gji-config.1 +1 -1
  103. package/man/man1/gji-doctor.1 +1 -1
  104. package/man/man1/gji-done.1 +19 -0
  105. package/man/man1/gji-go.1 +12 -3
  106. package/man/man1/gji-history.1 +1 -1
  107. package/man/man1/gji-init.1 +1 -1
  108. package/man/man1/gji-ls.1 +1 -1
  109. package/man/man1/gji-new.1 +21 -3
  110. package/man/man1/gji-open.1 +1 -1
  111. package/man/man1/gji-pr.1 +7 -1
  112. package/man/man1/gji-remove.1 +3 -3
  113. package/man/man1/gji-root.1 +1 -1
  114. package/man/man1/gji-run-hook.1 +1 -1
  115. package/man/man1/gji-status.1 +1 -1
  116. package/man/man1/gji-sync-files.1 +1 -1
  117. package/man/man1/gji-sync.1 +1 -1
  118. package/man/man1/gji-task.1 +16 -0
  119. package/man/man1/gji-undo.1 +16 -0
  120. package/man/man1/gji-warp.1 +3 -6
  121. package/man/man1/gji.1 +17 -5
  122. package/package.json +3 -1
@@ -1,10 +1,16 @@
1
- .TH GJI\-NEW 1 "July 2026" "gji 0.10.0" "User Commands"
1
+ .TH GJI\-NEW 1 "July 2026" "gji 0.12.0" "User Commands"
2
2
  .SH NAME
3
- gji\-new \- create a new branch or detached linked worktree
3
+ gji\-new \- create a new branch or detached linked worktree and CoW\-bootstrap configured directories
4
4
  .SH SYNOPSIS
5
5
  .B gji new [\fIoptions\fR] [options] [branch]
6
6
  .SH DESCRIPTION
7
- create a new branch or detached linked worktree
7
+ create a new branch or detached linked worktree and CoW\-bootstrap configured directories
8
+ .SH BOOTSTRAP_POLICY
9
+ dependencyBuildCommand overrides Cargo's default cargo check. Supported lockfiles trigger an interactive dependencyBootstrap choice when no explicit policy exists; the choice is saved according to installSaveTarget. JSON and headless modes never prompt and keep off. npm is always install\-only, and sync\-file failures stop dependency repair, install prompts, and after\-create hooks. JSON bootstrap events include structured reasons, and failed setup reports the created worktree path.
10
+
11
+ .SH BOOTSTRAP
12
+ syncDirs performs generic copy\-on\-write directory seeding before syncFiles. It never falls back to ordinary copying and never suppresses installation or repair. Set dependencyBootstrap to off, cow\-then\-repair, or install\-only to enable deterministic project\-local package\-manager or build\-cache repair. The lifecycle is CoW seed, syncFiles, repair or install, then after\-create. CoW failures fall back to repair from an empty target; partial clones are removed and existing targets are never deleted. Bundler uses vendor/bundle only; global gem stores and caches are not cloned.
13
+
8
14
  .SH OPTIONS
9
15
  .TP
10
16
  .B \-f, \-\-force
@@ -16,6 +22,18 @@ create a detached worktree without a branch
16
22
  .B \-\-from\-current
17
23
  base the new branch on the current worktree instead of the main worktree (cannot be combined with \-\-detached)
18
24
  .TP
25
+ .B \-\-no\-fetch
26
+ skip refreshing the remote default branch before creating the new branch
27
+ .TP
28
+ .B \-\-take
29
+ move current uncommitted changes into the new worktree
30
+ .TP
31
+ .B \-\-task <description>
32
+ record the purpose of the new worktree
33
+ .TP
34
+ .B \-\-copy
35
+ copy current uncommitted changes instead of moving them (requires \-\-take)
36
+ .TP
19
37
  .B \-\-open
20
38
  open the new worktree in an editor after creation
21
39
  .TP
@@ -1,4 +1,4 @@
1
- .TH GJI\-OPEN 1 "July 2026" "gji 0.10.0" "User Commands"
1
+ .TH GJI\-OPEN 1 "July 2026" "gji 0.12.0" "User Commands"
2
2
  .SH NAME
3
3
  gji\-open \- open the worktree in an editor
4
4
  .SH SYNOPSIS
package/man/man1/gji-pr.1 CHANGED
@@ -1,10 +1,16 @@
1
- .TH GJI\-PR 1 "July 2026" "gji 0.10.0" "User Commands"
1
+ .TH GJI\-PR 1 "July 2026" "gji 0.12.0" "User Commands"
2
2
  .SH NAME
3
3
  gji\-pr \- fetch a pull request by number, #number, or URL into a linked worktree
4
4
  .SH SYNOPSIS
5
5
  .B gji pr [\fIoptions\fR] [options] <ref>
6
6
  .SH DESCRIPTION
7
7
  fetch a pull request by number, #number, or URL into a linked worktree
8
+ .SH BOOTSTRAP_POLICY
9
+ dependencyBuildCommand overrides Cargo's default cargo check. Supported lockfiles trigger an interactive dependencyBootstrap choice when no explicit policy exists; the choice is saved according to installSaveTarget. JSON and headless modes never prompt and keep off. npm is always install\-only, and sync\-file failures stop dependency repair, install prompts, and after\-create hooks. JSON bootstrap events include structured reasons, and failed setup reports the created worktree path.
10
+
11
+ .SH BOOTSTRAP
12
+ syncDirs performs generic copy\-on\-write directory seeding before syncFiles. It never falls back to ordinary copying and never suppresses installation or repair. Set dependencyBootstrap to off, cow\-then\-repair, or install\-only to enable deterministic project\-local package\-manager or build\-cache repair. The lifecycle is CoW seed, syncFiles, repair or install, then after\-create. CoW failures fall back to repair from an empty target; partial clones are removed and existing targets are never deleted. Bundler uses vendor/bundle only; global gem stores and caches are not cloned.
13
+
8
14
  .SH OPTIONS
9
15
  .TP
10
16
  .B \-\-dry\-run
@@ -1,10 +1,10 @@
1
- .TH GJI\-REMOVE 1 "July 2026" "gji 0.10.0" "User Commands"
1
+ .TH GJI\-REMOVE 1 "July 2026" "gji 0.12.0" "User Commands"
2
2
  .SH NAME
3
- gji\-remove \- remove a linked worktree and delete its branch when present
3
+ gji\-remove \- deprecated: use gji done for one worktree or gji clean for bulk cleanup
4
4
  .SH SYNOPSIS
5
5
  .B gji remove [\fIoptions\fR] [options] [branch]
6
6
  .SH DESCRIPTION
7
- remove a linked worktree and delete its branch when present
7
+ deprecated: use gji done for one worktree or gji clean for bulk cleanup
8
8
  .SH OPTIONS
9
9
  .TP
10
10
  .B \-f, \-\-force
@@ -1,4 +1,4 @@
1
- .TH GJI\-ROOT 1 "July 2026" "gji 0.10.0" "User Commands"
1
+ .TH GJI\-ROOT 1 "July 2026" "gji 0.12.0" "User Commands"
2
2
  .SH NAME
3
3
  gji\-root \- print the main repository root path
4
4
  .SH SYNOPSIS
@@ -1,4 +1,4 @@
1
- .TH GJI\-RUN\-HOOK 1 "July 2026" "gji 0.10.0" "User Commands"
1
+ .TH GJI\-RUN\-HOOK 1 "July 2026" "gji 0.12.0" "User Commands"
2
2
  .SH NAME
3
3
  gji\-run\-hook \- run a named hook (after\-create, after\-enter, before\-remove) in the current worktree
4
4
  .SH SYNOPSIS
@@ -1,4 +1,4 @@
1
- .TH GJI\-STATUS 1 "July 2026" "gji 0.10.0" "User Commands"
1
+ .TH GJI\-STATUS 1 "July 2026" "gji 0.12.0" "User Commands"
2
2
  .SH NAME
3
3
  gji\-status \- summarize repository and worktree health
4
4
  .SH SYNOPSIS
@@ -1,4 +1,4 @@
1
- .TH GJI\-SYNC\-FILES 1 "July 2026" "gji 0.10.0" "User Commands"
1
+ .TH GJI\-SYNC\-FILES 1 "July 2026" "gji 0.12.0" "User Commands"
2
2
  .SH NAME
3
3
  gji\-sync\-files \- manage local files copied into new worktrees
4
4
  .SH SYNOPSIS
@@ -1,4 +1,4 @@
1
- .TH GJI\-SYNC 1 "July 2026" "gji 0.10.0" "User Commands"
1
+ .TH GJI\-SYNC 1 "July 2026" "gji 0.12.0" "User Commands"
2
2
  .SH NAME
3
3
  gji\-sync \- fetch and update one or all worktrees
4
4
  .SH SYNOPSIS
@@ -0,0 +1,16 @@
1
+ .TH GJI\-TASK 1 "July 2026" "gji 0.12.0" "User Commands"
2
+ .SH NAME
3
+ gji\-task \- show or update the current worktree task
4
+ .SH SYNOPSIS
5
+ .B gji task [\fIoptions\fR] [options] [task]
6
+ .SH DESCRIPTION
7
+ show or update the current worktree task
8
+ .SH OPTIONS
9
+ .TP
10
+ .B \-\-clear
11
+ clear the current worktree task
12
+ .TP
13
+ .B \-\-json
14
+ emit task metadata as JSON
15
+ .SH "SEE ALSO"
16
+ .BR gji (1)
@@ -0,0 +1,16 @@
1
+ .TH GJI\-UNDO 1 "July 2026" "gji 0.12.0" "User Commands"
2
+ .SH NAME
3
+ gji\-undo \- restore the most recent destructive worktree operation
4
+ .SH SYNOPSIS
5
+ .B gji undo [\fIoptions\fR] [options] [id]
6
+ .SH DESCRIPTION
7
+ restore the most recent destructive worktree operation
8
+ .SH OPTIONS
9
+ .TP
10
+ .B \-\-list
11
+ list recoverable operations
12
+ .TP
13
+ .B \-\-json
14
+ emit JSON on success or error instead of human\-readable output
15
+ .SH "SEE ALSO"
16
+ .BR gji (1)
@@ -1,15 +1,12 @@
1
- .TH GJI\-WARP 1 "July 2026" "gji 0.10.0" "User Commands"
1
+ .TH GJI\-WARP 1 "July 2026" "gji 0.12.0" "User Commands"
2
2
  .SH NAME
3
- gji\-warp \- jump to any worktree across all known repos
3
+ gji\-warp \- deprecated: use gji go (press Tab for all known repos)
4
4
  .SH SYNOPSIS
5
5
  .B gji warp [\fIoptions\fR] [options] [branch]
6
6
  .SH DESCRIPTION
7
- jump to any worktree across all known repos
7
+ deprecated: use gji go (press Tab for all known repos)
8
8
  .SH OPTIONS
9
9
  .TP
10
- .B \-n, \-\-new [branch]
11
- create a new worktree in a registered repo
12
- .TP
13
10
  .B \-\-print
14
11
  print the resolved worktree path without changing directory
15
12
  .TP
package/man/man1/gji.1 CHANGED
@@ -1,4 +1,4 @@
1
- .TH GJI 1 "July 2026" "gji 0.10.0" "User Commands"
1
+ .TH GJI 1 "July 2026" "gji 0.12.0" "User Commands"
2
2
  .SH NAME
3
3
  gji \- Context switching without the mess.
4
4
  .SH SYNOPSIS
@@ -12,7 +12,13 @@ eliminating the need for \fBgit stash\fR when switching contexts.
12
12
  .SH COMMANDS
13
13
  .TP
14
14
  .B new [options] [branch]
15
- create a new branch or detached linked worktree
15
+ create a new branch or detached linked worktree and CoW\-bootstrap configured directories
16
+ .TP
17
+ .B done [options] [branch]
18
+ finish the current linked worktree and return safely
19
+ .TP
20
+ .B undo [options] [id]
21
+ restore the most recent destructive worktree operation
16
22
  .TP
17
23
  .B init [options] [shell]
18
24
  set up shell integration interactively or print a shell wrapper
@@ -36,7 +42,7 @@ show navigation history
36
42
  open the worktree in an editor
37
43
  .TP
38
44
  .B go [options] [branch]
39
- print or select a worktree path
45
+ resolve and jump to a worktree path
40
46
  .br
41
47
  Alias: \fBjump\fR
42
48
  .TP
@@ -46,6 +52,9 @@ print the main repository root path
46
52
  .B status [options]
47
53
  summarize repository and worktree health
48
54
  .TP
55
+ .B task [options] [task]
56
+ show or update the current worktree task
57
+ .TP
49
58
  .B sync [options]
50
59
  fetch and update one or all worktrees
51
60
  .TP
@@ -59,7 +68,7 @@ list active worktrees
59
68
  interactively prune linked worktrees
60
69
  .TP
61
70
  .B remove [options] [branch]
62
- remove a linked worktree and delete its branch when present
71
+ deprecated: use gji done for one worktree or gji clean for bulk cleanup
63
72
  .br
64
73
  Alias: \fBrm\fR
65
74
  .TP
@@ -69,7 +78,7 @@ run a named hook (after\-create, after\-enter, before\-remove) in the current wo
69
78
  Alias: \fBtrigger\-hook\fR
70
79
  .TP
71
80
  .B warp [options] [branch]
72
- jump to any worktree across all known repos
81
+ deprecated: use gji go (press Tab for all known repos)
73
82
  .TP
74
83
  .B config [options] [command]
75
84
  manage global config defaults
@@ -79,6 +88,8 @@ manage global config defaults
79
88
  output the version number
80
89
  .SH "SEE ALSO"
81
90
  .BR gji\-new (1),
91
+ .BR gji\-done (1),
92
+ .BR gji\-undo (1),
82
93
  .BR gji\-init (1),
83
94
  .BR gji\-doctor (1),
84
95
  .BR gji\-completion (1),
@@ -89,6 +100,7 @@ output the version number
89
100
  .BR gji\-go (1),
90
101
  .BR gji\-root (1),
91
102
  .BR gji\-status (1),
103
+ .BR gji\-task (1),
92
104
  .BR gji\-sync (1),
93
105
  .BR gji\-sync\-files (1),
94
106
  .BR gji\-ls (1),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solaqua/gji",
3
- "version": "0.10.0",
3
+ "version": "0.12.0",
4
4
  "description": "Git worktree CLI for fast context switching.",
5
5
  "license": "MIT",
6
6
  "author": "sjquant",
@@ -49,6 +49,7 @@
49
49
  "docs:start": "pnpm --dir website start",
50
50
  "prepublishOnly": "pnpm test && pnpm build && pnpm generate-man",
51
51
  "test": "vitest run --passWithNoTests",
52
+ "test:coverage": "vitest run --coverage --passWithNoTests",
52
53
  "test:watch": "vitest",
53
54
  "lint": "biome lint --write .",
54
55
  "format": "biome format --write .",
@@ -65,6 +66,7 @@
65
66
  "@biomejs/biome": "^2.4.15",
66
67
  "@j178/prek": "^0.3.13",
67
68
  "@types/node": "^24.6.0",
69
+ "@vitest/coverage-v8": "3.2.4",
68
70
  "esbuild": "^0.27.0",
69
71
  "tsx": "^4.22.4",
70
72
  "typescript": "^5.9.3",