|
I am curious what people reach for when writing CLIs these days; specifically what language, libraries (if any), and why? By CLI, I mean any executable program or script like git that supports commands, sub-commands, and POSIX-style flags. I mostly work in Go, and have been happy with the standard library[1] or Cobra[2]. I also write a lot of shell scripts. I thought it would be interesting to see some other approaches. [1]: https://pkg.go.dev/flag
[2]: https://cobra.dev |
1) Extract details for command options from man/help: https://github.com/learnbyexample/command_help/blob/master/c...
2) cut-like syntax for field manipulations with regexp, negative indexing, etc: https://github.com/learnbyexample/regexp-cut/blob/main/rcut
3) Simple calculator using python syntax: https://learnbyexample.github.io/practice_python_projects/ca...