Golang equivalent of Python’s click (CLT framework)

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

Our great sponsors
  • InfluxDB - Access the most powerful time series database as a service
  • SonarQube - Static code analysis for 29 languages.
  • SaaSHub - Software Alternatives and Reviews
  • eclipse

    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!

  • go-flags

    go command line option parser


  • InfluxDB

    Access the most powerful time series database as a service. Ingest, store, & analyze all types of time series data in a fully-managed, purpose-built database. Keep data forever with low-cost storage and superior data compression.

  • kong

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


  • cobra

    A Commander for modern Go CLI interactions

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

  • 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

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

  • koanf

    Simple, lightweight, extensible, configuration management library for Go. Support for 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.

  • SonarQube

    Static code analysis for 29 languages.. Your projects are multi-language. So is SonarQube analysis. Find Bugs, Vulnerabilities, Security Hotspots, and Code Smells so you can release quality code every time. Get started analyzing your projects today for free.

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