Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Worktree Prompt Laravel Package

phattarachai/worktree-prompt

A Laravel package that adds an interactive prompt for picking Git worktrees, so you can run Artisan commands against the right branch or parallel checkout without leaving your terminal.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit: lwt is a developer-tooling CLI, not a runtime Laravel dependency. It fits teams that use Git worktrees for parallel feature work, AI-agent workspaces, or per-branch review environments. It automates Laravel-specific worktree setup: Composer vendor handling, .env bootstrapping, storage/cache folders, frontend assets, database provisioning, and setup verification. This is a good fit for local development and agent-assisted workflows, with little production architecture impact if scoped to dev environments.

Integration feasibility: High for standard Laravel projects using Git, Composer, npm, and local Postgres/MySQL/SQLite. The commands map cleanly to existing developer workflows: add, setup, remove, list. Existing plain-Git or agent-created worktrees can be adopted via lwt setup [path], which lowers migration friction. Feasibility depends on undocumented assumptions: supported OS/filesystems, Laravel/PHP versions, DB permissions, and how the tool is installed and updated.

Technical risk: Moderate because this is a first release with filesystem, database, and Git operations. Highest-risk areas are destructive cleanup (remove drops a database and may delete a branch), secrets copied or symlinked into worktrees, database copy semantics, fallback behavior when copy-on-write is unavailable, and platform-specific commands such as cp -c/--reflink. The tool appears to include safeguards—dirty-worktree refusal, tracked-file restoration, non-zero exit on incomplete setup—but these need validation in a pilot. Vendor is never symlinked, which reduces autoload ambiguity, and the App\ autoload check is a useful correctness gate.

Key questions:

  • What installation method is supported: global Composer, project dev dependency, PHAR, or something else?
  • Which OS/filesystems are officially supported—macOS APFS, Linux reflink-capable filesystems, Windows/WSL?
  • Which Laravel, PHP, Composer, Node, Git, and database versions are tested?
  • How are .env secrets handled: copy vs symlink, permissions, and cleanup on remove?
  • Does --db=copy clone data, schema only, or something else, and how are credentials and dumps secured?
  • How does remove behave when database deletion fails or the worktree is partially set up?
  • Is there a config file for path conventions, DB naming, ignored files, or hooks?
  • How does it interact with Sail, Herd, Valet, Docker, DDEV, multiple DB connections, Redis, queues, and nonstandard Laravel structures?
  • What is the support/ownership model and release cadence for this package?

Integration Approach

Stack fit: Best suited as an optional developer productivity tool in Laravel repositories. It complements Git worktrees, Composer, npm, and local databases. It should not be treated as production infrastructure. Teams already using AI agents in .claude/worktrees/ or similar isolated workspaces are a strong initial adopter group.

Migration path: Start with a single representative Laravel repository. Install the CLI, run lwt add for a new branch, exercise lwt setup against an existing worktree, then validate lwt list and lwt remove behavior. Compare setup time and failure rate against the current manual process. If successful, document it in onboarding and add it to team scripts/Makefiles.

Compatibility: Validate against the team’s actual Laravel versions, database engines, package managers, and OS mix before rollout. Pay particular attention to copy-on-write support, DB admin permissions, .env.* conventions, public/build, bootstrap/ssr, and .worktreeinclude needs. Treat Windows support as unproven until explicitly tested.

Sequencing:

  1. Pin and install a specific lwt version in a pilot repository.
  2. Define conventions for worktree paths, branch naming, .env handling, and database naming.
  3. Test add, setup, list, and remove across clean, dirty, and partially configured worktrees.
  4. Validate database copy/empty modes and cleanup behavior with non-sensitive data.
  5. Document guardrails for secrets, DB dumps, and branch deletion.
  6. Roll out to early adopters, then standardize in team docs and automation.

Operational Impact

Maintenance: Low runtime maintenance, but the tool becomes part of developer setup and must be version-pinned. First-release status means API/CLI behavior may change. Assign an owner to track releases and validate upgrades. Disk usage can grow from vendor clones, node_modules, build artifacts, and per-worktree databases.

Support: Expect questions around Git worktree concepts, DB permissions, missing .env values, asset builds, and cleanup. Support load will be highest during onboarding and when setups partially fail. Clear runbooks and failure messages are important; the tool’s non-zero exit behavior helps, but teams still need guidance on recovery.

Scaling: Scales reasonably per developer and per repository, but not free: many worktrees multiply disk usage, database instances, and dependency copies. Copy-on-write helps where supported; otherwise composer install/npm ci fallbacks increase setup time. Shared test database checks are useful, but teams should define how test data is loaded and refreshed.

Failure modes: Partial setup after git worktree add; Composer/npm lock mismatch; unsupported reflink causing slow fallback; DB creation failure due to permissions; orphaned databases after failed removal; dirty worktree blocking cleanup; accidental branch deletion if confirmation is mishandled; secrets exposed through copied .env files; symlinked .env breaking when the main worktree moves; stale worktrees and empty parent folders; tracked files modified during setup. The release notes indicate mitigations for several of these, but a pilot should explicitly test failure and recovery paths.

Ramp-up: Low for Laravel developers familiar with Git worktrees; moderate for those new to worktrees or local DB administration. A short demo plus a documented “safe remove” and “recover from failed setup” runbook should be enough for initial adoption.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource