spatie/code-outliner
CLI tool to visualize your code structure by generating outline images of files or directories. Overlay multiple files to spot dense or repetitive areas and improve readability. Requires Puppeteer via spatie/browsershot; install globally via Composer.
php-svg (for SVG generation) and php-gd (for PNG).storage/app/code-outlines/).| Risk Area | Severity | Mitigation Strategy |
|---|---|---|
| Deprecated PHP | High | Test with PHP 8.2+; patch if needed. |
| SVG/PNG Generation | Medium | Validate output quality; consider fallback. |
| No Active Maintenance | Medium | Fork if critical bugs arise; monitor issues. |
| Performance | Low | Benchmark for large codebases (>10K LOC). |
php artisan code:outline) to generate outlines for a given file/directory.config/app.php and bind it to a service container for reusable logic./api/code-outline) to generate outlines on demand (e.g., for a web IDE).Illuminate\Foundation\Events\Booted or custom events (e.g., after deployment).post-install-cmd or post-autoload-dump to auto-generate outlines.composer require spatie/code-outliner.app/Http/Controllers/HomeController.php).Illuminate\ classes).package.json scripts or .gitlab-ci.yml.ext-svg and ext-gd are installed (common in shared hosting).App\ vs. Database\ vs. Tests\ hierarchies.app/Models/GeneratedModel.php).Illuminate\).php-svg/php-gd may need updates for PHP 8+.php artisan code:outline --verbose.cache()->remember()).spatie/fork).| Failure Scenario | Impact | Mitigation |
|---|---|---|
| PHP Extension Missing | No output generated | Document prerequisites; auto-check in CI. |
| Permission Denied | Can’t write to storage | Set up storage symlinks early. |
| Out-of-Memory (Large Files) | Crash or corrupted output | Limit file size or use chunking. |
| Package Deprecation | Broken functionality | Fork and maintain. |
| Laravel Version Incompatibility | Artisan command fails | Test on a staging environment first. |
php artisan code:outline.How can I help you explore Laravel packages today?