From 55fabc0afa1fe967359503c4081a399aab0b43f8 Mon Sep 17 00:00:00 2001 From: John Lindquist Date: Wed, 19 Mar 2025 23:02:55 -0600 Subject: [PATCH 1/2] Implement changes for task: update main command name to 'cwt' --- README.md | 16 ++++++++-------- package.json | 2 +- src/index.ts | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 25dae61..6fb7806 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ pnpm install -g . ### Create a new worktree ```bash -cursor-worktree new [options] +cwt new [options] ``` Options: @@ -22,27 +22,27 @@ Options: Example: ```bash -cursor-worktree new feature/login -cursor-worktree new feature/chat --checkout -cursor-worktree new feature/auth -p ./auth-worktree +cwt new feature/login +cwt new feature/chat --checkout +cwt new feature/auth -p ./auth-worktree ``` ### List worktrees ```bash -cursor-worktree list +cwt list ``` ### Remove a worktree ```bash -cursor-worktree remove +cwt remove ``` You can remove a worktree by either its path or branch name: ```bash -cursor-worktree remove ./feature/login-worktree -cursor-worktree remove feature/chat +cwt remove ./feature/login-worktree +cwt remove feature/chat ``` ## Requirements diff --git a/package.json b/package.json index 084ea6f..fe7ad5a 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "license": "MIT", "type": "module", "bin": { - "cursor-worktree": "dist/index.js" + "cwt": "dist/index.js" }, "scripts": { "build": "tsc", diff --git a/src/index.ts b/src/index.ts index aee336a..7d7c7f2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -9,7 +9,7 @@ import { removeWorktreeHandler } from "./commands/remove.js"; const program = new Command(); program - .name("cursor-worktree") + .name("cwt") .description("Manage git worktrees and open them in the Cursor editor.") .version("1.0.0"); From 4278568eab2cb7a99cc15cade858bad9f7b1e8b0 Mon Sep 17 00:00:00 2001 From: John Lindquist Date: Wed, 19 Mar 2025 23:03:00 -0600 Subject: [PATCH 2/2] Add manual test instructions for new command name 'cwt' --- TESTING.md | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/TESTING.md b/TESTING.md index e993cc1..81e6181 100644 --- a/TESTING.md +++ b/TESTING.md @@ -17,4 +17,28 @@ cursor-worktree new editor ``` 2. Verify that a new sibling directory named `editor` is created. -3. Confirm that the worktree is added to the Git repository and that the Cursor editor opens the new directory. \ No newline at end of file +3. Confirm that the worktree is added to the Git repository and that the Cursor editor opens the new directory. + +## Manual Test for CLI Command Name Change + +1. Install the package globally: + ```bash + pnpm install -g . + ``` +2. Run the command help to verify the new command: + ```bash + cwt --help + ``` +3. Optionally, test additional commands: + - Create a new worktree: + ```bash + cwt new feature/test + ``` + - List worktrees: + ```bash + cwt list + ``` + - Remove a worktree: + ```bash + cwt remove feature/test + ``` \ No newline at end of file