PHP CLI tool for managing Git worktree environments with automated port allocation.
Install globally via Composer:
composer global require osmianski/worktree-managerMake sure Composer's global bin directory is in your PATH. Add this to your ~/.bashrc or ~/.zshrc:
export PATH="$HOME/.config/composer/vendor/bin:$PATH"Updating to the latest version:
composer global update osmianski/worktree-managerNavigate to your Git repository and create a new worktree:
cd /path/to/your/project
worktree newTo contribute to a project clone it locally:
cd ~
git clone git@github.com:osmianski/worktree-manager.git
cd worktree-manager
composer installTo run the dev version in a terminal session, run the following command:
export PATH="$HOME/worktree-manager/bin:$PATH"Now if you run worktree, it should show the branch name instead of the version number:
Worktree Manager dev-main
This project is licensed under the MIT License. See the LICENSE file for details.