Skip to content

Conversation

@cebidhem
Copy link
Owner

@cebidhem cebidhem commented Oct 1, 2025

Summary

This PR renames the CLI commands to better align with git worktree semantics and adds convenience aliases for common operations.

Command Changes

  • createadd: Matches git worktree add convention
  • deleteremove: Matches git worktree remove convention

New Aliases

  • rm: Alias for remove command (hidden from main help)
  • ls: Alias for list command (hidden from main help)

Additional Changes

  • Updated all documentation and examples in README
  • Updated help text for all commands
  • Added MIT License link to README
  • Updated and added test coverage for new commands and aliases

Breaking Changes

⚠️ BREAKING CHANGE: The create and delete commands have been renamed to add and remove. Users must update their workflows to use the new command names:

  • wt create feature-xwt add feature-x
  • wt delete /pathwt remove /path (or wt rm /path)

Test Results

All tests passing ✅

  • 19 test cases updated and passing
  • Code quality: Black formatted, Pylint 10.00/10

Migration Guide

Old Command New Command Alias Available
wt create wt add -
wt delete wt remove wt rm
wt list wt list wt ls

Rename CLI commands for better alignment with git worktree operations:
- `create` → `add` (matches `git worktree add`)
- `delete` → `remove` (matches `git worktree remove`)

Add convenience aliases:
- `rm` as alias for `remove`
- `ls` as alias for `list`

Update documentation, help text, and all tests to reflect new command names.
Add MIT license link to README.

BREAKING CHANGE: The `create` and `delete` commands have been renamed to `add` and `remove`. Users must update their workflows to use the new command names.
Copilot AI review requested due to automatic review settings October 1, 2025 19:34
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR renames CLI commands to align with git worktree semantics by changing create to add and delete to remove, while adding convenience aliases ls and rm. This is a breaking change that requires users to update their workflows.

  • Renamed create command to add to match git worktree add convention
  • Renamed delete command to remove to match git worktree remove convention
  • Added hidden aliases ls for list and rm for remove commands

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
wt/cli.py Renamed command functions and added alias implementations with updated help text
tests/test_cli.py Updated all test class names, method names, and command invocations to use new command names
README.md Updated all documentation examples to use new command names and added alias usage examples

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Replace duplicated implementation in alias functions with direct calls to
original functions:
- `ls()` now calls `list_cmd()` directly
- `rm()` now calls `remove(path, force)` directly

This follows the DRY principle and makes the code more maintainable.

Addresses Copilot PR review feedback.
@cebidhem cebidhem requested a review from Copilot October 1, 2025 19:48
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@cebidhem cebidhem merged commit e5da1bb into main Oct 1, 2025
2 checks passed
@cebidhem cebidhem deleted the alias branch October 1, 2025 19:48
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.

2 participants