Configuration
Configuration keys
- board_manager
 - the URLs to any additional Boards Manager package index files needed for your boards platforms.- additional_urls
 - set to- enable_unsafe_install
 to allow installation of packages that do not pass the checksum test. This is considered an unsafe installation method and should be used only for development purposes.- true
 
 - options related to running Arduino CLI as a gRPC server.- daemon
 - TCP port used for gRPC client connections.- port
 
 - directories used by Arduino CLI.- directories
 - directory used to store Boards/Library Manager index files and Boards Manager platform installations.- data
 - directory used to stage downloaded archives during Boards/Library Manager installations.- downloads
 - the equivalent of the Arduino IDE's "sketchbook" directory. Library Manager installations are made to the- user
 subdirectory of the user directory. Users can manually install 3rd party platforms in the- libraries
 subdirectory of the user directory.- hardware
 - the libraries in this directory will be available to all platforms without the need for the user to install them, but with the lowest priority over other installed libraries with the same name, it's the equivalent of the Arduino IDE's bundled libraries directory.- builtin.libraries
 
 - configuration options relating to Arduino libraries.- library
 - set to- enable_unsafe_install
 to enable the use of the- true
 and- --git-url
 flags with- --zip-file
 . These are considered "unsafe" installation methods because they allow installing files that have not passed through the Library Manager submission process.- arduino-cli lib install
 
 - the language used by Arduino CLI to communicate to the user, the parameter is the language identifier in the standard POSIX format- locale
 (for example- <language>[_<TERRITORY>[.<encoding>]]
 or- it
 , or- it_IT
 ).- it_IT.UTF-8
 - configuration options for Arduino CLI's logs.- logging
 - path to the file where logs will be written.- file
 - output format for the logs. Allowed values are- format
 or- text
 .- json
 - messages with this level and above will be logged. Valid levels are:- level
 ,- trace
 ,- debug
 ,- info
 ,- warn
 ,- error
 ,- fatal
 .- panic
 
 - settings related to the collection of data used for continued improvement of Arduino CLI.- metrics
 - TCP port used for metrics communication.- addr
 - controls the use of metrics.- enabled
 
 - settings related to text output.- output
 - ANSI color escape codes are added by default to the output. Set to- no_color
 to disable colored text output.- true
 
 - configuration options relating to Arduino sketches.- sketch
 - set to- always_export_binaries
 to make- true
 always save binaries to the sketch folder. This is the equivalent of using the- arduino-cli compile
 flag.- --export-binaries
 
 - configuration options related to Arduino CLI updates- updater
 - set to- enable_notification
 to disable notifications of new Arduino CLI releases, defaults to- false- true
 
 configuration options related to the compilation cache- build_cache
 - the path to the folder under which build caches are stored.- path
 - a list of paths to look for precompiled artifacts if not found on- extra_paths
 setting.- build_cache.path
 - interval, in number of compilations, at which the cache is purged, defaults to- compilations_before_purge
 . When- 10
 the cache is never purged.- 0
 - cache expiration time of build folders. If the cache is hit by a compilation the corresponding build files lifetime is renewed. The value format must be a valid input for time.ParseDuration(), defaults to- ttl
 (30 days).- 720h
 
 - configuration options related to the network connection.- network
 - URL of the proxy server.- proxy
 - network connection timeout, the value format must be a valid input for time.ParseDuration(), defaults to- connection_timeout
 (60 seconds).- 60s
 means it will wait indefinitely.- 0
 - if set to- cloud_api.skip_board_detection_calls
 it will make the Arduino CLI skip network calls to Arduino Cloud API to help detection of an unknown board.- true
 
Default directories
The following are the default directories selected by the Arduino CLI if alternatives are not specified in the configuration file.
- The 
 default is OS-dependent:- build_cache.path- on Linux (and other Unix-based OS) is: if
 is defined,$XDG_CACHE_HOME
 . Otherwise$XDG_CACHE_HOME/arduino
 .{HOME}/.config/arduino
- on Windows is: {HOME}/AppData/Local/arduino
- on MacOS is: {HOME}/Library/Caches/arduino
 
- on Linux (and other Unix-based OS) is: if
- The 
 default is OS-dependent:- directories.data- on Linux (and other Unix-based OS) is: {HOME}/.arduino15
- on Windows is: {HOME}/AppData/Local/Arduino15
- on MacOS is: {HOME}/Library/Arduino15
 
- on Linux (and other Unix-based OS) is: 
- The 
 default is- directories.downloads
 . If the value of- {directories.data}/staging
 is changed in the configuration the user-specified value will be used.- {directories.data}
- The 
 default is OS-dependent:- directories.user- on Linux (and other Unix-based OS) is: {HOME}/Arduino
- on Windows is: {DOCUMENTS}/Arduino
- on MacOS is: {HOME}/Documents/Arduino
 
- on Linux (and other Unix-based OS) is: 
Configuration methods
Arduino CLI may be configured in three ways:
- Command line flags
- Environment variables
- Configuration file
If a configuration option is configured by multiple methods, the value set by the method highest on the above list overwrites the ones below it.
If a configuration option is not set, Arduino CLI uses a default value.
 displays the current configuration values.arduino-cli config dump
Command line flags
Arduino CLI's command line flags are documented in the command line help and the Arduino CLI command reference.
Example
Setting an additional Boards Manager URL using the 
 command line flag:--additional-urls
1$ arduino-cli core update-index --additional-urls https://downloads.arduino.cc/packages/package_staging_index.jsonEnvironment variables
All configuration options can be set via environment variables. The variable names start with
ARDUINO_ARDUINO_DIRECTORIES_USERdirectories.userOn Linux or macOS, you can use the 
 command to set environment variables. On Windows cmd, you
can use the export
 command.set
ARDUINO_BOARD_MANAGER_ADDITIONAL_URLSExample
Setting an additional Boards Manager URL using the
ARDUINO_BOARD_MANAGER_ADDITIONAL_URLS1$ export ARDUINO_BOARD_MANAGER_ADDITIONAL_URLS=https://downloads.arduino.cc/packages/package_staging_index.jsonSetting multiple additional Boards Manager URLs using the
ARDUINO_BOARD_MANAGER_ADDITIONAL_URLS1$ export ARDUINO_BOARD_MANAGER_ADDITIONAL_URLS="https://downloads.arduino.cc/packages/package_staging_index.json https://downloads.arduino.cc/packages/package_mbed_index.json"Configuration file
 creates a new empty configuration file.arduino-cli config init
This allows saving the options set by command line flags or environment variables. For example:
1arduino-cli config init --additional-urls https://downloads.arduino.cc/packages/package_staging_index.jsonLocations
The default configuration file is named
arduino-cli.yaml- Location specified by the 
 command line flag--config-file
- Location specified by the 
 environment variableARDUINO_CONFIG_FILE
- Location specified by the 
 environment variableARDUINO_DIRECTORIES_DATA
If multiple configuration files are present, the one highest on the above list is used. Configuration files are not combined.
The location of the active configuration file can be determined by running the command:
1arduino-cli config dump --verboseExample
Setting an additional Boards Manager URL using a YAML format configuration file:
1board_manager:2  additional_urls:3    - https://downloads.arduino.cc/packages/package_staging_index.jsonDoing the same using a TOML format file:
1[board_manager]2additional_urls = [ "https://downloads.arduino.cc/packages/package_staging_index.json" ]JSON schema
The configuration file JSON schema can be used to independently validate the file content. This schema should be considered unstable in this version.