{"id":16646938,"url":"https://github.com/stevegrunwell/building-for-php-cli","last_synced_at":"2025-03-21T16:31:05.683Z","repository":{"id":139392388,"uuid":"55571727","full_name":"stevegrunwell/building-for-php-cli","owner":"stevegrunwell","description":"Slides for \"Building for the PHP Command Line Interface\"","archived":false,"fork":false,"pushed_at":"2024-04-24T21:56:44.000Z","size":13692,"stargazers_count":15,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-18T02:51:47.582Z","etag":null,"topics":["artisan","php-cli","reveal-js","symfony-console","wp-cli"],"latest_commit_sha":null,"homepage":"http://stevegrunwell.github.io/building-for-php-cli/","language":"CSS","has_issues":false,"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/stevegrunwell.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-04-06T03:00:54.000Z","updated_at":"2024-04-24T21:56:20.000Z","dependencies_parsed_at":"2024-10-28T11:26:23.443Z","dependency_job_id":"6ad90adf-477a-4df7-9dbb-6dacbd5b561e","html_url":"https://github.com/stevegrunwell/building-for-php-cli","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevegrunwell%2Fbuilding-for-php-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevegrunwell%2Fbuilding-for-php-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevegrunwell%2Fbuilding-for-php-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevegrunwell%2Fbuilding-for-php-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stevegrunwell","download_url":"https://codeload.github.com/stevegrunwell/building-for-php-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244829439,"owners_count":20517305,"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":["artisan","php-cli","reveal-js","symfony-console","wp-cli"],"created_at":"2024-10-12T08:43:28.307Z","updated_at":"2025-03-21T16:31:05.172Z","avatar_url":"https://github.com/stevegrunwell.png","language":"CSS","readme":"# Building for the PHP Command Line Interface\n\nExecuting PHP from the command line enables us to interact with our applications in new and interesting ways: from performing site maintenance to scaffolding new projects, CLI tools like [WP-CLI](http://wp-cli.org/), [Artisan](https://laravel.com/docs/5.1/artisan), and [Drush](http://www.drush.org/en/master/) make it easy to interface with our code without ever opening a browser.\n\nAttendees will be introduced to popular PHP CLI tools and their default capabilities. We'll discuss characteristics of good CLI scripts, strong use-cases for writing custom commands, then write several CLI programs across different platforms.\n\n:sparkles: **[View slides](https://stevegrunwell.github.io/building-for-php-cli)** :sparkles:\n\nThis presentation also has [a companion repository, full of executable examples from this presentation](https://github.com/stevegrunwell/php-cli-examples).\n\n### Demonstrated Tools\n\n* [Symfony Console Component](http://symfony.com/doc/current/components/console/introduction.html)\n* [PHP-CLI Tools](https://github.com/wp-cli/php-cli-tools)\n* [CLImate](https://climate.thephpleague.com/)\n\n### Platform-specific CLI tools\n\n* [WP-CLI](https://wp-cli.org)\n* [Laravel Artisan](https://laravel.com/docs/master/artisan)\n* [Drush](https://www.drush.org)\n* [Joomlatools Console](https://www.joomlatools.com/developer/tools/console)\n\n### Additional Resources\n\n* [Building PHP Daemons and Long Running Processes](https://prezi.com/pymsnzwlieqt/building-php-daemons-and-long-running-processes-tek15/) - Talk from php[tek] 2015 by [Tim Lytle](http://timlytle.net)\n* [Writing WP-CLI Commands That Work!](https://stevegrunwell.com/slides/wp-cli) - Sister talk focused on writing WP-CLI commands\n* [What are Exit Codes in Linux?](https://itsfoss.com/linux-exit-codes/) - Explanation of standard exit codes and their meanings\n* [Understanding Exit Codes and How to Use Them in Bash Scripts](http://bencane.com/2014/09/02/understanding-exit-codes-and-how-to-use-them-in-bash-scripts/) - Article by Benjamin Cane\n* [Flysystem](https://flysystem.thephpleague.com) - Popular package for filesystem operations across environments\n* [Cropping and Resizing Animated Gifs with Gifsicle](https://stevegrunwell.com/blog/cropping-resizing-gifsicle/) - Blog post explaining how to create animated thumbnails for gifs, which relies on calling [Gifsicle](https://www.lcdf.org/gifsicle/) via [`passthru()`](https://www.php.net/manual/en/function.passthru.php)\n\n## Presentation History\n\n* [php[tek] 2024](https://tek.phparch.com) — April 24, 2024 ([Joind.in](https://joind.in/event/phptek-2024/building-for-the-php-command-line-interface), [PDF](https://github.com/stevegrunwell/building-for-php-cli/releases/download/phptek-2024/slides.pdf))\n* [Midwest PHP 2019](https://2019.midwestphp.org/) — March 8, 2019 ([Joind.in](https://joind.in/talk/b9a05), [PDF](https://github.com/stevegrunwell/building-for-php-cli/releases/download/midwest-php/slides.pdf))\n* [WavePHP 2018](https://wavephp.com/) — September 20, 2018 ([Joind.in](https://joind.in/talk/6908c), [PDF](https://github.com/stevegrunwell/building-for-php-cli/releases/download/wavephp-2018/slides.pdf))\n* [Southeast PHP](https://southeastphp.com/) - August 17, 2018 ([Joind.in](https://joind.in/talk/ed2e4), [PDF](https://github.com/stevegrunwell/building-for-php-cli/releases/download/southeastphp-2018/slides.pdf))\n* [PHPDetroit](https://phpdetroit.io/) - July 28, 2018 ([Joind.in](https://joind.in/talk/e6d00), [PDF](https://github.com/stevegrunwell/building-for-php-cli/releases/download/phpdetroit-2018/slides.pdf))\n* [php[tek] 2018](https://tek18.phparch.com/speakers/steve-grunwell/) - May 31, 2018 ([Joind.in](https://joind.in/talk/c6025), [PDF](https://github.com/stevegrunwell/building-for-php-cli/releases/download/phptek-2018/slides.pdf))\n* [Music City Code 2017](https://www.musiccitycode.com/) - June 3, 2017\n* [CodeMash 2017](http://www.codemash.org/) - January 13, 2017\n* [Nomad PHP (EU)](https://nomadphp.com/nomadphp-2016-12-eu/) – December 15, 2016 ([Joind.in](https://joind.in/talk/dce28))\n* [php[tek] 2016](https://tek16.phparch.com/speakers/#66432) – May 27, 2016 ([Joind.in](https://joind.in/talk/ce9a4))\n* [Columbus PHP Meetup](http://www.meetup.com/phpphp/events/229434721/) – April 13, 2016 ([Joind.in](https://joind.in/talk/e9465))\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstevegrunwell%2Fbuilding-for-php-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstevegrunwell%2Fbuilding-for-php-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstevegrunwell%2Fbuilding-for-php-cli/lists"}