{"id":18929427,"url":"https://github.com/thecodingmachine/utils.console","last_synced_at":"2025-10-07T14:50:36.441Z","repository":{"id":32251529,"uuid":"35825869","full_name":"thecodingmachine/utils.console","owner":"thecodingmachine","description":"A console to work with Mouf-PHP framework from the command-line","archived":false,"fork":false,"pushed_at":"2022-12-01T17:44:24.000Z","size":83,"stargazers_count":0,"open_issues_count":0,"forks_count":3,"subscribers_count":14,"default_branch":"1.0","last_synced_at":"2025-09-30T05:47:13.585Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thecodingmachine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-18T15:26:23.000Z","updated_at":"2022-12-01T17:44:07.000Z","dependencies_parsed_at":"2023-01-14T20:50:29.739Z","dependency_job_id":null,"html_url":"https://github.com/thecodingmachine/utils.console","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/thecodingmachine/utils.console","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Futils.console","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Futils.console/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Futils.console/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Futils.console/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thecodingmachine","download_url":"https://codeload.github.com/thecodingmachine/utils.console/tar.gz/refs/heads/1.0","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Futils.console/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278431361,"owners_count":25985670,"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","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-11-08T11:32:39.833Z","updated_at":"2025-10-07T14:50:36.423Z","avatar_url":"https://github.com/thecodingmachine.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Latest Stable Version](https://poser.pugx.org/mouf/utils.console/v/stable.svg)](https://packagist.org/packages/mouf/utils.console)\n[![Latest Unstable Version](https://poser.pugx.org/mouf/utils.console/v/unstable.svg)](https://packagist.org/packages/mouf/utils.console)\n[![License](https://poser.pugx.org/mouf/utils.console/license.svg)](https://packagist.org/packages/mouf/utils.console)\n\nConsole for Mouf PHP framework\n==============================\n\nThis is a simple [Symfony 2 based console](http://symfony.com/doc/current/components/console/introduction.html) for the [Mouf PHP framework](http://mouf-php.com).\n\nWhy?\n----\n\nMouf is a graphical framework, so most of the development is done in the UI.\nHowever, it can sometimes be useful to have a command line interface, to use in\ndeploy scripts or on remote servers... This package provides this command-line.\n\nHow does it work?\n-----------------\n\nSimply include this package in your `composer.json` requirements:\n\n```json\n{\n    \"require\": {\n        \"mouf/utils.console\": \"~1.0\"\n    }\n}\n```\n\nThe command line will be accessible from `vendor/bin/mouf_console`\n\nAdding your own command\n-----------------------\n\nIn order to add a new command to the list of available commands, \nyou must [create a new class extending the `Command` class](http://symfony.com/doc/current/components/console/introduction.html#creating-a-basic-command).\n\nThen, you should create an instance of the class in Mouf user interface.\n\nFinally, the console application is represented by the `console` instance in Mouf.\nEdit this instance, and drag'n'drop your command in the list of known commands:\n\n![The console instance](doc/images/console_instance.png)\n\nPackage developers\n------------------\n\nMost of what you need to know is detailed in [Symfony's doc](http://symfony.com/doc/current/components/console/introduction.html).\n\nIn order to create a new command and register it automatically when you package is installed, you should:\n\n- create [an install script for your package](http://mouf-php.com/packages/mouf/mouf/doc/install_process.md)\n- create an instance of the command in this installation script\n- register this command using `ConsoleUtils::registerCommand($command)`\n\nHere is a sample script you could put in your install script:\n\n```php\nuse Mouf\\Actions\\InstallUtils;\nuse Mouf\\Console\\ConsoleUtils;\nuse Mouf\\MoufManager;\n\n...\n// Let's create an instance of \"ConsoleUtils\"\n$consoleUtils = new ConsoleUtils($moufManager);\n\n// We declare our instance of the Symfony command as a Mouf instance\n$dbalRunSqlCommand = InstallUtils::getOrCreateInstance('dbalRunSqlCommand', 'Doctrine\\\\DBAL\\\\Tools\\\\Console\\\\Command\\\\RunSqlCommand', $moufManager);\n\n// We register that instance descriptor using \"ConsoleUtils\"\n$consoleUtils-\u003eregisterCommand($dbalRunSqlCommand);\n```\n\nNotice how `$dbalRunSqlCommand` is a descriptor of the 'dbalRunSqlCommand' instance and not the instance itself.\n\nIf you need a particular \"helperSet\", you can register it using `ConsoleUtils::registerHelperSet($helperSet)`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecodingmachine%2Futils.console","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthecodingmachine%2Futils.console","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecodingmachine%2Futils.console/lists"}