func main() {
	root := &cobra.Command{
		Use:   "kcl",
		Short: "Kafka Command Line command for commanding Kafka on the command line",
		Long: `A Kafka command line interface.
kcl is a Kafka swiss army knife that aims to enable Kafka administration,
message producing, and message consuming. If Kafka supports it, kcl aims
to provide it.
For help about configuration, run:
  kcl myconfig -h
If this is your first time running kcl, you can create a configuration with:
  kcl myconfig create
Command completion is available at:
  kcl misc gen-autocomplete
`,
		CompletionOptions: cobra.CompletionOptions{
			DisableDefaultCmd: true,
		},
	}
	cl := client.New(root)
	root.AddCommand(
		consume.Command(cl),
		produce.Command(cl),
		metadata.Command(cl),
		transact.Command(cl),
		misc.Command(cl),
		admin.Command(cl),
		myconfig.Command(cl),
		topic.Command(cl),
		group.Command(cl),
	)
	allCommands(root, func(cmd *cobra.Command) {
		cmd.SilenceErrors = true
		cmd.DisableFlagsInUseLine = true
		if cmd.HasParent() {
			name := strings.Split(cmd.Use, " ")[0]
			cmd.Example = strings.Replace(cmd.Example, name, cmd.Parent().CommandPath()+" "+name, -1)
		}
	})
	root.SetUsageTemplate(usageTmpl)
	if err := root.Execute(); err != nil {
		fmt.Println(err)
		os.Exit(1)
	}
}
TODO remove cobra to remove ridiculous implicit "help" command from everything.
package main
import (
	"fmt"
	"os"
	"strings"
	"github.com/spf13/cobra"
	"github.com/twmb/kcl/client"
	"github.com/twmb/kcl/commands/admin"
	"github.com/twmb/kcl/commands/admin/group"
	"github.com/twmb/kcl/commands/admin/topic"
	"github.com/twmb/kcl/commands/consume"
	"github.com/twmb/kcl/commands/metadata"
	"github.com/twmb/kcl/commands/misc"
	"github.com/twmb/kcl/commands/myconfig"
	"github.com/twmb/kcl/commands/produce"
	"github.com/twmb/kcl/commands/transact"
)