3 Cli - A tool for building command line app

github.com godoc.org goreportcard.com posted by mkideal 700 days ago  

Easy to use command line interface tool written in golang, open-source on github

package main

import (



type argT struct {

Help bool `cli:"h,help" usage:"display help information"`

Name string `cli:"name" usage:"your name" dft:"world"`


func main() {

cli.Run(&argT{}, func(ctx *cli.Context) error {

argv := ctx.Argv().(*argT)

if argv.Help {


} else {

ctx.String("Hello, %s! \n", argv.Name)


return nil



Register to comment or vote on this story