{"id":13532760,"url":"https://github.com/mnapoli/silly","last_synced_at":"2025-05-13T19:11:57.590Z","repository":{"id":27221699,"uuid":"30692848","full_name":"mnapoli/silly","owner":"mnapoli","description":"Silly CLI micro-framework based on Symfony Console","archived":false,"fork":false,"pushed_at":"2024-10-30T12:32:35.000Z","size":556,"stargazers_count":925,"open_issues_count":4,"forks_count":52,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-05-05T20:04:17.644Z","etag":null,"topics":["cli","micro-framework","php","symfony-console"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mnapoli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"mnapoli","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":"packagist/mnapoli/silly","community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2015-02-12T08:26:55.000Z","updated_at":"2025-04-12T19:12:45.000Z","dependencies_parsed_at":"2024-02-01T18:14:26.714Z","dependency_job_id":"d7b28fea-f0e7-4283-90c2-dc809ac40863","html_url":"https://github.com/mnapoli/silly","commit_stats":{"total_commits":125,"total_committers":23,"mean_commits":5.434782608695652,"dds":0.376,"last_synced_commit":"3ff92aab46f365eb341c581dcba074f812420827"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mnapoli%2Fsilly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mnapoli%2Fsilly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mnapoli%2Fsilly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mnapoli%2Fsilly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mnapoli","download_url":"https://codeload.github.com/mnapoli/silly/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253814917,"owners_count":21968559,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","micro-framework","php","symfony-console"],"created_at":"2024-08-01T07:01:13.554Z","updated_at":"2025-05-13T19:11:57.570Z","avatar_url":"https://github.com/mnapoli.png","language":"PHP","readme":"---\ncurrentMenu: home\n---\nSilly CLI micro-framework based on Symfony Console.\n\n[![Build Status](https://img.shields.io/travis/mnapoli/silly/master.svg?style=flat-square)](https://travis-ci.org/mnapoli/silly)\n[![Coverage Status](https://img.shields.io/coveralls/mnapoli/silly/master.svg?style=flat-square)](https://coveralls.io/r/mnapoli/silly?branch=master)\n[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/mnapoli/silly.svg?style=flat-square)](https://scrutinizer-ci.com/g/mnapoli/silly/?branch=master)\n[![Packagist](https://img.shields.io/packagist/dt/mnapoli/silly.svg?maxAge=2592000)](https://packagist.org/packages/mnapoli/silly)\n\nProfessional support for Silly [is available via Tidelift](https://tidelift.com/subscription/pkg/packagist-mnapoli-silly?utm_source=packagist-mnapoli-silly\u0026utm_medium=referral\u0026utm_campaign=readme)\n\n- [Video introduction in french](https://www.youtube.com/watch?v=aoE1FDN5_8s)\n\n## Installation\n\n```bash\n$ composer require mnapoli/silly\n```\n\n## Usage\n\nExample of a Silly application:\n\n```php\nuse Symfony\\Component\\Console\\Output\\OutputInterface;\n\n$app = new Silly\\Application();\n\n$app-\u003ecommand('greet [name] [--yell]', function ($name, $yell, OutputInterface $output) {\n    $text = $name ? \"Hello, $name\" : \"Hello\";\n\n    if ($yell) {\n        $text = strtoupper($text);\n    }\n\n    $output-\u003ewriteln($text);\n});\n\n$app-\u003erun();\n```\n\nRunning the application is the same as running any other Symfony Console application:\n\n```bash\n$ php application.php greet\nHello\n$ php application.php greet john --yell\nHELLO JOHN\n$ php application.php greet --yell john\nHELLO JOHN\n```\n\n`Silly\\Application` extends `Symfony\\Console\\Application` and can be used wherever Symfony's Application can.\n\n## Documentation\n\n- [Command definition](docs/command-definition.md)\n- [Command callables](docs/command-callables.md)\n- [Console helpers](docs/helpers.md)\n- [Dependency injection](docs/dependency-injection.md)\n    - [The PHP-DI edition](docs/php-di.md)\n    - [The Pimple edition](docs/pimple.md)\n\n## Do more\n\nSilly is just an implementation over the Symfony Console. Read [the Symfony documentation](http://symfony.com/doc/current/components/console/introduction.html) to learn everything you can do with it.\n\n## Example applications\n\nInterested in seeing examples of Silly applications? Have a look at this short selection:\n\n- [Bref](https://github.com/mnapoli/bref/blob/c11662125d3d6cf3f96ee82c9e6fc60d9bcbbfdd/bref)\n- [Laravel Valet](https://github.com/laravel/valet/blob/7ed0280374340b30f1e2698fe85d7db543570f57/cli/valet.php)\n- [Blacksmith](https://github.com/mpociot/blacksmith/blob/320e97b9677f9e885d1f478593143f329afb9510/blacksmith)\n- [Documentarian](https://github.com/mpociot/documentarian/blob/34189ff3357aa3b013930b471410f135f09792de/documentarian)\n\n## Contributing\n\nSee the [CONTRIBUTING](CONTRIBUTING.md) file.\n","funding_links":["https://github.com/sponsors/mnapoli","https://tidelift.com/funding/github/packagist/mnapoli/silly","https://tidelift.com/subscription/pkg/packagist-mnapoli-silly?utm_source=packagist-mnapoli-silly\u0026utm_medium=referral\u0026utm_campaign=readme"],"categories":["PHP","Table of Contents","目录","命令行( Command Line )","[PHP](https://www.php.net/)","Additional Languages"],"sub_categories":["Micro Frameworks","微框架 micro-frameworks","Useful awesome list for Go cli","PHP 🐘"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmnapoli%2Fsilly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmnapoli%2Fsilly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmnapoli%2Fsilly/lists"}