@vibe-x/agent-better-checkpoint 0.3.0 → 0.3.2

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 CHANGED
@@ -96,26 +96,21 @@ npx @vibe-x/agent-better-checkpoint --platform cursor
96
96
  npx @vibe-x/agent-better-checkpoint --platform claude
97
97
  ```
98
98
 
99
- ### Project-local Install
99
+ ### Project-only Install
100
100
 
101
- Install scripts into your project for self-contained setup (commit with repo):
101
+ Install only into your project (no global changes). Uses Cursor's project-level [skills](https://cursor.com/docs/context/skills) and [hooks](https://cursor.com/docs/agent/hooks):
102
102
 
103
103
  ```bash
104
104
  cd /path/to/your/project
105
- npx @vibe-x/agent-better-checkpoint --target .
105
+ npx @vibe-x/agent-better-checkpoint --platform cursor --target .
106
106
  ```
107
107
 
108
- Or specify a target directory:
108
+ Creates: `.cursor/skills/`, `.cursor/hooks.json`, `.vibe-x/agent-better-checkpoint/`. Commit these with your repo.
109
109
 
110
- ```bash
111
- npx @vibe-x/agent-better-checkpoint --target /path/to/your/project
112
- ```
113
-
114
- Uninstall project-local only:
110
+ Uninstall project-only:
115
111
 
116
112
  ```bash
117
113
  npx @vibe-x/agent-better-checkpoint --uninstall --target .
118
- npx @vibe-x/agent-better-checkpoint --uninstall --target /path/to/project
119
114
  ```
120
115
 
121
116
  ### Via [skills.sh](https://skills.sh)
@@ -128,14 +123,23 @@ The AI agent will auto-bootstrap the runtime scripts on first use.
128
123
 
129
124
  ### What Gets Installed
130
125
 
126
+ **Global** (no `--target`):
127
+
131
128
  | Location | Content |
132
129
  |----------|---------|
133
130
  | `~/.vibe-x/agent-better-checkpoint/scripts/` | Commit script (`checkpoint.sh` / `.ps1`) |
134
131
  | `~/.vibe-x/agent-better-checkpoint/hooks/stop/` | Stop hook (`check_uncommitted.sh` / `.ps1`) |
135
- | Platform skill directory | `SKILL.md` — AI agent instructions |
136
- | Platform hook config | Stop hook registration |
132
+ | `~/.cursor/skills/` or `~/.claude/skills/` | `SKILL.md` — AI agent instructions |
133
+ | `~/.cursor/hooks.json` or `~/.claude/settings.json` | Stop hook registration |
137
134
 
138
- > **Project-local mode**: Projects can also commit `.vibe-x/agent-better-checkpoint/` (config + scripts) for self-contained setup. When present, the global hook delegates to the project-local scripts automatically.
135
+ **Project-only** (`--target .`):
136
+
137
+ | Location | Content |
138
+ |----------|---------|
139
+ | `<project>/.cursor/skills/agent-better-checkpoint/` | `SKILL.md` |
140
+ | `<project>/.cursor/hooks.json` | Stop hook (Cursor only) |
141
+ | `<project>/.cursor/hooks/` | `check_uncommitted.sh` |
142
+ | `<project>/.vibe-x/agent-better-checkpoint/` | `checkpoint.sh`, `config.yml` |
139
143
 
140
144
  ### Uninstall
141
145
 
package/bin/cli.mjs CHANGED
@@ -12,7 +12,7 @@
12
12
  * npx @vibe-x/agent-better-checkpoint --uninstall
13
13
  */
14
14
 
15
- import { existsSync, mkdirSync, copyFileSync, readFileSync, writeFileSync, chmodSync, rmSync, statSync } from 'node:fs';
15
+ import { existsSync, mkdirSync, copyFileSync, readFileSync, writeFileSync, chmodSync, rmSync, statSync, readdirSync } from 'node:fs';
16
16
  import { join, dirname, resolve } from 'node:path';
17
17
  import { homedir, platform } from 'node:os';
18
18
  import { fileURLToPath } from 'node:url';
@@ -81,7 +81,7 @@ Usage:
81
81
 
82
82
  Options:
83
83
  --platform <cursor|claude> Target AI platform (auto-detected if omitted)
84
- --target <path> Install to specified project directory (. for cwd)
84
+ --target <path> Project-only install (no global). Use . for cwd
85
85
  --uninstall Remove installed files and hook registrations
86
86
  -h, --help Show this help message
87
87
  `);
@@ -153,31 +153,17 @@ function installScripts(osType) {
153
153
  ensureDir(scriptsDir);
154
154
  ensureDir(hooksDir);
155
155
 
156
- if (osType === 'unix') {
157
- const checkpointSrc = join(PLATFORM_DIR, 'unix', 'checkpoint.sh');
158
- const hookSrc = join(PLATFORM_DIR, 'unix', 'check_uncommitted.sh');
159
- const checkpointDest = join(scriptsDir, 'checkpoint.sh');
160
- const hookDest = join(hooksDir, 'check_uncommitted.sh');
161
-
162
- copyFileSafe(checkpointSrc, checkpointDest);
163
- copyFileSafe(hookSrc, hookDest);
164
- setExecutable(checkpointDest);
165
- setExecutable(hookDest);
166
-
167
- console.log(` Scripts → ${scriptsDir}/checkpoint.sh`);
168
- console.log(` Hooks → ${hooksDir}/check_uncommitted.sh`);
169
- } else {
170
- const checkpointSrc = join(PLATFORM_DIR, 'win', 'checkpoint.ps1');
171
- const hookSrc = join(PLATFORM_DIR, 'win', 'check_uncommitted.ps1');
172
- const checkpointDest = join(scriptsDir, 'checkpoint.ps1');
173
- const hookDest = join(hooksDir, 'check_uncommitted.ps1');
156
+ // 双端脚本都安装,方便跨平台使用
157
+ copyFileSafe(join(PLATFORM_DIR, 'unix', 'checkpoint.sh'), join(scriptsDir, 'checkpoint.sh'));
158
+ copyFileSafe(join(PLATFORM_DIR, 'unix', 'check_uncommitted.sh'), join(hooksDir, 'check_uncommitted.sh'));
159
+ setExecutable(join(scriptsDir, 'checkpoint.sh'));
160
+ setExecutable(join(hooksDir, 'check_uncommitted.sh'));
174
161
 
175
- copyFileSafe(checkpointSrc, checkpointDest);
176
- copyFileSafe(hookSrc, hookDest);
162
+ copyFileSafe(join(PLATFORM_DIR, 'win', 'checkpoint.ps1'), join(scriptsDir, 'checkpoint.ps1'));
163
+ copyFileSafe(join(PLATFORM_DIR, 'win', 'check_uncommitted.ps1'), join(hooksDir, 'check_uncommitted.ps1'));
177
164
 
178
- console.log(` Scripts → ${scriptsDir}\\checkpoint.ps1`);
179
- console.log(` Hooks → ${hooksDir}\\check_uncommitted.ps1`);
180
- }
165
+ console.log(` Scripts → ${scriptsDir}/`);
166
+ console.log(` Hooks → ${hooksDir}/`);
181
167
  }
182
168
 
183
169
  function installSkill(aiPlatform) {
@@ -225,12 +211,6 @@ function registerCursorHook(osType) {
225
211
  hookCmd = `powershell -File "${INSTALL_BASE}\\hooks\\stop\\check_uncommitted.ps1"`;
226
212
  }
227
213
 
228
- // Check if already registered
229
- const alreadyRegistered = config.hooks.stop.some(
230
- h => typeof h === 'object' && h.command && h.command.includes(SKILL_NAME.replace(/-/g, ''))
231
- );
232
-
233
- // More precise check: command includes agent-better-checkpoint
234
214
  const registered = config.hooks.stop.some(
235
215
  h => typeof h === 'object' && h.command && h.command.includes('agent-better-checkpoint')
236
216
  );
@@ -243,34 +223,108 @@ function registerCursorHook(osType) {
243
223
  console.log(` Config → ${hooksPath}`);
244
224
  }
245
225
 
246
- function installProjectLocal(targetDir, osType) {
247
- const projectBase = join(resolve(targetDir), '.vibe-x', 'agent-better-checkpoint');
248
- ensureDir(projectBase);
249
-
250
- if (osType === 'unix') {
251
- copyFileSafe(join(PLATFORM_DIR, 'unix', 'checkpoint.sh'), join(projectBase, 'checkpoint.sh'));
252
- copyFileSafe(join(PLATFORM_DIR, 'unix', 'check_uncommitted.sh'), join(projectBase, 'check_uncommitted.sh'));
253
- setExecutable(join(projectBase, 'checkpoint.sh'));
254
- setExecutable(join(projectBase, 'check_uncommitted.sh'));
255
- }
256
- copyFileSafe(join(PLATFORM_DIR, 'win', 'checkpoint.ps1'), join(projectBase, 'checkpoint.ps1'));
257
- copyFileSafe(join(PLATFORM_DIR, 'win', 'check_uncommitted.ps1'), join(projectBase, 'check_uncommitted.ps1'));
258
-
259
- const configDest = join(projectBase, 'config.yml');
226
+ // 项目级安装:仅写入 target 目录,不触碰全局
227
+ function installProjectOnly(targetDir, aiPlatform, osType) {
228
+ const root = resolve(targetDir);
229
+
230
+ // .vibe-x/agent-better-checkpoint: checkpoint 脚本 + config
231
+ const vibeXBase = join(root, '.vibe-x', 'agent-better-checkpoint');
232
+ ensureDir(vibeXBase);
233
+ copyFileSafe(join(PLATFORM_DIR, 'unix', 'checkpoint.sh'), join(vibeXBase, 'checkpoint.sh'));
234
+ copyFileSafe(join(PLATFORM_DIR, 'win', 'checkpoint.ps1'), join(vibeXBase, 'checkpoint.ps1'));
235
+ setExecutable(join(vibeXBase, 'checkpoint.sh'));
236
+ const configDest = join(vibeXBase, 'config.yml');
260
237
  if (!existsSync(configDest) && existsSync(CONFIG_TEMPLATE)) {
261
238
  copyFileSafe(CONFIG_TEMPLATE, configDest);
262
239
  }
240
+ console.log(` Config → ${vibeXBase}/`);
263
241
 
264
- console.log(` Project ${projectBase}/`);
265
- }
242
+ // Skill: .cursor/skills/ .claude/skills/
243
+ const skillRoot = aiPlatform === 'cursor' ? '.cursor' : '.claude';
244
+ const skillDir = join(root, skillRoot, 'skills', SKILL_NAME);
245
+ copyFileSafe(SKILL_SRC, join(skillDir, 'SKILL.md'));
246
+ console.log(` Skill → ${skillDir}/`);
266
247
 
267
- function uninstallProjectLocal(targetDir) {
268
- const projectBase = join(resolve(targetDir), '.vibe-x', 'agent-better-checkpoint');
269
- if (existsSync(projectBase)) {
270
- rmSync(projectBase, { recursive: true, force: true });
271
- console.log(` Removed project-local: ${projectBase}`);
248
+ if (aiPlatform === 'cursor') {
249
+ // Cursor 支持项目级 hooks: .cursor/hooks.json + .cursor/hooks/
250
+ const hooksDir = join(root, '.cursor', 'hooks');
251
+ ensureDir(hooksDir);
252
+ copyFileSafe(join(PLATFORM_DIR, 'unix', 'check_uncommitted.sh'), join(hooksDir, 'check_uncommitted.sh'));
253
+ setExecutable(join(hooksDir, 'check_uncommitted.sh'));
254
+ copyFileSafe(join(PLATFORM_DIR, 'win', 'check_uncommitted.ps1'), join(hooksDir, 'check_uncommitted.ps1'));
255
+ const hookCmd = osType === 'unix'
256
+ ? 'bash .cursor/hooks/check_uncommitted.sh'
257
+ : `powershell -File ".cursor\\hooks\\check_uncommitted.ps1"`;
258
+ const hooksPath = join(root, '.cursor', 'hooks.json');
259
+ let config = readJsonFile(hooksPath) || { version: 1, hooks: {} };
260
+ if (!config.hooks) config.hooks = {};
261
+ if (!config.hooks.stop) config.hooks.stop = [];
262
+ const registered = config.hooks.stop.some(
263
+ h => typeof h === 'object' && h.command && h.command.includes('check_uncommitted')
264
+ );
265
+ if (!registered) {
266
+ config.hooks.stop.push({ command: hookCmd });
267
+ }
268
+ writeJsonFile(hooksPath, config);
269
+ console.log(` Hooks → ${hooksPath}`);
272
270
  } else {
273
- console.log(` ${projectBase} not found, nothing to remove`);
271
+ // Claude Code: settings.json 为全局,无项目级 hooks,仅安装 skill 和脚本
272
+ console.log(` Hooks → (Claude stop hook is global-only, skipped for project install)`);
273
+ }
274
+ }
275
+
276
+ function uninstallProjectOnly(targetDir, aiPlatform) {
277
+ const root = resolve(targetDir);
278
+
279
+ const vibeXBase = join(root, '.vibe-x', 'agent-better-checkpoint');
280
+ const skillRoot = aiPlatform === 'cursor' ? '.cursor' : '.claude';
281
+ const skillDir = join(root, skillRoot, 'skills', SKILL_NAME);
282
+ if (existsSync(vibeXBase)) {
283
+ rmSync(vibeXBase, { recursive: true, force: true });
284
+ console.log(` Removed ${vibeXBase}`);
285
+ }
286
+
287
+ if (existsSync(skillDir)) {
288
+ rmSync(skillDir, { recursive: true, force: true });
289
+ console.log(` Removed ${skillDir}`);
290
+ }
291
+ // 移除空的 .cursor/skills 或 .claude/skills 父目录
292
+ const skillsParent = join(root, skillRoot, 'skills');
293
+ if (existsSync(skillsParent)) {
294
+ try {
295
+ if (readdirSync(skillsParent).length === 0) {
296
+ rmSync(skillsParent, { recursive: true, force: true });
297
+ }
298
+ } catch {
299
+ // ignore
300
+ }
301
+ }
302
+
303
+ if (aiPlatform === 'cursor') {
304
+ const hooksPath = join(root, '.cursor', 'hooks.json');
305
+ if (existsSync(hooksPath)) {
306
+ const config = readJsonFile(hooksPath);
307
+ if (config?.hooks?.stop) {
308
+ config.hooks.stop = config.hooks.stop.filter(
309
+ h => !(typeof h === 'object' && h.command && h.command.includes('check_uncommitted'))
310
+ );
311
+ if (config.hooks.stop.length === 0) delete config.hooks.stop;
312
+ if (Object.keys(config.hooks || {}).length === 0) {
313
+ rmSync(hooksPath, { force: true });
314
+ } else {
315
+ writeJsonFile(hooksPath, config);
316
+ }
317
+ console.log(` Cleaned ${hooksPath}`);
318
+ }
319
+ }
320
+ const hooksDir = join(root, '.cursor', 'hooks');
321
+ const shPath = join(hooksDir, 'check_uncommitted.sh');
322
+ const ps1Path = join(hooksDir, 'check_uncommitted.ps1');
323
+ if (existsSync(shPath)) rmSync(shPath, { force: true });
324
+ if (existsSync(ps1Path)) rmSync(ps1Path, { force: true });
325
+ if (existsSync(hooksDir) && readdirSync(hooksDir).length === 0) {
326
+ rmSync(hooksDir, { recursive: true, force: true });
327
+ }
274
328
  }
275
329
  }
276
330
 
@@ -389,16 +443,25 @@ function main() {
389
443
 
390
444
  if (args.uninstall) {
391
445
  if (projectTargetDir) {
392
- console.log('\n[Project-local] Uninstalling...');
393
- uninstallProjectLocal(projectTargetDir);
394
- }
395
-
396
- // 指定 --platform 时只清该平台;未指定时清理所有已安装的平台
397
- const platforms = args.platform
398
- ? [args.platform]
399
- : ['cursor', 'claude'].filter(p => hasInstallation(p));
400
-
401
- if (!projectTargetDir || args.platform) {
446
+ // 优先从项目目录检测平台(与安装时一致),否则用 --platform 或全局检测
447
+ let platform = args.platform;
448
+ if (!platform) {
449
+ const cursorSkill = join(projectTargetDir, '.cursor', 'skills', SKILL_NAME);
450
+ const claudeSkill = join(projectTargetDir, '.claude', 'skills', SKILL_NAME);
451
+ if (existsSync(cursorSkill)) platform = 'cursor';
452
+ else if (existsSync(claudeSkill)) platform = 'claude';
453
+ }
454
+ if (!platform) platform = aiPlatform;
455
+ if (!platform) {
456
+ console.error('Error: --target uninstall requires --platform cursor|claude (or project must have skill installed)');
457
+ process.exit(1);
458
+ }
459
+ console.log(`\n[Project-local] Uninstalling from ${projectTargetDir}...`);
460
+ uninstallProjectOnly(projectTargetDir, platform);
461
+ } else {
462
+ const platforms = args.platform
463
+ ? [args.platform]
464
+ : ['cursor', 'claude'].filter(p => hasInstallation(p));
402
465
  for (const p of platforms) {
403
466
  console.log(`\n[${p === 'cursor' ? 'Cursor' : 'Claude Code'}] Uninstalling...`);
404
467
  if (p === 'cursor') {
@@ -409,30 +472,19 @@ function main() {
409
472
  unregisterClaudeHook();
410
473
  }
411
474
  }
412
- if (platforms.length > 0) {
413
- uninstallScripts();
414
- }
415
- }
416
-
417
- if (platforms.length === 0 && !projectTargetDir) {
418
- console.log('\nNo installation found for any platform.');
475
+ if (platforms.length > 0) uninstallScripts();
476
+ if (platforms.length === 0) console.log('\nNo global installation found.');
419
477
  }
420
478
  console.log('\n✅ Uninstallation complete!');
421
479
  } else {
422
- if (projectTargetDir) {
423
- if (!aiPlatform) {
424
- console.error('Error: --target requires AI platform for global hook. Specify --platform cursor|claude');
480
+ if (projectTargetDir) {
481
+ if (!aiPlatform) {
482
+ console.error('Error: --target requires --platform cursor|claude');
425
483
  process.exit(1);
426
484
  }
427
- console.log(`\n[${aiPlatform === 'cursor' ? 'Cursor' : 'Claude Code'}] Installing... (OS: ${osType})`);
428
- installScripts(osType);
429
- installSkill(aiPlatform);
430
- if (aiPlatform === 'cursor') {
431
- registerCursorHook(osType);
432
- } else {
433
- registerClaudeHook(osType);
434
- }
435
- installProjectLocal(projectTargetDir, osType);
485
+ console.log(`\n[Project-local] Installing to ${projectTargetDir}... (OS: ${osType})`);
486
+ installProjectOnly(projectTargetDir, aiPlatform, osType);
487
+ console.log('\n✅ Installation complete! (project-only, no global changes)');
436
488
  } else {
437
489
  console.log(`\n[${aiPlatform === 'cursor' ? 'Cursor' : 'Claude Code'}] Installing... (OS: ${osType})`);
438
490
  installScripts(osType);
@@ -442,16 +494,11 @@ if (projectTargetDir) {
442
494
  } else {
443
495
  registerClaudeHook(osType);
444
496
  }
445
- }
446
-
447
- console.log('\n✅ Installation complete!');
448
- console.log('\nInstalled components:');
449
- console.log(` 📜 Checkpoint script ~/.vibe-x/agent-better-checkpoint/scripts/`);
450
- console.log(` 🔒 Stop hook → ~/.vibe-x/agent-better-checkpoint/hooks/stop/`);
451
- console.log(` 📖 SKILL.md → ${aiPlatform === 'cursor' ? '~/.cursor/skills/' : '~/.claude/skills/'}${SKILL_NAME}/`);
452
- if (projectTargetDir) {
453
- const projectBase = join(resolve(projectTargetDir), '.vibe-x', 'agent-better-checkpoint');
454
- console.log(` 📁 Project-local → ${projectBase}/`);
497
+ console.log('\n✅ Installation complete!');
498
+ console.log('\nInstalled components:');
499
+ console.log(` 📜 Checkpoint script → ~/.vibe-x/agent-better-checkpoint/scripts/ (.sh + .ps1)`);
500
+ console.log(` 🔒 Stop hook → ~/.vibe-x/agent-better-checkpoint/hooks/stop/ (.sh + .ps1)`);
501
+ console.log(` 📖 SKILL.md → ${aiPlatform === 'cursor' ? '~/.cursor/skills/' : '~/.claude/skills/'}${SKILL_NAME}/`);
455
502
  }
456
503
  console.log('\nThe AI agent will now auto-commit with semantic messages. Happy coding! 🎉');
457
504
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibe-x/agent-better-checkpoint",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "Semantic Git checkpoint commits for AI coding sessions",
5
5
  "type": "module",
6
6
  "bin": {
package/skill/SKILL.md CHANGED
@@ -3,7 +3,7 @@ name: agent-better-checkpoint
3
3
  description: "Automatically creates semantic Git checkpoint commits during AI coding sessions. Replaces opaque platform checkpoints with transparent, queryable Git commits using Conventional Commits format with Git Trailers. You MUST follow this skill whenever you make code changes — commit after each meaningful edit."
4
4
  license: MIT
5
5
  metadata:
6
- version: "0.3.0"
6
+ version: "0.3.2"
7
7
  author: "alienzhou"
8
8
  category: "version-control"
9
9
  ---
@@ -18,18 +18,23 @@ You are an AI coding assistant with **checkpoint awareness**. Every meaningful e
18
18
 
19
19
  ## 🔧 Installation Check
20
20
 
21
- Before your first commit, verify the checkpoint scripts are available:
21
+ Before your first commit, verify the checkpoint scripts are available.
22
22
 
23
- **Project-local (preferred, committed with project):** Check if `.vibe-x/agent-better-checkpoint/checkpoint.sh` exists in the workspace.
24
- **Global fallback:** Check if `~/.vibe-x/agent-better-checkpoint/scripts/checkpoint.sh` exists (macOS/Linux) or `$env:USERPROFILE/.vibe-x/agent-better-checkpoint/scripts/checkpoint.ps1` (Windows).
23
+ **IMPORTANT: Use your file-listing/read tools (NOT shell `test -f`) to check existence.** Shell relative paths break when CWD ≠ workspace root.
24
+
25
+ Check in order (stop at first hit):
26
+ 1. **Project-local (preferred):** `.vibe-x/agent-better-checkpoint/checkpoint.sh` (or `.ps1`) relative to workspace root.
27
+ 2. **Global fallback:** `~/.vibe-x/agent-better-checkpoint/scripts/checkpoint.sh` (or `.ps1`).
28
+
29
+ Both `.sh` and `.ps1` are always installed regardless of current OS.
25
30
 
26
31
  If neither exists, run:
27
32
 
28
33
  ```bash
29
- npx @vibe-x/agent-better-checkpoint@0.3.0
34
+ npx @vibe-x/agent-better-checkpoint@0.3.2
30
35
  ```
31
36
 
32
- This installs the global scripts and stop hook. For self-contained setup (commit with project), add `--target .` or `--target <path>`.
37
+ Without `--target`: installs globally. With `--target .`: project-only (skill + hooks in `.cursor/`, scripts in `.vibe-x/`), no global changes.
33
38
 
34
39
  ---
35
40
 
@@ -94,29 +99,14 @@ Switch to flex-column layout with collapsible sidebar.
94
99
 
95
100
  ## 🛠️ How to Commit
96
101
 
97
- Call the checkpoint script after composing your message. Determine the OS and use the appropriate command.
98
-
99
- **Prefer project-local when present** (`.vibe-x/agent-better-checkpoint/` committed with project):
102
+ Call the checkpoint script after composing your message. Both `.sh` and `.ps1` are always available — pick the one matching the current OS.
100
103
 
101
- **macOS/Linux:**
104
+ **Prefer project-local when present**, fall back to global:
102
105
 
103
- ```bash
104
- # Project-local (if .vibe-x/agent-better-checkpoint/ exists)
105
- .vibe-x/agent-better-checkpoint/checkpoint.sh "<commit-message>" "<user-prompt>"
106
-
107
- # Or global fallback
108
- ~/.vibe-x/agent-better-checkpoint/scripts/checkpoint.sh "<commit-message>" "<user-prompt>"
109
- ```
110
-
111
- **Windows (PowerShell):**
112
-
113
- ```powershell
114
- # Project-local (if .vibe-x/agent-better-checkpoint/ exists)
115
- powershell -File ".\.vibe-x\agent-better-checkpoint\checkpoint.ps1" "<commit-message>" "<user-prompt>"
116
-
117
- # Or global fallback
118
- powershell -File "$env:USERPROFILE/.vibe-x/agent-better-checkpoint/scripts/checkpoint.ps1" "<commit-message>" "<user-prompt>"
119
- ```
106
+ | OS | Project-local | Global fallback |
107
+ |----|--------------|-----------------|
108
+ | macOS/Linux | `.vibe-x/agent-better-checkpoint/checkpoint.sh` | `~/.vibe-x/agent-better-checkpoint/scripts/checkpoint.sh` |
109
+ | Windows | `powershell -File ".vibe-x\agent-better-checkpoint\checkpoint.ps1"` | `powershell -File "$env:USERPROFILE\.vibe-x\agent-better-checkpoint\scripts\checkpoint.ps1"` |
120
110
 
121
111
  ### Parameters:
122
112
 
@@ -129,7 +119,7 @@ powershell -File "$env:USERPROFILE/.vibe-x/agent-better-checkpoint/scripts/check
129
119
  ### Example (macOS/Linux):
130
120
 
131
121
  ```bash
132
- ~/.vibe-x/agent-better-checkpoint/scripts/checkpoint.sh \
122
+ .vibe-x/agent-better-checkpoint/checkpoint.sh \
133
123
  "checkpoint(auth): add JWT token refresh logic
134
124
 
135
125
  Implement automatic token refresh when access token expires.
@@ -140,7 +130,7 @@ Uses refresh token rotation for security." \
140
130
  ### Example (Windows):
141
131
 
142
132
  ```powershell
143
- powershell -File "$env:USERPROFILE/.vibe-x/agent-better-checkpoint/scripts/checkpoint.ps1" `
133
+ powershell -File ".vibe-x\agent-better-checkpoint\checkpoint.ps1" `
144
134
  "checkpoint(auth): add JWT token refresh logic`n`nImplement automatic token refresh when access token expires.`nUses refresh token rotation for security." `
145
135
  "帮我实现 token 刷新机制"
146
136
  ```
@@ -177,4 +167,4 @@ This should feel natural — commit as you go, like any good developer.
177
167
 
178
168
  ---
179
169
 
180
- **Version**: 0.3.0
170
+ **Version**: 0.3.2