PHPackages                             rreynaldo/baby - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. rreynaldo/baby

ActiveLibrary[CLI &amp; Console](/categories/cli)

rreynaldo/baby
==============

Commander CLI micro-framework based on Symfony Console

33PHP

Since May 25Pushed 4y ago1 watchersCompare

[ Source](https://github.com/rreynaldo/baby)[ Packagist](https://packagist.org/packages/rreynaldo/baby)[ RSS](/packages/rreynaldo-baby/feed)WikiDiscussions main Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Baby: Commander CLI micro-framework based on Symfony Console (commands, schedules)
----------------------------------------------------------------------------------

[](#baby-commander-cli-micro-framework-based-on-symfony-console-commands-schedules)

[![Baby Logo](https://raw.githubusercontent.com/rreynaldo/baby/main/logo.png)](https://github.com/rreynaldo/baby)

Install
-------

[](#install)

> composer require rreynaldo/baby

Script Usage (Similar to Silly): Commander
------------------------------------------

[](#script-usage-similar-to-silly-commander)

```
use Symfony\Component\Console\Output\OutputInterface;

$app = new Baby\Application();
$app->command('hello [name] [--yell]', function ($name, $yell, OutputInterface $output) {
      if ($name) {
          $text = 'Hello, '.$name;
      } else {
          $text = 'Hello';
      }

      if ($yell) {
          $text = strtoupper($text);
      }

      $output->writeln($text);
  });
$app->run();
```

Running
-------

[](#running)

Running the application is the same as running any other Symfony Console application:

```
$ php app.php hello
$ php app.php hello john --yell
$ php app.php hello --yell john
```

### Project Usage (Recommended user Baby Skeleton):

[](#project-usage-recommended-user-baby-skeleton)

```
