cli-init is the easy way to start building Golang command-line application with codegangsta/cli. All you need to do is to type application name and its subcommand. You can focus on core function of your application.
Here is demo of how command works.
Demo shows building command-line
todo application which has subcommands
delete. You can see artifacts source code on tcnksm/sample-cli-init.
You just type its application name:
$ cli-init [options] [application]
For example, in above demo:
$ cli-init -s add,list,delete todo
You just set sub-commands with
-s option and application name.
Here is artifacts which are generated by above commands.
main.go - defines main function. It includes application name, version, usage, author name and so on.
commands.go - defines sub-commands. It includes subcommand name, usage, function and so on.
version.go - defines application version. default value is
README.md - insctructs application name, synopsis, usage and installation and so on.
CHANGELOG.md - shows version release date and its updates.
See more details codegangsta/cli.
You can install it standard way, you need installation of golang:
$ go get -d github.com/tcnksm/cli-init
$ cd $GOPATH/src/github.com/tcnksm/cli-init
$ make install
Bug & Opinion
Please contact me via twitter or Github Issue