@@ -4,8 +4,8 @@ The Arduino CLI is an open source Command Line Application written in [Golang] t
4
4
compile, verify and upload sketches to Arduino boards and that’s capable of managing all the software and tools needed
5
5
in the process. But don’t get fooled by its name: Arduino CLI can do much more than the average console application, as
6
6
shown by [ Arduino IDE 2.x] [ arduino ide 2.x ] and [ Arduino Cloud] , which rely on it for similar purposes but each one in a
7
- completely different way from the other. In this article we introduce the three pillars of the Arduino CLI, explaining how
8
- we designed the software so that it can be effectively leveraged under different scenarios.
7
+ completely different way from the other. In this article we introduce the three pillars of the Arduino CLI, explaining
8
+ how we designed the software so that it can be effectively leveraged under different scenarios.
9
9
10
10
## The first pillar: command line interface
11
11
@@ -132,17 +132,18 @@ $ arduino-cli lib search FlashStorage --format json | jq .libraries[0].latest
132
132
```
133
133
134
134
Even if not related to software design, one last feature that’s worth mentioning is the availability of a one-line
135
- [ installation script] that can be used to make the latest version of the Arduino CLI available on most systems with an HTTP
136
- client like curl or wget and a shell like bash.
135
+ [ installation script] that can be used to make the latest version of the Arduino CLI available on most systems with an
136
+ HTTP client like curl or wget and a shell like bash.
137
137
138
138
For more information on Arduino CLI's command line interface, see the [ command reference] .
139
139
140
140
## The second pillar: gRPC interface
141
141
142
142
[ gRPC] is a high performance [ RPC] framework that can efficiently connect client and server applications. The Arduino
143
- CLI can act as a gRPC server (we call it [ daemon mode] ), exposing a set of procedures that implement the very same set of
144
- features of the command line interface and waiting for clients to connect and use them. To give an idea, the following is
145
- some [ Golang] code capable of retrieving the version number of a remote running Arduino CLI server instance:
143
+ CLI can act as a gRPC server (we call it [ daemon mode] ), exposing a set of procedures that implement the very same set
144
+ of features of the command line interface and waiting for clients to connect and use them. To give an idea, the
145
+ following is some [ Golang] code capable of retrieving the version number of a remote running Arduino CLI server
146
+ instance:
146
147
147
148
``` go
148
149
// This file is part of arduino-cli.
@@ -210,8 +211,8 @@ a common Golang API, based on the gRPC protobuf definitions: a set of functions
210
211
offered by the Arduino CLI, so that when we provide a fix or a new feature, they are automatically available to both the
211
212
command line and gRPC interfaces. The source modules implementing this API are implemented through the ` commands `
212
213
package, and it can be imported in other Golang programs to embed a full-fledged Arduino CLI. For example, this is how
213
- some backend services powering [ Arduino Cloud] can compile sketches and manage libraries. Just to give you a taste of what
214
- it means to embed the Arduino CLI, here is how to search for a core using the API:
214
+ some backend services powering [ Arduino Cloud] can compile sketches and manage libraries. Just to give you a taste of
215
+ what it means to embed the Arduino CLI, here is how to search for a core using the API:
215
216
216
217
``` go
217
218
// This file is part of arduino-cli.
@@ -296,8 +297,7 @@ use and provide support for.
296
297
You can start playing with the Arduino CLI right away. The code is open source and [ the repo] [ arduino cli repository ]
297
298
contains [ example code showing how to implement a gRPC client] [ grpc client example ] . If you’re curious about how we
298
299
designed the low level API, have a look at the [ commands package] and don’t hesitate to leave feedback on the [ issue
299
- tracker]
300
- if you’ve got a use case that doesn’t fit one of the three pillars.
300
+ tracker] if you’ve got a use case that doesn’t fit one of the three pillars.
301
301
302
302
[ golang ] : https://go.dev/
303
303
[ arduino ide 2.x ] : https://github.com/arduino/arduino-ide
0 commit comments