Live data from Hacker News

Ask HN: What do you use to make CLIs?

news.ycombinator.com

1–10 of 15 posts

Ask HN: What do you use to make CLIs?

#1
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

Re: Ask HN: What do you use to make CLIs?

#4
I use a lot of CLI tools, but haven't written many for myself. Mostly, aliases/functions and some scripts in Bash/Python.

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...

Post reply on HN