GithubHelp home page GithubHelp logo

hfm / gcli Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tcnksm/gcli

0.0 2.0 0.0 2.69 MB

The easy way to build Golang command-line application.

License: MIT License

Makefile 0.97% Go 98.47% Shell 0.56%

gcli's Introduction

gcli

MIT License Go Documentation

gcli (formerly cli-init) generates the codes and its directory structure you need to start building CLI tool right out of the box. All you need is to provide name, commands and framework you want to use.

Usage

To start new command line tool,

$ gcli new [options] NAME

It generates new cli skeleton project. At least, you must provide executable name.

See more usage,

$ gcli help

Example

If you want to create todo CLI application which has add, list and delete command with mitchellh/cli framework,

$ cd $GOPATH/src/github.com/YOUR_NAME
$ gcli new -F mitchellh_cli -c add -c list -c delete todo

You can run go build todo application from beginning.

Support frameworks

gcli supports bellow cli frameworks,

gcli has tempaltes of these frameworks. Template file includes best practices of each frameworks like how to separate file or how to set directory structure and so on.

In future, we will also suppport other CLI frameworks like below (Need help),

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/gcli
$ cd $GOPATH/src/github.com/tcnksm/gcli
$ make install 

gcli was re-written from scratch. If you prefer old version of gcli, checkout,

$ git checkout v0.1.0

Contribution

  1. Fork (https://github.com/tcnksm/gcli/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 make test command and confirm that it passes
  6. Run gofmt -s
  7. Create a new Pull Request

Author

Taichi Nakashima

gcli's People

Contributors

aaronraimist avatar hfm avatar suzukaze avatar tcnksm avatar tomohiro avatar yuroyoro avatar yuya-takeyama 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.