Recommend this page to a friend! |
Download |
Info | Documentation | Files | Install with Composer | Download | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2024-05-02 (3 months ago) | Not enough user ratings | Total: 4 This week: 1 | All time: 11,423 This week: 59 |
Version | License | PHP version | Categories | |||
easy-cli 1.0.0 | Custom (specified... | 8 | Console, Traits, PHP 8 |
Description | Author | ||||||||
This package can create CLI applications using handler functions. |
|
A simple and easy to use library with no dependencies for creating pretty and organized CLI apps in PHP.
Probably I should have thought of a name for it.
composer require andreypostal/cli
$app = new App(
appName: 'MyApp',
description: 'My app has a cool description',
cmd: 'php cmd',
params: [],
commands: [
new Command(
key: 'run',
description: 'This action will run soon',
service: [
'handler' => static function(Context $context): void {
App::console('It is so easy!!!');
},
],
),
],
);
$app->run($argv);
Andrey Postal - <andreypostal@gmail.com> <br />
CLI is licensed under the Apache License 2.0 - see the LICENSE file for details
Highly inspired by the Go library urfave/cli
Files (34) | / | assets |
File | Role | Description |
---|---|---|
centralized.jpg | Icon | Icon image |
help.jpg | Icon | Icon image |
initial.gif | Data | Auxiliary data |
progress-bar.png | Data | Auxiliary data |
progress-bars.gif | Data | Auxiliary data |
Files (34) | / | doc |
File | Role | Description |
---|---|---|
01-usage.md | Data | Auxiliary data |
02-utilities.md | Data | Auxiliary data |
03-components.md | Data | Auxiliary data |
Files (34) | / | examples |
File | Role | Description | ||
---|---|---|---|---|
BasicHandler (1 file) | ||||
BasicService (2 files) | ||||
BooleanFlag (2 files) | ||||
Complete (3 files) | ||||
InfiniteProgressBar (2 files) | ||||
ParamsValidation (2 files) | ||||
ProgressBar (2 files) |
Files (34) | / | examples | / | BasicService |
File | Role | Description |
---|---|---|
cmd | Class | Class source |
Service.php | Class | Class source |
Files (34) | / | examples | / | BooleanFlag |
File | Role | Description |
---|---|---|
cmd | Class | Class source |
Service.php | Class | Class source |
Files (34) | / | examples | / | Complete |
File | Role | Description |
---|---|---|
app | Example | Example script |
MyCommand.php | Class | Class source |
MyService.php | Class | Class source |
Files (34) | / | examples | / | InfiniteProgressBar |
File | Role | Description |
---|---|---|
cmd | Class | Class source |
Service.php | Class | Class source |
Files (34) | / | examples | / | ParamsValidation |
File | Role | Description |
---|---|---|
cmd | Class | Class source |
Service.php | Class | Class source |
Files (34) | / | examples | / | ProgressBar |
File | Role | Description |
---|---|---|
cmd | Class | Class source |
Service.php | Class | Class source |
Files (34) | / | src |
File | Role | Description | ||
---|---|---|---|---|
Components (2 files) | ||||
Exceptions (1 file) | ||||
Types (4 files) | ||||
Utils (1 file) | ||||
App.php | Class | Class source |
Files (34) | / | src | / | Components |
File | Role | Description |
---|---|---|
InfiniteProgressBar.php | Class | Class source |
ProgressBar.php | Class | Class source |
Files (34) | / | src | / | Types |
File | Role | Description |
---|---|---|
Command.php | Class | Class source |
ConsoleLevel.php | Aux. | Auxiliary script |
Context.php | Class | Class source |
Param.php | Class | Class source |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
Install with Composer |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.