Golang equivalent of Python’s click (CLT framework)

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

Stream - Scalable APIs for Chat, Feeds, Moderation, & Video.
Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.
getstream.io
featured
InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
  1. eclipse

    Discontinued python-fire inspired library to simplify creating CLIs in Go, built on top of Cobra [Moved to: https://github.com/avamsi/clifr]

    (Shameless plug) Also check out https://github.com/avamsi/eclipse!

  2. Stream

    Stream - Scalable APIs for Chat, Feeds, Moderation, & Video. Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.

    Stream logo
  3. go-flags

    go command line option parser

    go-flags

  4. kong

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

    kong

  5. cobra

    A Commander for modern Go CLI interactions

    I’m a fan of both cobra and urfave/cli

  6. bubbletea

    A powerful little TUI framework 🏗

    I don't think it's what you're after and I haven't used it myself, but thought I'd share this so you're aware of just what all is out there: https://github.com/charmbracelet/bubbletea

  7. viper

    Go configuration with fangs

    I’ll be honest, I prefer urfave/cli over cobra generally speaking. Not for any reason outside of personal preference due to development experience. urfave/cli just feels more intuitive to me. However, if I’m building a CLI tool with really complex configuration, I’ll typically choose cobra and pair it with viper to make sure handling config loading is done properly. Both cobra and viper were written by the same person (and both widely used in production in conjunction with each other), so I trust they’ll play nicely.

  8. koanf

    Simple, extremely lightweight, extensible, configuration management library for Go. Supports JSON, TOML, YAML, env, command line, file, S3 etc. Alternative to viper.

    You can also use Viper with urfave/cli, or you can replace Viper with knadh/koanf, which I personally prefer.

  9. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
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

  • Coral, a friendly Cobra fork with nearly all its features, but only 4 dependencies

    10 projects | /r/golang | 2 Feb 2022
  • Rethinking How I Deal With CLI Arguments (replacing getopt)

    1 project | news.ycombinator.com | 16 May 2025
  • argp: GNU-style command line argument parser for Go

    11 projects | news.ycombinator.com | 23 Mar 2025
  • What 3rd-party libraries do you use often/all the time?

    7 projects | /r/golang | 1 Dec 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

Did you know that Go is
the 4th most popular programming language
based on number of references?