The configuration file for arduino-cli is typically located at "~/.arduino15/arduino-cli.yaml" in GNU/Linux systems. You may need to create the file first or run "$ arduino-cli config init".
To check if your arduino-cli installation is actually using your configuration, you can run the following command, which outputs the configuration used:
$ arduino-cli config dump
Here are available options:
Section | Option | Description |
---|---|---|
default_board | string | Default FQBN board name used if none specified |
board_manager.additional_urls | list of strings | URLs to third-party board package indices |
directories | data, downloads, user | Paths for CLI data, downloads, and user sketch directory |
logging | level, file, format | CLI logging level, log file path, and output format |
network.proxy | string | Proxy URL for network access |
locale | string | CLI output language |
sketch.always_export_binaries | bool | Export compiled binaries alongside sketch |
compile | warnings, optimize_for, build_cache | Compiler warning level, optimization, build cache |
upload | verify, programmer | Upload verification and programmer type |
library.enable_unsafe_install | bool | Allow installing unsigned libraries |
core.enable_unsafe_install | bool | Allow installing unsigned cores |
telemetry.enabled | bool | Enable or disable telemetry data sending |
updater.enable_notification | bool | Show update notifications |
errors.show_stack_trace | bool | Show stack traces on errors for debugging |
cli.network_timeout_seconds | int | Network timeout duration in seconds |
custom | any | Custom user-defined options |
Here is a big example of configuration with nearly all available options:
# Arduino CLI Configuration File (~/.arduino15/arduino-cli.yaml)
# Complete example including nearly all available options with detailed explanations
# --------------------------------------------------
# Default Board: Fully Qualified Board Name (FQBN) used when no --fqbn is specified
# Example: "arduino:avr:uno"
default_board: arduino:avr:uno
# --------------------------------------------------
# Board Manager: Additional URLs for 3rd-party board package indices
# These URLs will be used when updating cores
board_manager:
additional_urls:
- https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
- http://arduino.esp8266.com/stable/package_esp8266com_index.json
# --------------------------------------------------
# Directory paths used by Arduino CLI
# Defaults:
# data: ~/.arduino15
# downloads: ~/.arduino15/downloads
# user: ~/Arduino
directories:
# Directory where Arduino CLI stores data (cores, libraries, tools, etc.)
data: /home/user/.arduino15
# Directory for downloads (cores, tools, libs)
downloads: /home/user/.arduino15/downloads
# User sketch directory where your .ino files are stored
user: /home/user/Arduino
# --------------------------------------------------
# Logging configuration: controls CLI logging behavior
logging:
# Log level: trace, debug, info, warn, error, fatal, panic
level: info
# Log file path (optional)
file: /home/user/arduino-cli.log
# Log output format: "text" or "json"
format: text
# --------------------------------------------------
# Network proxy settings (optional)
network:
# Proxy URL, e.g. "http://user:[email protected]:8080"
proxy: ""
# --------------------------------------------------
# CLI output language / locale (e.g., en, de, fr, es)
locale: en
# --------------------------------------------------
# Serial Monitor options
monitor:
# Default baud rate if not specified by the board or overridden on CLI
baudrate: 9600
# Echo input typed in monitor back to the screen
echo: false
# Quiet mode reduces output noise
quiet: false
# Raw mode disables formatting, outputs raw bytes
raw: false
# Adds timestamp to each line of output
timestamp: false
# --------------------------------------------------
# Sketch build options
sketch:
# If true, exports binaries after compilation
always_export_binaries: false
# --------------------------------------------------
# Compile options
compile:
# Warning level: none, default, more, all
warnings: default
# Optimization target: "size" or "speed"
optimize_for: speed
# Enables build caching for faster subsequent builds
build_cache: true
# --------------------------------------------------
# Upload options
upload:
# Verify the upload after flashing
verify: true
# Programmer type (e.g., arduino, avrisp, usbtiny)
programmer: arduino
# --------------------------------------------------
# Library manager options
library:
# Allow installing unsigned (unsafe) libraries
enable_unsafe_install: false
# --------------------------------------------------
# Core manager options (board packages)
core:
# Allow installing unsigned (unsafe) cores
enable_unsafe_install: false
# --------------------------------------------------
# Telemetry settings (send usage data to improve Arduino CLI)
telemetry:
enabled: false
# --------------------------------------------------
# Updater settings
updater:
# Enable notification about new Arduino CLI releases
enable_notification: true
# --------------------------------------------------
# Error handling options
errors:
# Show full stack traces on errors (useful for debugging)
show_stack_trace: false
# --------------------------------------------------
# Advanced CLI options (may vary with versions)
cli:
# Timeout for network operations in seconds
network_timeout_seconds: 60
# --------------------------------------------------
# Custom user options (placeholders for future or user-specific config)
custom:
example_option: example_value