cleo

Cleo allows you to create beautiful and testable command-line interfaces.

Here are some articles that you may find helpful