clawt 2.19.0 → 3.0.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/README.md +12 -2
- package/dist/index.js +626 -219
- package/dist/postinstall.js +39 -6
- package/docs/alias.md +108 -0
- package/docs/completion.md +55 -0
- package/docs/config-file.md +43 -0
- package/docs/config.md +91 -0
- package/docs/create.md +85 -0
- package/docs/init.md +65 -0
- package/docs/list.md +67 -0
- package/docs/log.md +67 -0
- package/docs/merge.md +137 -0
- package/docs/notification.md +94 -0
- package/docs/projects.md +135 -0
- package/docs/remove.md +79 -0
- package/docs/reset.md +35 -0
- package/docs/resume.md +99 -0
- package/docs/run.md +146 -0
- package/docs/spec.md +156 -1879
- package/docs/status.md +155 -0
- package/docs/sync.md +114 -0
- package/docs/update-check.md +95 -0
- package/docs/validate.md +368 -0
- package/package.json +1 -1
- package/src/commands/alias.ts +1 -1
- package/src/commands/create.ts +10 -5
- package/src/commands/init.ts +75 -0
- package/src/commands/list.ts +1 -1
- package/src/commands/merge.ts +11 -4
- package/src/commands/remove.ts +10 -3
- package/src/commands/reset.ts +3 -0
- package/src/commands/resume.ts +9 -3
- package/src/commands/run.ts +9 -3
- package/src/commands/status.ts +1 -1
- package/src/commands/sync.ts +18 -6
- package/src/commands/validate.ts +46 -52
- package/src/constants/branch.ts +3 -0
- package/src/constants/config.ts +1 -1
- package/src/constants/index.ts +3 -3
- package/src/constants/messages/completion.ts +1 -1
- package/src/constants/messages/create.ts +3 -0
- package/src/constants/messages/index.ts +2 -0
- package/src/constants/messages/init.ts +18 -0
- package/src/constants/messages/remove.ts +2 -0
- package/src/constants/messages/sync.ts +3 -0
- package/src/constants/messages/validate.ts +6 -0
- package/src/constants/paths.ts +3 -0
- package/src/constants/prompt.ts +28 -0
- package/src/index.ts +2 -0
- package/src/types/command.ts +7 -1
- package/src/types/index.ts +2 -1
- package/src/types/projectConfig.ts +5 -0
- package/src/utils/config.ts +2 -1
- package/src/utils/git.ts +18 -0
- package/src/utils/index.ts +6 -1
- package/src/utils/json.ts +67 -0
- package/src/utils/project-config.ts +77 -0
- package/src/utils/validate-branch.ts +166 -0
- package/src/utils/worktree-matcher.ts +268 -1
- package/src/utils/worktree.ts +6 -2
- package/tests/unit/commands/create.test.ts +20 -16
- package/tests/unit/commands/init.test.ts +146 -0
- package/tests/unit/commands/merge.test.ts +7 -1
- package/tests/unit/commands/remove.test.ts +4 -0
- package/tests/unit/commands/reset.test.ts +2 -0
- package/tests/unit/commands/resume.test.ts +29 -8
- package/tests/unit/commands/run.test.ts +2 -0
- package/tests/unit/commands/sync.test.ts +6 -0
- package/tests/unit/commands/validate.test.ts +13 -0
- package/tests/unit/utils/config.test.ts +2 -2
- package/tests/unit/utils/project-config.test.ts +136 -0
- package/tests/unit/utils/update-checker.test.ts +28 -7
- package/tests/unit/utils/validate-branch.test.ts +272 -0
- package/tests/unit/utils/worktree-matcher.test.ts +142 -1
- package/tests/unit/utils/worktree.test.ts +6 -0
package/README.md
CHANGED
|
@@ -38,6 +38,16 @@ clawt merge -b branch-1 -m "feat: 实现xxx功能"
|
|
|
38
38
|
|
|
39
39
|
> 所有命令必须在**主 worktree 的仓库根目录**下执行。`-b` 参数支持模糊匹配。
|
|
40
40
|
|
|
41
|
+
### `clawt init` — 初始化项目级配置
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
clawt init # 以当前分支作为主工作分支进行初始化
|
|
45
|
+
clawt init -b <branch> # 指定主工作分支名
|
|
46
|
+
clawt init show # 查看当前项目的 init 配置(JSON 格式)
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
设置项目的主工作分支。重复执行会更新主工作分支配置。
|
|
50
|
+
|
|
41
51
|
### `clawt run` — 创建 worktree 并执行任务
|
|
42
52
|
|
|
43
53
|
```bash
|
|
@@ -100,10 +110,10 @@ clawt run -b <branch> --tasks "任务1" --tasks "任务2" --dry-run
|
|
|
100
110
|
|
|
101
111
|
```bash
|
|
102
112
|
clawt resume -b <branch> # 指定分支
|
|
103
|
-
clawt resume #
|
|
113
|
+
clawt resume # 交互式多选(按创建日期分组)
|
|
104
114
|
```
|
|
105
115
|
|
|
106
|
-
|
|
116
|
+
不传 `-b` 时,分支列表按创建日期分组显示,支持全局全选和按组全选。选 1 个在当前终端恢复,选多个自动在独立终端 Tab 中批量恢复(仅 macOS)。
|
|
107
117
|
|
|
108
118
|
如果目标 worktree 存在历史会话,会自动继续上次对话(`--continue`)。
|
|
109
119
|
|