Made my first command-line tool with Golang

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

Our great sponsors
  • SonarLint - Clean code begins in your IDE with SonarLint
  • talent.io - Download talent.io’s Tech Salary Report
  • Scout APM - Truly a developer’s best friend
  • 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.

  • SonarLint

    Clean code begins in your IDE with SonarLint. Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.

  • 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