Download the PHP package simsoft/console without Composer
On this page you can find all versions of the php package simsoft/console. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download simsoft/console
More information about simsoft/console
Files in simsoft/console
Package console
Short Description A lightweight, Laravel-inspired wrapper for Symfony Console — build PHP CLI commands with less boilerplate.
License MIT
Homepage https://github.com/sim-soft/console
Informations about the package console
Simsoft Console
A lightweight, Laravel-inspired wrapper for Symfony Console — build PHP CLI commands with less boilerplate.
Requirements
- PHP 8.2+
- Symfony Console ^7.4 || ^8.0
- Symfony Lock ^7.4 || ^8.0
- dragonmantank/cron-expression ^3.4
- psr/container ^2.0
Installation
Quick Start
Output is timestamped by default; set protected bool $messageTimeStamp = false;
on a command to turn the prefix off. On Windows the shebang is ignored, so run
php console screen:welcome instead.
Documentation
| Topic | Description |
|---|---|
| Creating Commands | Class-based and closure commands |
| Console Input | Arguments, options, and retrieval methods |
| Writing Output | Formatted messages, timestamps, newlines |
| Helpers | Question, table, progress bar, progress indicator, tree |
| Calling Commands | Call from other commands or application code |
| Command Locking | Prevent parallel execution |
| Dependency Injection | PSR-11 container, resolve(), constructor injection |
| Task Scheduling | Cron scheduling, hooks, overlap, output capture, pings |
| Logging | PSR-3 logging via DI container |
| Traits | DateRangeOption, DateOption, FileOption, DryRun, Retry, OutputFormat, etc. |
API Quick Reference
Application
| Method | Description |
|---|---|
Application::make($name, $version) |
Create instance |
->withContainer(ContainerInterface) |
Set PSR-11 container |
->withCommands(array $classes) |
Register commands |
->withScheduler(Closure) |
Configure scheduler |
->run() |
Run the application |
Application::call($name, $input, $silently) |
Execute programmatically |
Command
| Method | Description |
|---|---|
$this->argument($name, $default) |
Get argument |
$this->option($name, $default) |
Get option |
$this->info($msg) / error() / comment() / line() |
Output |
$this->ask() / secret() / confirm() / choice() |
Prompts |
$this->table($headers, $rows) |
Render table |
$this->withProgressBar($data, $callback) |
Progress bar |
$this->createProgressBar($max) |
Manual progress bar |
$this->createProgressIndicator() |
Indeterminate progress spinner |
$this->tree($root, $values) |
Render tree structure |
$this->call($name, $input) / callSilently() |
Call commands |
$this->resolve($id) / hasService($id) |
DI container access |
Comparison with Alternatives
| Simsoft Console | Symfony Console | Laravel Zero | Silly | |
|---|---|---|---|---|
| Dependencies | 4 | 0 (is the dep) | 30+ | 2 |
| Install size | ~100KB + Symfony | ~600KB | ~15MB+ | ~30KB + Symfony |
| Command style | Class + Closures | Class only | Class | Closures only |
| DI Container | ✅ PSR-11 | ❌ | ✅ | ✅ |
| Scheduler | ✅ Full-featured | ❌ | ✅ | ❌ |
| Command locking | ✅ Built-in | Manual | ❌ | ❌ |
| Overlap prevention | ✅ Symfony Lock | ❌ | ✅ | ❌ |
| Conditional scheduling | ✅ when(), skip(), between() |
❌ | ✅ | ❌ |
| Output capture | ✅ | ❌ | ✅ | ❌ |
| Background execution | ✅ | ❌ | ✅ | ❌ |
| Webhook/ping | ✅ | ❌ | ✅ | ❌ |
| Maintenance mode | ✅ | ❌ | ✅ | ❌ |
| Reusable traits | ✅ 8 traits | ❌ | ❌ | ❌ |
Development
composer coverage needs a coverage driver. If composer test prints
"No code coverage driver available", install one:
Or run it in a container without touching your local PHP. The php images
carry no composer, so this calls the binaries directly:
Match the image tag to the PHP version vendor/ was installed with, or
Composer's platform check rejects it. On Git Bash, prefix with
MSYS_NO_PATHCONV=1 so the container paths are not rewritten.
CI enforces the floor on every push, so a drop fails the build rather than going unnoticed.
License
MIT — See LICENSE for details.
All versions of console with dependencies
dragonmantank/cron-expression Version ^3.4
psr/container Version ^2.0
symfony/console Version ^7.4 || ^8.0
symfony/lock Version ^7.4 || ^8.0