Skip to content

Conversation

@johnlindquist
Copy link
Owner

Adds two new flags to the new command:\n\n- --install (or -i) to specify a package manager for installing dependencies\n- --editor (or -e) to specify which editor to open the worktree in\n\nExample usage:\nbash\ncursor-worktree new feature/test -i pnpm -e code\n

johnlindquist and others added 12 commits March 19, 2025 22:13
…rkflow

Add GitHub CI workflow for npm publishing
- Add semantic-release and plugins

- Configure semantic-release in package.json

- Update GitHub Actions workflow to use semantic-release
- Update Node.js version from 16 to 18 to support newer features
- Update Node.js version to meet semantic-release requirements
- Add contents and packages write permissions to workflow
# 1.0.0 (2025-03-20)

### Bug Fixes

* add write permissions for semantic-release ([d98cae6](d98cae6))
* switch to pnpm ([b95819e](b95819e))
* update Node.js version to 18 ([ab54632](ab54632))
* update Node.js version to 20.8.1 ([b9d2190](b9d2190))
* use npm install instead of npm ci ([988aac9](988aac9))

### Features

* add semantic-release for automated versioning ([11cddea](11cddea))
- Update new.ts to create sibling directories

- Add test documentation in TESTING.md
# [1.1.0](v1.0.0...v1.1.0) (2025-03-20)

### Features

* create worktrees in sibling directories ([37dc420](37dc420))
@johnlindquist johnlindquist merged commit 2e34dbb into feature/github-ci-publish-workflow Mar 20, 2025
johnlindquist added a commit that referenced this pull request Dec 7, 2025
This commit implements comprehensive improvements to the worktree-cli:

1. Fix Global Path Collisions (#1)
   - Added repo namespace to global paths to prevent cross-repo collisions
   - ~/worktrees/auth now becomes ~/worktrees/repo-name/auth

2. Enable Bare Repository Support (#2)
   - Removed blocking check for bare repos
   - Skip clean check for bare repos (no working tree)

3. Refactor PR Command to Avoid Context Switching (#3)
   - Use `git fetch origin refs/pull/ID/head:branch` instead of checkout
   - No longer requires switching branches in main worktree

4. Interactive TUI for Missing Arguments (#4)
   - Added prompts library for interactive selection
   - `wt open`, `wt remove`, `wt pr` now show selection UI without args
   - `wt purge` uses multi-select for batch removal

5. Handle Dirty States Gracefully (#5)
   - Offer stash/pop workflow when worktree is dirty
   - Options: stash, abort, or continue anyway
   - Automatic stash restore in finally block

6. Replace Regex Security with Trust Model (#6)
   - Removed brittle regex blocklist for setup commands
   - Added --trust flag for CI environments
   - Shows commands and asks for confirmation before execution

7. Centralize Path and Naming Logic (#7)
   - Created src/utils/paths.ts with resolveWorktreeName()
   - Standardized on replacing / with - for branch names
   - Prevents collisions: feature/auth and hotfix/auth are now unique

8. Robust Git Output Parsing (#8)
   - Created typed WorktreeInfo interface
   - getWorktrees() parses --porcelain output correctly
   - Handles locked, prunable, detached, and bare states

9. Atomic Operations and Rollback (#9)
   - Created AtomicWorktreeOperation class
   - Automatic rollback on failure (removes worktree, cleans up)
   - withAtomicRollback() helper for clean error handling

10. Automated Integration Tests (#10)
    - Created test suite with vitest
    - 26 tests covering all major functionality
    - Tests create real git repos and run CLI commands
johnlindquist added a commit that referenced this pull request Dec 7, 2025
* feat: Implement 10 major improvements to worktree-cli

This commit implements comprehensive improvements to the worktree-cli:

1. Fix Global Path Collisions (#1)
   - Added repo namespace to global paths to prevent cross-repo collisions
   - ~/worktrees/auth now becomes ~/worktrees/repo-name/auth

2. Enable Bare Repository Support (#2)
   - Removed blocking check for bare repos
   - Skip clean check for bare repos (no working tree)

3. Refactor PR Command to Avoid Context Switching (#3)
   - Use `git fetch origin refs/pull/ID/head:branch` instead of checkout
   - No longer requires switching branches in main worktree

4. Interactive TUI for Missing Arguments (#4)
   - Added prompts library for interactive selection
   - `wt open`, `wt remove`, `wt pr` now show selection UI without args
   - `wt purge` uses multi-select for batch removal

5. Handle Dirty States Gracefully (#5)
   - Offer stash/pop workflow when worktree is dirty
   - Options: stash, abort, or continue anyway
   - Automatic stash restore in finally block

6. Replace Regex Security with Trust Model (#6)
   - Removed brittle regex blocklist for setup commands
   - Added --trust flag for CI environments
   - Shows commands and asks for confirmation before execution

7. Centralize Path and Naming Logic (#7)
   - Created src/utils/paths.ts with resolveWorktreeName()
   - Standardized on replacing / with - for branch names
   - Prevents collisions: feature/auth and hotfix/auth are now unique

8. Robust Git Output Parsing (#8)
   - Created typed WorktreeInfo interface
   - getWorktrees() parses --porcelain output correctly
   - Handles locked, prunable, detached, and bare states

9. Atomic Operations and Rollback (#9)
   - Created AtomicWorktreeOperation class
   - Automatic rollback on failure (removes worktree, cleans up)
   - withAtomicRollback() helper for clean error handling

10. Automated Integration Tests (#10)
    - Created test suite with vitest
    - 26 tests covering all major functionality
    - Tests create real git repos and run CLI commands

* docs: Update README with new features and add git utility tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants