Live data from Hacker News

Fang, the CLI Starter Kit

github.com

31–34 of 34 posts

Re: Fang, the CLI Starter Kit

#31
It's probably more accurate to say it's a Go Cobra CLI Starter Kit rather just a generic CLI Starter kit. I personally find Cobra bit OTT and bloated and try to avoid it where I can but this could be a nice starter point for my own similar library to suit my needs

Re: Fang, the CLI Starter Kit

#32

Stubborn complaint (and maybe a hot take): I dislike CLIs that try to be overly pretty. I don't receive any tangible benefit as the user from the "fancy" (their words) help output. I'd much rather simple plain text output that looks like all the other tools I already use.

And they often don't check the terminal so if you pipe them or run on a serial terminal they break horribly.

Re: Fang, the CLI Starter Kit

#33
post #3

I’ve been maintaining rust-starter[!] for quite sometime now. It is kind of the equivalent of fang but for Rust. It uses Clap which is the equivalent of Cobra; though I don’t think Clap has the same kind of fancy output? Throughout these years, I have found that cross-compiling is the most challenging part of creating a CLI. When you are building a web back-end, you control the execution environment (usually linux).…

I configure github actions to build each version in its natural habitat.

Though my motivation for this was getting the builds off my machine. I didn't want to be shipping binaries I had built locally.

Re: Fang, the CLI Starter Kit

#34

Stubborn complaint (and maybe a hot take): I dislike CLIs that try to be overly pretty. I don't receive any tangible benefit as the user from the "fancy" (their words) help output. I'd much rather simple plain text output that looks like all the other tools I already use.

As a counter argument, not putting color in help usage text leaves a large amount on the table for readability. The reasonable compromise for those that disagree with this is to set the NO_COLOR environment variable. This should be respected by most things which do use color (and if it's not, that's a bug).
Post reply on HN