-
git clone
this repository into a folder of your choice -
Add '/path/to/arduino-cli/folder' to your PATH environment variable
-
Reload shell configuration or reboot
There are two ways to execute the project:
-
By running the go main file.
$ go run main.go ARGS
-
By compiling then running the go program.
$ go build -o arduino $ ./arduino ARGS
If you want autocompletion and manpages you have to compile and execute (second way)
And you’re done, now let’s see how to use the CLI.
A general call is
$ arduino [COMMAND] [options]
To see the full list of commands, call one of the following:
$ arduino help [COMMAND]
$ arduino [COMMAND] -h
$ arduino [COMMAND] --help
Here is the output from help command arduino help
:
Arduino Create Command Line Interface (arduino-cli) Usage: arduino [flags] arduino [command] Available Commands: core Arduino Core operations help Help about any command lib Arduino commands about libraries version Shows version Number of arduino Flags: --config string config file (default is $HOME/.arduino.yaml) --format string the output format, can be [text|json] (default "text") --generate-docs generates the docs for the CLI and puts it in docs folder -h, --help help for arduino -v, --verbose count[=-1] enables verbose output (use more times for a higher level) Use "arduino [command] --help" for more information about a command. == Contributing To contribute to this project: . `git clone` this repository . Create a new branch with the name `feature-to-implement` or `bug-to-fix` . Code your contribution and push to your branch . Ask a Pull Request == Tips and Tricks ==== Download all libraries of the current library index: [source, bash]
$ arduino lib search | tr "\n" " " | xargs arduino lib install
Same trick can be used on cores as well: [source, bash]
$ arduino core search | tr "\n" " " | xargs arduino core install
And with the `download` command: [source, bash]
$ arduino lib search | tr "\n" " " | xargs arduino lib download $ arduino core search | tr "\n" " " | xargs arduino core download