Ask HN: Favorite cross platform lang/framework for command line apps?
12 comments
I don't use a framework, but Go. Set an environment variable to get a binary for a different platform. Ex: I code on a Mac. 'go build' makes a binary. If I want a Linux executable: 'GOOS=linux go build'. Just as easy for Windows.
C, C++, Rust?
For C++ you have Poco, Folly etc. There are tons of frameworks in C++ out there that will help you write command line apps.
[deleted]
Language: Python
Library: Click
Library: Click
Oclif https://github.com/oclif/oclif
Disclaimer: I work for Heroku but have no association with the development of this tool.
Disclaimer: I work for Heroku but have no association with the development of this tool.
Thanks haven't heard of this one before.
command line? C/C++. Compiling separately for each environment is the best kind of cross platform for the end user.
Shell.
I’m keen to try D too, just need to find a project where I have enough time to learn without holding up something important.
I’m keen to try D too, just need to find a project where I have enough time to learn without holding up something important.
Cobra / Viper in Golang, also goreleaser
OT: I wouldn't generally call command line tools or utilities apps.
App is late 2010s for any kind of program that runs on a computer.
Python 3 + click[1].
[1] https://click.palletsprojects.com/en/7.x/
[1] https://click.palletsprojects.com/en/7.x/