-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to start, the fast lane to your command line app.
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.
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.
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.
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!
Click a topic in the Wiki sidebar or go to the table of contents.