| |
| |
Introduction | |
| |
| |
| |
Have a Clear and Concise Purpose | |
| |
| |
| |
Problem 1: Backing Up Data | |
| |
| |
| |
Problem 2: Managing Tasks | |
| |
| |
| |
What Makes an Awesome Command-Line App | |
| |
| |
| |
Moving On | |
| |
| |
| |
Be Easy to Use | |
| |
| |
| |
Understanding the Command Line: Options, Arguments, and Commands | |
| |
| |
| |
Building an Easy-to-Use Command-Line Interface | |
| |
| |
| |
Building an Easy-to-Use Command-Suite Interface | |
| |
| |
| |
Moving On | |
| |
| |
| |
Be Helpful | |
| |
| |
| |
Documenting a Command-Line Interface | |
| |
| |
| |
Documenting a Command Suite | |
| |
| |
| |
Including a Man Page | |
| |
| |
| |
Writing Good Help Text and Documentation | |
| |
| |
| |
Moving On | |
| |
| |
| |
Play Well with Others | |
| |
| |
| |
Using Exit Codes to Report Success or Failure | |
| |
| |
| |
Using the Standard Output and Error Streams Appropriately | |
| |
| |
| |
Formatting Output for Use as Input to Another Program | |
| |
| |
| |
Trapping Signals Sent from Other Apps | |
| |
| |
| |
Moving On | |
| |
| |
| |
Delight Casual Users | |
| |
| |
| |
Choosing Names for Options and Commands | |
| |
| |
| |
Choosing Default Values for Flags and Arguments | |
| |
| |
| |
Deciding Default Behavior | |
| |
| |
| |
Moving On | |
| |
| |
| |
Make Configuration Easy | |
| |
| |
| |
Why External Configuration? | |
| |
| |
| |
Reading External Configuration from Files | |
| |
| |
| |
Using Configuration Files with Command Suites | |
| |
| |
| |
Design Considerations When Using Configuration | |
| |
| |
| |
Moving On | |
| |
| |
| |
Distribute Painlessly | |
| |
| |
| |
Distributing with RubyGems | |
| |
| |
| |
Distributing Without RubyGems | |
| |
| |
| |
Collaborating with Other Developers | |
| |
| |
| |
Moving On | |
| |
| |
| |
Test, Test, Test | |
| |
| |
| |
Testing User Behavior with Acceptance Tests | |
| |
| |
| |
Testing in Isolation with Unit Tests | |
| |
| |
| |
A Word About Test-Driven Development | |
| |
| |
| |
Moving On | |
| |
| |
| |
Be Easy to Maintain | |
| |
| |
| |
Dividing Code into Multiple Files | |
| |
| |
| |
Designing Code for Maintainability | |
| |
| |
| |
Moving On | |
| |
| |
| |
Add Color, Formatting, and Interactivity | |
| |
| |
| |
Adding Color Using ANSI Escape Sequences | |
| |
| |
| |
Formatting Output with Tables | |
| |
| |
| |
Providing Interactive User Input with readline | |
| |
| |
| |
Moving On | |
| |
| |
| |
Common Command-Line Gems and Libraries | |
| |
| |
| |
Alternatives for Simple Command-Line Apps | |
| |
| |
| |
Alternatives for Command Suites | |
| |
| |
| |
Other Relevant Libraries | |
| |
| |
| |
Bibliography | |
| |
| |
Index | |