arduino-cli
TLDR
List connected boards
SYNOPSIS
arduino-cli command [flags]
DESCRIPTION
arduino-cli is the official command-line tool for Arduino development. It provides board and library management, sketch compilation, upload functionality, and serial monitoring without requiring the Arduino IDE.
The tool uses Fully Qualified Board Names (FQBNs) to identify target boards, formatted as vendor:architecture:board (e.g., arduino:avr:uno). Board platforms must be installed before compiling for them.
Typical workflow: install the target platform with core install, compile the sketch with compile, and upload with upload. The --upload flag can be added to compile to perform both steps together.
The tool supports custom libraries via --libraries flag, board configuration via --build-property, and integrates well with IDEs like VS Code for Arduino development workflows.
PARAMETERS
board list
List connected Arduino boards with ports and FQBNsboard listall
List all known board typescompile
Compile an Arduino sketchupload
Upload compiled binaries to a boardsketch new name
Create a new sketch in the sketchbookcore install platform
Install a board platform (e.g., arduino:avr)core update-index
Update the platform indexlib install name
Install a library from the library managerlib search query
Search for librariesmonitor
Open serial monitor to communicate with the board-b, --fqbn string
Fully Qualified Board Name (e.g., arduino:avr:uno)-p, --port string
Port address (e.g., /dev/ttyACM0 or COM3)-e, --export-binaries
Export compiled binaries to the sketch folder--output-dir path
Directory for compiled artifacts-t, --verify
Verify uploaded binary after upload-P, --programmer name
Use a specific programmer for upload
CAVEATS
Upload requires appropriate permissions for serial ports; on Linux, users typically need membership in the dialout or uucp group. The upload command does not compile automatically; use compile --upload for a combined operation. Board platforms must be installed before first use.
HISTORY
arduino-cli was developed by Arduino and released in 2018 as a modern replacement for the older Arduino command-line tools. It was created to enable headless Arduino development, support CI/CD pipelines, and provide a foundation for third-party IDE integrations. The tool shares its core with the Arduino IDE 2.0 and is actively maintained.
SEE ALSO
avrdude(1), platformio(1), screen(1), minicom(1)


