Weave Code
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

Silly Laravel Package

mnapoli/silly

Silly is a lightweight CLI micro-framework built on Symfony Console. Define commands with simple signatures and PHP callables, get options/arguments parsing, helpers, and DI integration (PHP-DI or Pimple) while staying compatible with Symfony Console apps.

View on GitHub
Deep Wiki
Context7

Silly CLI micro-framework based on Symfony Console

Frequently asked questions about Silly
Can I use Silly to create Laravel Artisan-like commands without full Laravel bootstrapping?
Yes, Silly is designed for lightweight CLI tools. You can define commands with closures or classes, inject Laravel services (like Eloquent models or repositories), and run them via `php artisan silly:command` without loading the full Laravel framework. It’s ideal for internal scripts or automation tasks where you want to avoid Laravel’s overhead.
How do I install Silly in a Laravel project?
Install Silly via Composer with `composer require mnapoli/silly`. No additional configuration is required if you’re using Laravel 10+. For older Laravel versions, ensure your `symfony/console` version is compatible (e.g., ^6.4 for Laravel 10). Silly works alongside Artisan, so no conflicts will arise.
Will Silly work with Laravel’s Service Container for dependency injection?
Absolutely. Silly leverages Laravel’s Service Container for dependency injection. You can type-hint dependencies like repositories or Eloquent models in your command constructors, and Laravel will automatically resolve them. This makes it easy to reuse existing Laravel services in your CLI tools.
Does Silly support Pimple for dependency management?
Yes, Silly optionally supports Pimple for dependency management if you prefer a lighter alternative to Laravel’s container. You can configure Pimple alongside Laravel’s container or use it standalone for simpler CLI tools. This flexibility is useful if you’re building tools outside Laravel’s ecosystem.
What Laravel versions does Silly support?
Silly is officially tested with Laravel 10+ and requires PHP 8.1+. For older Laravel versions (e.g., 9.x), you’ll need to manually ensure compatibility with the `symfony/console` version used by your Laravel installation. Always check the package’s dependencies for version constraints.
Can I use Silly commands in production environments?
Yes, Silly commands are production-ready. They can be integrated into deployment pipelines, cron jobs, or used as part of Laravel’s Artisan ecosystem. Just ensure your commands include proper error handling, logging, and validation to match your production standards.
How do I test Silly commands in Laravel?
Test Silly commands using Laravel’s built-in testing tools. For integration tests, use `Artisan::call()` to simulate command execution. For unit tests, mock dependencies via Laravel’s container or Pimple. Silly’s design makes it easy to isolate and test individual commands without bootstrapping the full Laravel application.
What’s the difference between Silly and Laravel’s native Artisan?
Silly is a micro-framework built on Symfony Console, offering more flexibility for modular CLI tools. While Artisan is great for Laravel-specific tasks, Silly allows you to define commands with closures, type-hinted arguments, and optional Pimple support—making it ideal for reusable scripts or tools that might evolve outside Laravel’s core.
Can I extend Silly commands to interact with Laravel’s database or queues?
Yes, Silly commands can fully interact with Laravel’s database (via Eloquent) or queues (via Laravel’s queue system). Since Silly integrates with Laravel’s Service Container, you can inject repositories, queue connections, or database connections directly into your command classes. This makes it seamless to build CLI tools that perform database operations or trigger queue jobs.
Is Silly suitable for large-scale CLI applications, or just small scripts?
Silly is best suited for small-to-medium CLI tools, internal scripts, or automation tasks where you want to avoid the overhead of a full Laravel application. For large-scale CLI applications, consider Laravel Zero or standalone Symfony Console, as Silly’s micro-framework design prioritizes simplicity over scalability. However, it’s perfect for teams already using Laravel and needing modular CLI commands.
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.
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope