A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://arduino.github.io/arduino-cli/latest/../1.2/getting-started/../configuration/ below:

Configuration - Arduino CLI

Configuration Configuration keys Default directories

The following are the default directories selected by the Arduino CLI if alternatives are not specified in the configuration file.

Configuration methods

Arduino CLI may be configured in three ways:

  1. Command line flags
  2. Environment variables
  3. 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.

arduino-cli config dump displays the current configuration values.

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 --additional-urls command line flag:

$ arduino-cli core update-index --additional-urls https://downloads.arduino.cc/packages/package_staging_index.json
Environment variables

All configuration options can be set via environment variables. The variable names start with ARDUINO, followed by the configuration key names, with each component separated by _. For example, the ARDUINO_DIRECTORIES_USER environment variable sets the directories.user configuration option.

On Linux or macOS, you can use the export command to set environment variables. On Windows cmd, you can use the set command.

ARDUINO_BOARD_MANAGER_ADDITIONAL_URLS environment variables can be a list of space-separated URLs.

Example

Setting an additional Boards Manager URL using the ARDUINO_BOARD_MANAGER_ADDITIONAL_URLS environment variable:

$ export ARDUINO_BOARD_MANAGER_ADDITIONAL_URLS=https://downloads.arduino.cc/packages/package_staging_index.json

Setting multiple additional Boards Manager URLs using the ARDUINO_BOARD_MANAGER_ADDITIONAL_URLS environment variable:

$ 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

arduino-cli config init creates a new empty configuration file.

This allows saving the options set by command line flags or environment variables. For example:

arduino-cli config init --additional-urls https://downloads.arduino.cc/packages/package_staging_index.json
Locations

The default configuration file is named arduino-cli.yaml. The configuration file is searched in the following locations, in order of priority:

  1. Location specified by the --config-file command line flag
  2. Location specified by the ARDUINO_CONFIG_FILE environment variable
  3. Location specified by the ARDUINO_DIRECTORIES_DATA environment variable

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:

arduino-cli config dump --verbose
Example

Setting an additional Boards Manager URL using a YAML format configuration file:

board_manager:
  additional_urls:
    - https://downloads.arduino.cc/packages/package_staging_index.json

Doing the same using a TOML format file:

[board_manager]
additional_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.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4