Excellent collection of advice for building CLI apps in Rust. It's really helpful to see opinions on e.g. should env vars take precedence over CLI arguments.
https://rust-cli-recommendations.sunshowers.io/
miniblog.
Related Posts
In many respects I feel an LLM benefits from a monorepo. I've vibe coded a bunch of helper CLIs recently and end up repeating the same preferences for all of them.
I want all my CLIs to use clippy, parse arguments with clap, etc. They're distinct tools in distinct repos though.
I'm coming round to the view that a main function shouldn't take arguments.
For example, in Rust you have to call std::env::args() to get CLI arguments.
This makes Hello World less verbose, and gives you more flexibility in setting up CLI argument parsers.
I'm working on arity errors in Garden, my toy programming language.
Rather than just saying "expected 3, got 4 arguments", I'm trying to report where the extra argument is, or what extra argument was expected.

