Recommended framework/library for creating cli apps in go?

This page summarizes the projects mentioned and recommended in the original post on /r/golang

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • cobra

    A Commander for modern Go CLI interactions

  • I've used both cobra and cli, both are good. cli may be, IMO, a bit "lighter", not speed-wise (maybe it's different, but I haven't noticed), but it's not as feature-rich as cobra, but it's excellent.

  • urfave/cli

    A simple, fast, and fun package for building command line apps in Go (by urfave)

  • I've used both cobra and cli, both are good. cli may be, IMO, a bit "lighter", not speed-wise (maybe it's different, but I haven't noticed), but it's not as feature-rich as cobra, but it's excellent.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • kong

    Kong is a command-line parser for Go (by alecthomas)

  • I switched all from viper to kong.

  • commando

    An easy-to-use command-line application builder. (by thatisuday)

  • At least for smaller apps, I like commando because it's light in terms of dependencies, it's straight-forward to use and parses getopt style parameters.

  • go-arg

    Struct-based argument parsing in Go

  • I personally swear by the go-arg package, as i prefer its library-not-framework approach.

  • viper

    Go configuration with fangs

  • Personally, I went with Cobra and Viper because they are used in so many big tools.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • K3S Binary, How does that work?

    5 projects | /r/golang | 11 Apr 2023
  • GoConsole: New Update! thanks all of you for your advice and your help.

    1 project | /r/golang | 12 Mar 2023
  • Title: GoConsole: a lightweight Go module for creating command-line commands

    1 project | /r/golang | 9 Mar 2023
  • climate "CLI Mate": a CLI library that autogenerates CLIs from structs / functions with support for nested subcommands, global / local flags, help generation from godocs, typo suggestions, shell completion and more

    7 projects | /r/golang | 7 Jul 2023
  • Which packages do you recommend for building cli tools?

    10 projects | /r/golang | 17 Apr 2023