rcpassos/artisanfuzzy
Composer 安装命令:
composer require rcpassos/artisanfuzzy
包简介
A zero-dependency, pure-PHP fuzzy search interface for Laravel's Artisan CLI. Instantly find routes, commands, and configs — no fzf required.
README 文档
README
🔍 A zero-dependency, pure-PHP fuzzy search interface for Laravel’s Artisan CLI.
Instantly find routes, commands, and config keys — nofzfrequired.
✨ Overview
ArtisanFuzzy is a lightweight Laravel package that brings interactive fuzzy search to your Artisan CLI —
built entirely in pure PHP 8.3+, with no external binaries or dependencies.
Quickly search through large lists of routes, commands, or config keys without the need for grep or fzf.
It's fast, portable, and works anywhere Laravel does — macOS, Linux, or Windows.
Requires Laravel 12.x and PHP 8.3+.
🚀 Installation
Install via Composer:
composer require rcpassos/artisanfuzzy
Laravel will auto-discover the service provider.
If you prefer manual registration, add this to your config/app.php:
'providers' => [ App\Providers\AppServiceProvider::class, Rcpassos\ArtisanFuzzy\ArtisanFuzzyServiceProvider::class, ],
⚡ Usage
🔹 Find a Route
php artisan route:find login
Interactively fuzzy-search your application’s routes.
🔹 Find an Artisan Command
php artisan command:find queue
🔹 Find a Config Key
php artisan config:find app
Each command supports:
--pattern=<string> Filter non-interactively (CI-safe)
--limit=<int> Limit the number of matches (default: 30)
--json Output the result in JSON
💡 How It Works
ArtisanFuzzy provides a pure PHP terminal interface:
- Uses built-in
fgets()for interactive input - Matches strings using weighted fuzzy ranking (
similar_text()+ substring boost) - Auto-detects TTY vs non-TTY environments
- Displays colorized results using ANSI codes (auto-disabled on Windows)
No binaries, no shell scripts — just Laravel and PHP.
🧩 Supported Commands
| Command | Description |
|---|---|
route:find |
Search registered routes |
command:find |
Search Artisan commands |
config:find |
Search config keys and values |
🧪 Testing
To run the package tests:
composer install
composer test
You can also test it inside a local Laravel app using a path repository:
"repositories": [ { "type": "path", "url": "../artisanfuzzy" } ]
Then run:
composer require rcpassos/artisanfuzzy:@dev php artisan route:find
🛠️ Requirements
- PHP 8.3+
- Laravel 12.x
- Works on macOS, Linux, and Windows terminals
🧭 Roadmap
- Pagination (
:next,:previn picker) - Extend fuzzy search to migrations and events
- Custom scoring algorithm plugin support
❤️ Contributing
Contributions are welcome! If you find a bug or have an idea, open an issue or PR.
To contribute:
git clone https://github.com/rcpassos/artisanfuzzy.git
composer install
composer test
📜 License
ArtisanFuzzy is open-sourced software licensed under the MIT license.
🌟 Acknowledgements
Inspired by the elegance of Laravel’s Artisan CLI and the simplicity of fuzzy searching. Built with ❤️ for the Laravel community.
“Make the command line delightful again.” – ArtisanFuzzy ⚡
rcpassos/artisanfuzzy 适用场景与选型建议
rcpassos/artisanfuzzy 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 10 月 13 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 rcpassos/artisanfuzzy 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 rcpassos/artisanfuzzy 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 22
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-10-13