Download the PHP package woda/laravel-worktrees without Composer
On this page you can find all versions of the php package woda/laravel-worktrees. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-worktrees
Laravel Worktrees
Git worktree management with database cloning for Laravel.
Create isolated development environments from your Laravel project using git worktrees. Each worktree gets its own branch, dependencies, database clone, and frontend build.
Installation
Publish the config (optional):
Configuration
Commands
worktree:create
Create a worktree with full environment isolation.
Options: --branch, --base, --issue, --pr, --skip-deps, --skip-build, --skip-db
worktree:list
worktree:delete
worktree:cleanup
Remove stale worktrees.
worktree:open
Open a worktree in your IDE.
Database Strategies
The database.strategy config determines how databases are cloned:
| Strategy | Behavior |
|---|---|
auto |
Detect from database.default config |
sqlite |
Copy the SQLite file into the worktree |
mysql |
mysqldump \| mysql into a new database |
pgsql |
pg_dump \| psql into a new database |
none |
Skip database cloning |
Docker containers are supported for MySQL and PostgreSQL — set the container name in config and the commands will be wrapped with docker exec.
Port Isolation (Sail)
When running multiple worktrees with Laravel Sail, each worktree needs unique host ports to avoid conflicts. If your .env contains APP_PORT or VITE_PORT, the package will automatically derive unique ports per worktree.
Ports are computed as base + (crc32(name) % 900), giving ranges of 8100–8999 for APP_PORT and 5200–6099 for VITE_PORT by default. Configure the base ports in config/worktrees.php or via environment variables:
Port replacement only applies when the key already exists in your .env file — it won't inject ports you haven't defined.
ProcessManager Contract
The package binds a NullProcessManager by default. To integrate with a process manager (e.g. screen sessions, tmux), implement Woda\Worktrees\Contracts\ProcessManager:
Bind your implementation in a service provider:
Requirements
- PHP 8.2+
- Laravel 11 or 12
License
MIT
All versions of laravel-worktrees with dependencies
illuminate/console Version ^11.0 || ^12.0
illuminate/process Version ^11.0 || ^12.0
illuminate/support Version ^11.0 || ^12.0