Which packages do you recommend for building cli tools?

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

  • Cobra and Viper.

  • urfave/cli

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

  • 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
  • viper

    Go configuration with fangs

  • Cobra and Viper.

  • bubbletea

    A powerful little TUI framework 🏗

  • Don't forget https://github.com/charmbracelet/bubbletea and the rest of the https://charm.sh suite!

  • kong

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

  • I prefer https://github.com/alecthomas/kong these days

  • warg

    Declarative and Intuitive Command Line Apps with Go

  • I wrote my own! https://github.com/bbkane/warg/

  • ff

    Flags-first package for configuration

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • pflag

    Drop-in replacement for Go's flag package, implementing POSIX/GNU-style --flags.

  • I realy enjoyed the patched version from spf13 with "--" support https://github.com/spf13/pflag

  • go-flags

    go command line option parser

  • https://github.com/jessevdk/go-flags provides a pretty neat way to specify flags and handle commands. Not so much extensible as cobra, but good enough for small cli 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

  • Show HN: New set of Go libraries for CLI Development

    5 projects | news.ycombinator.com | 11 Jan 2023
  • Libraries for CLI and console applications

    6 projects | /r/golang | 7 Jan 2023
  • Ask HN: What libraries does go have for building interactive shells?

    6 projects | news.ycombinator.com | 16 Jan 2022
  • Requesting guidance

    11 projects | /r/golang | 30 Sep 2021
  • The power of the CLI with Golang and Cobra CLI

    9 projects | dev.to | 6 Apr 2024