-
Builder-style API.
cli.Flag(). WithArgument(cli.Argument(). WithName("file"). Require())
-
Build singular command applications or command trees.
cli.Command() // OR cli.Tree()
-
Overridable automatic help text generation.
Usage: my-app [options] <command> This is a simple command tree example. Flags -h | --help Prints this help text. Commands fizz Aliases: fi This is the description for the fizz branch. foo Aliases: fo this is the description for the foo branch
-
Bind command line arguments to variables of arbitrary types.
foo := uint8(0) cli.Argument().WithBinding(&foo)
-
Multi-use flags.
$ foo --bar --bar --bar bar = 3
-
Stackable short flags.
$ app -abc=4 a = true b = true c = 4
-
Callback hooks.
cli.Flag().WithCallback(func(Flag){}) cli.Command().WithCallback(func(Command){}) cli.Tree().WithCallback(func(Tree){}) cli.Branch().WithCallback(func(Branch){}) cli.Leaf().WithCallback(func(Leaf){})
-
Customizable or overridable unmarshalling of almost any type.
var options argo.UnmarshalProps ... cli.Argument().WithUnmarshaler(argo.NewMagicUnmarshaler(options))
-
Default values for flags and arguments.
var foo int32 cli.Argument().WithBinding(&foo).WithDefault(int32(666))
-
Input validation hooks.
var bind uint8 cli.Argument(). WithBinding(&bind) WithValidator(func(string) {}). WithValidator(func(string, int8) {})
-
Automatic capturing of "passthrough" flags and arguments.
$ foo bar --fizz=buzz -- apple banana canteloupe Passthroughs: apple, banana, canteloupe
-
And more!
-
Notifications
You must be signed in to change notification settings - Fork 1
Builder style CLI creation kit.
License
Foxcapades/Argonaut
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Builder style CLI creation kit.