arduino-cli | Arduino command line tool

 by   arduino Go Version: 0.33.0 License: GPL-3.0

kandi X-RAY | arduino-cli Summary

kandi X-RAY | arduino-cli Summary

arduino-cli is a Go library typically used in Internet of Things (IoT), Arduino applications. arduino-cli has no bugs, it has no vulnerabilities, it has a Strong Copyleft License and it has medium support. You can download it from GitHub.

Arduino CLI is an all-in-one solution that provides Boards/Library Managers, sketch builder, board detection, uploader, and many other tools needed to use any Arduino compatible board and platform from command line or machine interfaces. Note: this software is currently under active development: anything can change at any time, API and UI must be considered unstable until we release version 1.0.0.

            kandi-support Support

              arduino-cli has a medium active ecosystem.
              It has 3909 star(s) with 345 fork(s). There are 103 watchers for this library.
              There were 6 major release(s) in the last 12 months.
              There are 179 open issues and 661 have been closed. On average issues are closed in 185 days. There are 23 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of arduino-cli is 0.33.0

            kandi-Quality Quality

              arduino-cli has 0 bugs and 0 code smells.

            kandi-Security Security

              arduino-cli has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              arduino-cli code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              arduino-cli is licensed under the GPL-3.0 License. This license is Strong Copyleft.
              Strong Copyleft licenses enforce sharing, and you can use them when creating open source projects.

            kandi-Reuse Reuse

              arduino-cli releases are available to install and integrate.
              Installation instructions are available. Examples and code snippets are not available.
              It has 51511 lines of code, 3139 functions and 369 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of arduino-cli
            Get all kandi verified functions for this library.

            arduino-cli Key Features

            No Key Features are available at this moment for arduino-cli.

            arduino-cli Examples and Code Snippets

            No Code Snippets are available at this moment for arduino-cli.

            Community Discussions


            How would I use Arduino-CLI in WSL?
            Asked 2022-Feb-17 at 02:49

            I recently started playing with an ESP8266 and wanted to try uploading to it using WSL. I found the Arduino-CLI command and followed some tutorials but couldn't figure out how to upload to the board. The command I tried running is arduino-cli upload -p /dev/ttyS5 --fqbn esp8266:esp8266:arduino-esp8266 Testing because I know that the board is an ESP8266 and the is connected to COM5 on the Windows Arduino app. The code compiles and attempts to connect to the board, but cannot get past that part.

            This is the code I was trying to upload.



            Answered 2022-Feb-15 at 01:25

            Just educated guesses here from my understanding of WSL rather than Arduino.

            I'm assuming that you are using WSL2, which doesn't have access to most Windows hardware, including the serial ports.

            If that's the case, two options that you might try:

            • WSL1 does have some better direct hardware access, at the expense of some kernel compatibility (since it attempts to translate syscalls rather than virtualize them). You can try converting the distribution to WSL1 via:



            NodeMCU ESP8266 cannot upload sketch - timeout error
            Asked 2021-Oct-04 at 09:14

            Using arduino-cli, the arduino-ide, or directly the (from I obtain the following error when uploading a simple (correct) sketch.



            Answered 2021-Oct-04 at 09:14

            The problem was that my last apt upgrade updated the kernel from the 5.4.0-86-generic to 5.4.0-88-generic (I checked the update in /var/log/apt/history.log.1.gz). The driver CH341 in 5.4.0-88 is not working properly (the ESP I'm using require CH340G drivers). The solution is to go back to the 5.4.0-86 drivers and in the following I list what I've done.

            1. disconnect any ESP or board connected to any USB. Then test that the CH341 module (which allows the serial communication with the EPS) is loaded. You can use this code to test the correct unload/load of the module in steps 2, 3.



            Arduino-cli daemon purpose
            Asked 2021-Mar-10 at 10:31

            Can anyone explain me how the arduino-cli daemon is working and what this is doing? I cant find any good documentation on the web...

            When I start the daemon it only tells me, it started listening to some port.

            Thanks for your help!!



            Answered 2021-Mar-10 at 10:31

            I'm not sure what to explain beyond the manual.

            arduino-cli daemon starts a gRPC server.



            It provides a language agnostic interface to other programs so they can use the features of the Arduino CLI.

            So like you sit in front of the computer and enter commands into the CLI, a client software would connect to the gRPC server and invoke whatever commands it needs.

            Read this




            Why does execution of arduino-cli via cmd with file names with spaces in path not work?
            Asked 2021-Feb-06 at 20:27

            I'm making a C# application that compiles Arduino code with arduino-cli. I'm calling it with the Process class using the ProcessStartInfo class and of course via cmd.exe which is absolutely necessary.

            arduino-cli.exe ignores all arguments and outputs the following two lines for five seconds on starting it directly instead of running it via cmd.exe or from within a PowerShell console:

            This is a command line tool.

            You need to open cmd.exe and run it from there.

            I can select the directory with the correct path, but when I select another directory to be compiled, there is output by arduino-cli.exe the error message:

            Error: unknown command "Studio" for "arduino-cli"

            I think that is because the directory I'm selecting is within a folder called Visual Studio Projects containing spaces in its name and I think it interprets each word as separate argument.

            How to code the arguments passed via cmd.exe to arduino-cli.exe so that the two file names (input and hex file) containing spaces in their full qualified file names as complete argument strings?

            I read online that if I add @ before the path it should fix it, but it hasn't done much.

            This also happens when I run the arduino-cli command line directly in a Windows command prompt window instead aside from C#. The issue is likely with the command line syntax.

            Here is my C# code:



            Answered 2021-Feb-06 at 17:56

            The issue was that the path was too long, and it needed a "" around the path. This is what the code looks like now -



            PHP shell_exec() returning different result than SSH Terminal
            Asked 2021-Jan-23 at 07:03

            I have a Linux machine running CentOS 7 with Python 2.7.5 installed. I am trying to run the Arduino-CLI, which is an executable that requires Python. I wrote a command to compile a sketch. As seen on the right side, it effectively compiles.

            When I run the same command in PHP using sudo_exec(), it gives me:



            Answered 2021-Jan-23 at 07:03

            I ended up figuring out this problem. In shell_exec(), PHP does not define the PATH environmental variable. It also won't know the current working directory. So adding these couple lines before shell_exec() did the trick:



            How to present node spawn arguments
            Asked 2020-Oct-08 at 01:32

            Before people start crying "duplicate", I've already examined

            The first of these is basically the same question in a different use case and as a result the answers do not address my use case.

            So... how do you encode a command line like the following with named parameters separated from their values by a space?



            Answered 2020-Oct-08 at 01:32

            After setting up for repeatable testing



            How to run daemon within a js file
            Asked 2020-Aug-27 at 10:38

            I'm trying to start a server daemon from within my js code, then to access it from the same program. However, when I use the execFile() method from the child_process module, this blocks the entire program: the execFile() call never stops, and I am unable to access the server. However, I know the daemon is started since I see a process of the same name start up from my activity monitor (macos equivalent of task manager).

            I've also tried exec() and spawn() from the same module, and it gave the same results.

            What I'd want to be able to do is to start the daemon as a separate process, forget about it, then stop it when I'm done using it. Is there any way I could do at least the first two?

            Here is my code (the runArduino function is where I start the daemon, and the main() function is where I access it):



            Answered 2020-Aug-27 at 10:38

            I believe you should either await the exec or run main() in exec's callback. Right now your main() executes before child process is started.



            proto-loader unable to load .proto file with dependencies
            Asked 2020-Aug-23 at 06:52

            I'm trying to load .proto files coming from the arduino-cli repo. More specifically, I'm loading the commands.proto that has a dependency on a few other .proto files within the same directory.

            In the load options provided to proto-loader, I specified the paths to all these .proto dependencies, yet an error pops up stating that proto messages defined in one of these dependencies are not defined.

            Here is my code:



            Answered 2020-Aug-23 at 06:52

            The purpose of the includeDirs option is to list directories that should be searched for imported files. The file in question imports commands/common.proto, commands/board.proto, etc. So includeDirs should point to the directory that contains those files. In this case, that is RPC_PATH. So, your includeDirs list should just be [RPC_PATH].


            Community Discussions, Code Snippets contain sources that include Stack Exchange Network


            No vulnerabilities reported

            Install arduino-cli

            Install the Arduino CLI
            Follow the Getting Started guide to check out what the CLI can do
            Browse the Commands reference to see all the available commands
            Should you have an issue, read the FAQ page


            Please read the document How to contribute which will show you how to build the source code, run the tests, and contribute your changes to the project.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
          • HTTPS


          • CLI

            gh repo clone arduino/arduino-cli

          • sshUrl


          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link