I saw that Arduino got a CLI (Command Line Interface), and my first question was "why?" Even after reading the article, I don't see or understand its advantages.

What advantages or benefits does a CLI have for Arduino?

I haven't done much with Arduino in several years. For example, there wasn't an Arduino SE when I was fooling around with Arduino, so I probably have an out of date context for Arduino development.

  • 1
    If you have to ask what the benefits are then the benefits most likely do not apply to or interest you. – Majenko Oct 9 '18 at 23:41
  • 1
    it's for tooling and automation. i've used it to automatically recompile and deploy a sketch after another app updates a "hard-coded" table of IP addresses in the source, based on the results of a network scan. – dandavis Oct 11 '18 at 6:44

Simple: you can program the Arduino without needing a GUI.

One good example: You have an Arduino connected to a Raspberry Pi built into a robot. You SSH into the Pi, edit the Arduino's program, and upload the new code. All from wherever you happen to be.

A second example: You can integrate Arduino compilation into your own software. Such as a web interface for compiling your code. I know of one such project where the creator has made a custom website for editing their robot code and using UECIDE's CLI (which pre-dates Arduino's) to compile and upload the code to the target board.

And yes, you have an outdated context of Arduino development, as evidenced by your use of the phrase "fooling around with". Arduino is not a toy. It's a development platform and educational tool. Maybe back when you were "fooling around" with it, it was little more than a toy, but things have moved on a long long way since then. The Arduino ecosystem boasts boards with chips from every manufacturer you can imagine to fill every niche you can conceive. The API and available libraries have certainly matured.

| improve this answer | |
  • One huge advantage that probably falls under "You can integrate Arduino compilation into your own software" is continuous integration. For example, you might configure Travis CI to compile your Arduino project every time you push a commit to GitHub. You can already do this using the Arduino IDE's CLI, but that means downloading and extracting many megabytes of GUI application that will never be used for every CI job (and there may be multiple jobs per build). That slows down the build and wastes Arduino and Travis CI's bandwidth. The arduino-cli download is only 5 MB. – per1234 Dec 7 '18 at 11:01

Not the answer you're looking for? Browse other questions tagged or ask your own question.