GithubHelp home page GithubHelp logo

cli-init's Introduction

cli-init Build Status Coverage Status MIT License

The easy way to start building Golang command-line application.

Description

cli-init is the easy way to start building Golang command-line application with codegangsta/cli. All you need to do is to set application name and its subcommand. cli-init generates its templates (scaffold) which you need to write when using codegangsta/cli. You can focus on core functionality of application.

Demo

Usage

You just need to set its application name:

$ cli-init [options] [application]

You can set subcommands with -s option:

$ cli-init -s subcommand1,subcommand2,subcommand3 [application]

Artifacts

cli-init generates templates (scaffold) which you need to write when using codegangsta/cli:

  • 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 0.1.0
  • 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.

Example

If you want to start to building todo application which has subcommands add, list, delete:

$ cli-init -s add,list,delete todo

You can see sample of artifacts in tcnksm/sample-cli-init.

Installation

To install, use go get and make install. We tag versions so feel free to checkout that tag and compile.

$ go get -d github.com/tcnksm/cli-init
$ cd $GOPATH/src/github.com/tcnksm/cli-init
$ make install 

Contribution

  1. Fork (https://github.com/tcnksm/cli-init/fork)
  2. Create a feature branch
  3. Commit your changes
  4. Rebase your local changes against the master branch
  5. Run test suite with the go test ./... command and confirm that it passes
  6. Run gofmt -s
  7. Create new Pull Request

Author

tcnksm

cli-init's People

Contributors

aaronraimist avatar tcnksm avatar tomohiro avatar yuroyoro avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.