On the TutsPlus.com site there's a new tutorial posted showing you how to use the Symfony Console component to create custom CLI commands.
In this article, we're going to explore how you could create custom command-line interface (CLI) commands in your PHP applications using the Symfony Console component. After installing the necessary libraries, we'll create a few handful of examples to demonstrate the concepts of the Console component.
In fact, this component is used by several PHP frameworks to develop CLI applications, and a few popular frameworks are already using this component as a starting point.
The tutorial starts with a brief introduction to the Console component and what kind of features it offers. Following this it includes the instructions to get the component installed, configured and shows the creation of a first "hello world" command. With some of the basics in place, the tutorial then moves on to a more real-world example showing the creation of a "clear cache" command that includes a "groups" input option.