Back Button PHP

How to Build Command-Line Apps

In this series, we'll learn how how to build command-line apps from scratch, using Symfony's excellent console component. In no time, you'll be whipping up executables to perform all sorts of tasks.

Intermediate
Difficulty
6 episodes
44:50 mins
Start Series
    1. Run Time 1:14 Free

      Ever used Laravel's installer utility? What about Homestead, or Behat, or PHPSpec? If so, then you've indirectly benefited from the Symfony Console component.

    2. Run Time 7:26

      Let's start with the obligatory "hello world" of command line apps.

    3. Now that you've learned about the basic process of registering a command, let's now translate that code to a dedicated class.

    4. To continue our learning, let's review the makeup of Laravel's command-line installer tool. In fact, we'll reproduce it from scratch!

    5. Rendering tabular data to the console is incredibly simple. Let me show you the entire process; it'll only take a moment or two.

    6. Let's put everything we've learned so far to work, as we build a fun little task app that runs on the command line.

      View the source for this lesson on GitHub.