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

Laravel Command File Picker Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

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:

  • Maintenance risk (high). Last release 2020-12-09. That predates Laravel 9/10/11, PHP 8.1+ enums/readonly, and — critically — Laravel Prompts, which in Laravel 10+ became the idiomatic and default interactive console UX. The package almost certainly wraps the older $this->choice() / Symfony ChoiceQuestion pattern.
  • Compatibility risk (high). Its 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.
  • Ecosystem validation risk (moderate). 10 stars and 0 dependents means effectively no community hardening; edge cases (large directories, symlinks, non-TTY environments, Windows terminals, deep nesting, duplicate class short-names) are unlikely to be covered by tests.
  • Security risk (negligible). Dev-only, no network or persistence; MIT license is permissive and clean.
  • Opportunity signal (low, 15). Reads as a small, clever convenience that never found a niche — largely superseded by first-party Prompts and by bespoke command scaffolding.

Key questions for the maintainer/team:

  1. Does it install and function on our target Laravel and PHP versions without constraint hacks?
  2. What exactly does the picker return — absolute path, relative path, or FQCN — and does that contract match how our commands consume input?
  3. How does it behave when the target directory is empty, very large, or contains non-class files?
  4. Does it degrade gracefully in CI / non-interactive contexts (--no-interaction), or does it hard-fail?
  5. Is the scanning logic recursive, and does it respect PSR-4 namespace mapping?
  6. Are we willing to own a fork, or is the code small enough to inline?

Integration Approach

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:

  • Adopt as-is if it installs cleanly on our stack and the API is stable enough for one or two commands.
  • Fork and pin if a small constraint patch unblocks it; vendor the fork under an internal namespace with a deprecation note.
  • Inline (recommended default) — copy the ~100 lines into an internal 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.

  1. Spike (0.5 day). Branch, install, wire one real command, exercise it locally on macOS/Linux and, if relevant, Windows.
  2. Compatibility gate. Confirm install and runtime on the lowest and highest Laravel versions we support.
  3. Build-vs-adopt decision. Default to inline/fork; adopt upstream only if it clears the gate with no patches.
  4. Internal wrapper. Regardless of outcome, expose our own trait/helper so the underlying implementation is swappable and callers are insulated.
  5. Rollout. One or two commands first; gather DX feedback; then decide whether to standardize the pattern across scaffolding commands.

Operational Impact

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:

  • Non-TTY/CI execution. Interactive prompts throw or hang under --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().
  • Empty or misconfigured directories. No files found should produce a clear error, not an opaque prompt crash.
  • Namespace/path mismatch. If discovery derives FQCNs from file paths, non-PSR-4 layouts or files with mismatched class declarations will yield broken selections.
  • Duplicate short class names. Multi-select lists showing bare class names become ambiguous across namespaces; ensure disambiguation.
  • Upgrade breakage. A Laravel major bump changing prompt internals is the most likely silent failure — covered by inlining or by an integration test that drives the command with simulated input.
  • Terminal variance. Windows/WSL and minimal CI images can render choice lists poorly; verify on the platforms the team actually uses.

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.

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.
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib