1*Jump to [source](git-derive.rs)* 2 3**This requires enabling the `derive` feature flag.** 4 5Git is an example of several common subcommand patterns. 6 7Help: 8```bash 9$ git-derive 10? failed 11git 12A fictional versioning CLI 13 14USAGE: 15 git-derive[EXE] <SUBCOMMAND> 16 17OPTIONS: 18 -h, --help Print help information 19 20SUBCOMMANDS: 21 add adds things 22 clone Clones repos 23 help Print this message or the help of the given subcommand(s) 24 push pushes things 25$ git-derive help 26git 27A fictional versioning CLI 28 29USAGE: 30 git-derive[EXE] <SUBCOMMAND> 31 32OPTIONS: 33 -h, --help Print help information 34 35SUBCOMMANDS: 36 add adds things 37 clone Clones repos 38 help Print this message or the help of the given subcommand(s) 39 push pushes things 40$ git-derive help add 41git-derive[EXE]-add 42adds things 43 44USAGE: 45 git-derive[EXE] add <PATH>... 46 47ARGS: 48 <PATH>... Stuff to add 49 50OPTIONS: 51 -h, --help Print help information 52``` 53 54A basic argument: 55```bash 56$ git-derive add 57? failed 58git-derive[EXE]-add 59adds things 60 61USAGE: 62 git-derive[EXE] add <PATH>... 63 64ARGS: 65 <PATH>... Stuff to add 66 67OPTIONS: 68 -h, --help Print help information 69$ git-derive add Cargo.toml Cargo.lock 70Adding ["Cargo.toml", "Cargo.lock"] 71``` 72 73External subcommands: 74```bash 75$ git-derive custom-tool arg1 --foo bar 76Calling out to "custom-tool" with ["arg1", "--foo", "bar"] 77``` 78