Skip to content

A template powered by cookiecutter for building a command-line interface in Golang using the mitchelh/cli framework.

License

Notifications You must be signed in to change notification settings

srizzling/cookiecutter-golang-cli

Repository files navigation

cookiecutter-golang-cli

A template powered by cookiecutter for building a command-line interface in Golang using the cli framework. If you know me professionally - you know I love writing scripts/cli/programs to automate my development and operational workflow. I find myself copying a bunch of stuff from different projects - so this template reflects the typical cli project I would create. Buyer Beware - alot of the choice I make in this project is personal preference!

See this repo for an example project generated from the most recent version of the template.

Use it now

If you don't have cookiecutter installed. You'll need to install that first using Python's pip command (note: Python >= 3.6 is required)

$ pip install cookiecutter

alternatively you can install cookiecutter via brew

$ brew install cookiecutter

After the cookiecutter dependancy is available in your path - you can run the following:

$ cookiecutter https://github.com/srizzling/cookiecutter-golang-cli.git

You will be asked about your basic info (name, project name, app name, etc.). This info will be used in your new project.

Features

  • Uses the cli framework. (the framework that powers terraform, waypoint, etc)
  • Generous Makefile with management commands
  • Works with either in a global GOPATH or with a local vendor directory
  • Uses go modules for dependency management
  • Uses logrus for logging
  • Configures and sets up gitmoji commit hooks.

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

About

A template powered by cookiecutter for building a command-line interface in Golang using the mitchelh/cli framework.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published