Skip to content
christophberger edited this page Oct 23, 2014 · 3 revisions

Welcome to start, the fast lane to your command line app.

Overview

How start makes your life easier

start takes care of four different but related aspects of your command line app:

  • Commands and sub-commands
  • Flags
  • Environment variables
  • Configuration files

So why not just take a command package, a flag package, an environment variable package, and a config file package? There already exist so many! Well, because those packages don't know each other. start delivers those four features in an intertwined way.

1. A flag is an environment variable is a config file entry.

You can define a flag using the familiar flag syntax, or, for POSIX compliance, the slightly different syntax of the pflag package. With no further effort, you then also have an environment variable and a config file entry available to your application.

2. A command can pick flags for itself.

Rather than introducing a new syntax for defining command-specific flags, start uses a different approach. When you define a command, you can pass it a list of flag names. These flags are then considered as "private" to that command. All other flags are global flags and can be used with any command.

So how does this fit together?

Easy.

First, you define the flags you need.
Second you define your commands and subcommands.
That's it. Now you have commands, flags, environment variables, and config file entries ready to use!

Find out more

Click a topic in the Wiki sidebar or go to the table of contents.