Made my first command-line tool with Golang

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

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • ascii-image-converter

    A cross-platform command-line tool to convert images into ascii art and print them on the console. Now supports braille art!

  • Also check GitHubs comminuty guidelines for projects ( https://github.com/TheZoraiz/ascii-image-converter/community ) for at least the contributing guide.

  • cobra

    A Commander for modern Go CLI interactions

  • I'm using the cobra library to implement command-line functionality. All the flags are handed in cmd/root.go in this function.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • kong

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

  • I think it is probably just a matter of personal taste, but I like to handle params and flags on the main function. I am probably biased by C experience and using https://github.com/alecthomas/kong though. Kong is certainly not as popular as cobra, but its approach.

  • changie

    Automated changelog tool for preparing releases with lots of customization options

  • To piggyback on GoReleaser I would recommend a few extra bits. Automated documentation of CLI using the cobra docs gen https://github.com/spf13/cobra/blob/master/doc/md\_docs.md, consider a CHANGELOG.md to track all changes over time ( self promotion https://github.com/miniscruff/changie which integrates with goreleaser ). Use github actions to automate all of the release processes.

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