{"id":13623609,"url":"https://github.com/Cilex/Cilex","last_synced_at":"2025-04-15T15:30:34.589Z","repository":{"id":56952876,"uuid":"2609517","full_name":"Cilex/Cilex","owner":"Cilex","description":"Cilex a lightweight framework for creating PHP CLI scripts inspired by Silex","archived":false,"fork":false,"pushed_at":"2023-12-14T21:38:12.000Z","size":104,"stargazers_count":619,"open_issues_count":5,"forks_count":67,"subscribers_count":28,"default_branch":"develop","last_synced_at":"2025-04-11T13:24:52.382Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://cilex.github.io","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/Cilex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2011-10-19T22:21:18.000Z","updated_at":"2025-03-03T18:16:07.000Z","dependencies_parsed_at":"2024-06-18T10:51:39.783Z","dependency_job_id":"68d430da-a385-466f-b571-a40d335f9c18","html_url":"https://github.com/Cilex/Cilex","commit_stats":{"total_commits":84,"total_committers":27,"mean_commits":3.111111111111111,"dds":0.6904761904761905,"last_synced_commit":"4803627c70503122882556086fb9403b9c01f748"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cilex%2FCilex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cilex%2FCilex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cilex%2FCilex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cilex%2FCilex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cilex","download_url":"https://codeload.github.com/Cilex/Cilex/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248593733,"owners_count":21130312,"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":[],"created_at":"2024-08-01T21:01:33.721Z","updated_at":"2025-04-15T15:30:34.226Z","avatar_url":"https://github.com/Cilex.png","language":"PHP","readme":"Cilex, a simple Command Line Interface framework\n================================================\n\nCilex is a simple command line application framework to develop simple tools\nbased on [Symfony2][1] components:\n\n```php\n\u003c?php\nif (!$loader = include __DIR__.'/vendor/autoload.php') {\n    die('You must set up the project dependencies.');\n}\n\n$app = new \\Cilex\\Application('Cilex');\n$app-\u003ecommand(new \\Cilex\\Command\\GreetCommand());\n$app-\u003ecommand('foo', function ($input, $output) {\n    $output-\u003ewriteln('Example output');\n});\n$app-\u003erun();\n```\n\nCilex works with PHP 5.5.9 or later and is heavily inspired by the [Silex][2]\nweb micro-framework by Fabien Potencier.\n\n## Installation\n\n 1. `git clone` _this_ repository.\n 2. Download composer: `curl -s https://getcomposer.org/installer | php`\n 3. Install Cilex' dependencies: `php composer.phar install`\n\n\u003c!--\n## More Information\n\nRead the [documentation][4] for more information.\n--\u003e\n\n## Usage\n\n - Create your new commands in `src/Cilex/Command/`\n - Add your new commands to `bin/run.php`\n - Run the commands as:\n```sh\n./bin/run.php demo:greet world\n./bin/run.php demo:greet world -y\n./bin/run.php demo:greet world --yell\n./bin/run.php demo:info\n```\n\n## Creating a PHAR\n\n - Download and install [box][5]:\n```sh\ncurl -LSs https://box-project.github.io/box2/installer.php | php\nchmod +x box.phar\nmv box.phar /usr/local/bin/box\n```\n - Update the project phar config in box.json\n - Create the package:\n```sh\nbox build\n```\n - Run the commands:\n```sh\n./cilex.phar demo:greet world\n./cilex.phar demo:greet world -y\n./cilex.phar demo:greet world --yell\n./cilex.phar demo:info\n```\n - enjoy a lot.\n\n## License\n\nCilex is licensed under the MIT license.\n\n[1]: http://symfony.com\n[2]: http://silex.sensiolabs.org\n[3]: http://cilex.github.com/get/cilex.phar\n[4]: http://cilex.github.com/documentation\n[5]: https://box-project.github.io/box2/\n\n## FAQ\n\nQ: How do I pass configuration into the application?\n\nA: You can do this by adding the following line, where $configPath is the path to the configuration file you want to use:\n\n```php\n$app-\u003eregister(new \\Cilex\\Provider\\ConfigServiceProvider(), array('config.path' =\u003e $configPath));\n```\n\nThe formats currently supported are: YAML, XML and JSON\n","funding_links":[],"categories":["命令行","目录","Table of Contents","PHP","命令行 Command Line","Command Line","命令行( Command Line )"],"sub_categories":["命令行 Command Line","Command Line"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCilex%2FCilex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCilex%2FCilex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCilex%2FCilex/lists"}