go-cli

Simple, minimalist, intuitive CLI library for golang.

I created this library because most existing CLI libraries for Go are either too complex or require too much boilerplate, forcing me to check the documentation every time I use them. This library is intuitive, uses explicit configuration, and does not require any additional structure beyond functions for subcommands.

Repository

Example

package main

import "github.com/renatopp/go-cli"

func main() {
  cli.Name("hello")
  cli.Description("Prints a classical message.")
  cli.AutoHelp(true)
  cli.Parse()

  println("Hello, World!")
}