christophrumpel/laravel-command-file-picker
A small Laravel package that adds a file picker for Artisan command files, letting you browse and select existing command classes instead of typing file paths by hand. Handy for quickly locating and working with commands in your app.
Architecture fit. The package is a single-purpose console helper: a trait (plus supporting file-discovery logic) that a developer mixes into an Artisan command to present an interactive single- or multi-select list of files/classes and return the chosen path or FQCN. Architecturally it is a leaf dependency — no service provider bootstrapping, no runtime HTTP surface, no database or queue coupling. It slots into the "developer experience" layer of a Laravel codebase (scaffolding commands, generators, wizard-style CLIs) rather than the application domain. That makes it cheap to adopt and cheap to remove.
Integration feasibility. High for a spike: composer require --dev, add the trait, call the picker inside handle(). There is no configuration surface, no publishable assets, and no migration. The only real integration work is validating that the directory-scanning and choice-prompt behavior matches our repository layout (nested namespaces, PSR-4 roots, excluded vendor paths).
Technical risk. This is the dominant concern:
$this->choice() / Symfony ChoiceQuestion pattern.illuminate/support / PHP constraints are likely pinned to Laravel 6–8 era. It may install only with --ignore-platform-reqs or a widened constraint in a fork.Key questions for the maintainer/team:
--no-interaction), or does it hard-fail?Stack fit. Treat this as an optional developer-tooling dependency, never a production one. Declare it under require-dev so it cannot leak into deployed artifacts. It is a natural fit only if we are building or maintaining interactive Artisan commands (generators, importers, one-off admin wizards). If our commands are non-interactive by design — the common case for CI-driven workflows — the value proposition largely evaporates.
Migration path. The realistic path is not "adopt and forget" but "evaluate, then likely absorb." The functionality is a thin wrapper over file discovery plus a console choice prompt. Given the age of the last release, plan for one of three outcomes:
Console\Concerns\PicksFiles trait, re-implement the prompt on top of Laravel Prompts' select()/multiselect(), and delete the external dependency. This eliminates the maintenance/questionable-compatibility risk entirely at near-zero cost.Compatibility. Verify composer why-not against our Laravel/PHP matrix before anything else. If the constraint is the only blocker, widening it is usually sufficient because the underlying Symfony Console APIs it depends on have remained broadly stable. But do not assume — the prompt helper signatures and the choice() return semantics have shifted across major versions.
Sequencing.
Maintenance. The upstream is effectively static — no releases in over four years, no visible triage. Owning an inline copy or fork removes the ongoing "will this break on the next Laravel upgrade" question, at the cost of ~100 lines of internal code we must carry. That is a favorable trade for a utility this small. Budget a lightweight annual review if we keep the dependency.
Support. No vendor to escalate to. Internal support burden is limited to the developers authoring interactive commands; there is no end-user or on-call surface. Document the helper in the team's command-authoring guide so its behavior (prompt format, return types, non-interactive fallback) is not tribal knowledge.
Scaling. The package has no runtime scaling characteristics — it executes only inside a developer-invoked CLI. The only scaling consideration is directory size: naive recursive scans over a large app/ tree or a generated directory could feel sluggish interactively. Cache or scope the scan if a target directory grows into the thousands of files.
Failure modes to plan for:
--no-interaction or piped input. Every command using the picker must accept an explicit argument/option as the non-interactive path, with the picker as a fallback only when $this->input->isInteractive().Ramp-up. Very low: a developer can learn the helper in minutes — it is a single trait method with an obvious contract (pick a file/class, get it back). The genuine ramp-up cost is the policy around it: teaching the team to always pair the picker with a non-interactive option so commands remain scriptable and CI-safe. That discipline matters more than the package itself, and it should be captured in the command-authoring guide rather than left to individual judgment.
Bottom line. Low-risk to trial, low-value to depend on. Given zero dependents, a 2020 release, and first-party Laravel Prompts now covering the same UX, I would timebox a half-day spike and default to inlining the helper internally — capturing the convenience without inheriting an unmaintained dependency.
How can I help you explore Laravel packages today?