-
Notifications
You must be signed in to change notification settings - Fork 13
feat: add install and editor flags with shorthand options #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
johnlindquist
merged 12 commits into
feature/github-ci-publish-workflow
from
feature/add-install-and-editor-flags
Mar 20, 2025
Merged
feat: add install and editor flags with shorthand options #2
johnlindquist
merged 12 commits into
feature/github-ci-publish-workflow
from
feature/add-install-and-editor-flags
Mar 20, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…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
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
5 tasks
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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