Hi @gadile .
The Arduino IDE developers are tracking the request to add that capability here:
opened 09:00PM - 17 May 25 UTC
type: enhancement
topic: code
topic: theia
### Describe the request
Allow advanced users to cause the instances of **Ardui… no CLI** used by Arduino IDE to be configured via a configuration file from any arbitrary path.
🙂 This will significantly facilitate certain advanced use cases.
### Describe the current behavior
Many of the non-GUI capabilities of Arduino IDE are provided by the [**Arduino CLI**](https://arduino.github.io/arduino-cli/latest/) tool.
**Arduino CLI** is configured via a configuration file. When Arduino IDE invokes **Arduino CLI**, it specifies the use of the configuration file from a specific hardcoded path:
https://github.com/arduino/arduino-ide/blob/0f9f0d07b7d5ff0cdefda3e77eb6b5ce2854c4a8/arduino-ide-extension/src/node/arduino-daemon-impl.ts#L132-L133
This hardcoded path is `$HOME/.arduinoIDE/arduino-cli.yaml`.
For some advanced use cases, the location under the user home directory is very inconvenient:
- Institutional installations where the system administrator wishes a single configuration to be used by all users
- "Portable" use cases where the user wants to carry a self-contained installation of Arduino IDE and project dependencies on a portable drive for use on any computer.
- Having a dedicated configuration and dependencies environment for each specific project.
🙁 The user either cannot achieve their desired use case, or is forced to use inconvenient and convoluted means to do so.
### Arduino IDE version
0f9f0d07b7d5ff0cdefda3e77eb6b5ce2854c4a8
### Operating system
- Linux
- macOS
- Windows
### Operating system version
- Ubuntu 24.04
- macOS Sequoia
- Windows 11
### Additional context
This is a capability that is only required by advanced users, so it is not necessary to provide the capability in a beginner friendly manner. _**The complexity of Arduino IDE's primary UI MUST NOT be increased through the implementation of this feature.**_ It is perfectly fine for the configuration to only be available through an environment variable or command line flag.
There are a couple of possibilities by which this might be accomplished:
#### Allow the user to set the Arduino IDE configuration folder path
The hardcoded location for the Arduino CLI configuration file used by Arduino IDE is under the Arduino IDE configuration folder (i.e., `$HOME/.arduinoIDE`), so if the Arduino IDE configuration folder location was made configurable, this would also make the Arduino CLI configuration file location configurable.
The [**Eclipse Theia Platform** IDE framework](https://theia-ide.org/theia-platform/) upon which Arduino IDE is built already has the capability for the user to set an arbitrary configuration folder location via the `THEIA_CONFIG_DIR` environment variable:
https://github.com/eclipse-theia/theia/blob/v1.57.0/packages/core/src/node/env-variables/env-variables-server.ts#L49-L53
```ts
protected async createConfigDirUri(): Promise<string> {
if (process.env.THEIA_CONFIG_DIR) {
// this has been explicitly set by the user, so we do not override its value
return FileUri.create(process.env.THEIA_CONFIG_DIR).toString();
}
```
However, that system is overridden in the Arduino IDE codebase:
https://github.com/arduino/arduino-ide/blob/0f9f0d07b7d5ff0cdefda3e77eb6b5ce2854c4a8/arduino-ide-extension/src/node/theia/env-variables/env-variables-server.ts#L19-L30
```ts
join(homedir(), BackendApplicationConfigProvider.get().configDirName)
```
I believe the reason for this override was that, at the time it was implemented, Theia hardcoded the default configuration folder path as `$HOME/.theia` and we wanted a folder name that matches the application. However, the ability for each application to configure a custom default configuration folder name has since been added to Theia:
https://github.com/eclipse-theia/theia/pull/14319
So there is now no point in us maintaining the override code in this project.
#### Respect the `ARDUINO_CONFIG_FILE` environment variable
**Arduino CLI** supports specifying the configuration file location via an environment variable:
https://arduino.github.io/arduino-cli/dev/configuration/#locations
> The configuration file is searched in the following locations, in order of priority:
>
> 1. Location specified by the `--config-file` command line flag
> 1. Location specified by the `ARDUINO_CONFIG_FILE` environment variable
Arduino IDE's use of the `--config-file` flag in the `arduino-cli daemon` invocation makes it impossible for the user to configure the path via the `ARDUINO_CONFIG_FILE` environment variable. This could be allowed if Arduino IDE checked whether the `ARDUINO_CONFIG_FILE` environment variable was set, and if so omitted the `--config-file` command line flag from the invocation (and also using that path if it does any direct access of the configuration file).
#### Additional requests
- https://forum.arduino.cc/t/arduino-ide-2-0-portable/1031833/20
- https://forum.arduino.cc/t/arduino-ide-2-0-portable/1031833/23
- https://forum.arduino.cc/t/arduino-ide-2-0-portable/1031833/24
- https://forum.arduino.cc/t/shared-libraries-on-a-classroom-pc-windows/1157040
- https://forum.arduino.cc/t/change-board-package-folder-for-shared-access/1231038
- https://forum.arduino.cc/t/where-could-we-find-arduino-code-source-in-ide-v2-x/1347261/14
- https://forum.arduino.cc/t/arduinoide-2-3-6-silent-with-libs-for-all-users/1380305
- https://forum.arduino.cc/t/binary-filenames-contain-ino/1384989/5
- https://forum.arduino.cc/t/config-directory-parameter-to-arduinoide-executable/1387789
- https://forum.arduino.cc/t/using-two-instances-of-ide-2-3-6-on-windows/1397098
#### Related
- https://github.com/arduino/arduino-ide/issues/122
- https://forum.arduino.cc/t/arduino-ide-2-0-rc-silent-install/960245/12
- https://forum.arduino.cc/t/arduino-ide-2-2-1-request-for-administrative-privileges-on-first-run/1212198
- https://forum.arduino.cc/t/platform-tools-in-to-install-directory/1271985
- https://forum.arduino.cc/t/arduino-2-x-in-the-classroom/1296515
- https://forum.arduino.cc/t/compile-error-permissions-denied-for-student-user/1377240
---
<details>
<summary><b>Keywords</b></summary>
<p>
- "configuration directory"
</p>
</details>
### Issue checklist
- [x] I searched for previous requests in [the issue tracker](https://github.com/arduino/arduino-ide/issues?q=)
- [x] I verified the feature was still missing when using the latest [nightly build](https://www.arduino.cc/en/software#nightly-builds)
- [x] My request contains all necessary details
If you have a GitHub account, you can subscribe to that thread to get notifications of any new developments related to this subject:
Please only comment on the GitHub issue thread if you have new technical information that will assist with the resolution. General discussion and support requests are always welcome here on the Arduino Forum.
The developers are tracking this request here:
opened 01:25AM - 21 Nov 24 UTC
type: enhancement
topic: code
### Describe the request
Sharing Arduino IDE sketches between users is pretty h… andicapped right now, because the [`sketch.yaml` project file](https://arduino.github.io/arduino-cli/dev/sketch-project-file/) isn't yet supported in the IDE, and there is no way to share the settings that are manually configured in the "Tools" menus. This is in spite of the fact that I've already configured the sketchbook location to the root of my GitHub repository's sandbox.
The first MVP behavior wouldn't even need to support multiple build profiles or provide any additional user interface. It could be as simple as:
1. If the sketch `.ino` has a `sketch.yaml` file next to it, and
2. if the `sketch.yaml` explicitly defines a default profile, then
3. load & save all platform properties to/from the default profile
4. load & save all board properties to/from the default profile's FQBN
5. load & save all library installations to/from the default profile
### Describe the current behavior
#### Board Selection
When opening a sketch Arduino IDE does select the board, custom board options, and port according to the selections the user had the last time that sketch was open. However, this data is stored separately from the sketch, which causes two problems:
- There is no way to share that configuration along with the sketch
- If the path of the sketch is changed, the configuration data is disassociated from the sketch (the data is keyed to the sketch path)
#### Dependencies Management
Library and platforms can only be managed globally. There is no way to control dependencies on a per-sketch basis.
This results in the frustrating situation where a working project can be broken at any time simply by installing a library for use with another project.
The users must resort to inefficient and complex measures to control dependencies. For example, they may vendor library dependencies inside the sketch, which [may require modifications to the library source code](https://github.com/arduino/arduino-cli/issues/1255#issuecomment-476540604) and makes updates inconvenient.
Per-sketch dependencies management is also the root motivation for the majority of the many users passionately requesting the implementation of a portable mode (https://github.com/arduino/arduino-ide/issues/122). For most applications, use of a portable IDE installation for project dependencies management is inferior to the build profiles system, so assuming the effort for this proposal is approximately equal or lesser, the finite development resources would be more effectively investing into adding support for build profiles than to implementing portable mode.
### Arduino IDE version
2.3.4-nightly-20241120
### Operating system
All
### Operating system version
Any
### Additional context
#### Additional requests
- https://github.com/arduino/arduino-ide/issues/2573#issuecomment-3079568498
- https://github.com/arduino/arduino-ide/issues/150#issuecomment-830714850
- https://github.com/arduino/arduino-ide/issues/424
- https://github.com/arduino/arduino-ide/issues/2736
- https://github.com/arduino/Arduino/issues/11106
- https://github.com/arduino/arduino-cli/issues/2818
- https://arduino.stackexchange.com/questions/8651/loading-local-libraries
- https://forum.arduino.cc/t/ide-parameters/557892/5
- https://forum.arduino.cc/t/missing-old-ide-features/698280
- https://forum.arduino.cc/t/portable-is-not-honored/850853
- https://forum.arduino.cc/t/arduino-ide-2-0-portable/1031833/10
- https://forum.arduino.cc/t/arduino-ide-2-0-portable/1031833/11
- https://forum.arduino.cc/t/arduino-ide-2-00-and-lilygo-t-display-esp-s3-black-screen/1036875/21
- https://forum.arduino.cc/t/how-do-i-include-a-library-in-a-sketch-directory/1079812/4
- https://forum.arduino.cc/t/is-there-a-way-to-automatically-install-all-libraries-used-by-a-project/1165621
- https://forum.arduino.cc/t/how-to-save-relevant-library-for-the-future/1211416
- https://forum.arduino.cc/t/managing-library-versions-over-multiple-projects/1242941
- https://forum.arduino.cc/t/local-libraries/1259854/1
- https://forum.arduino.cc/t/local-libraries/1259854/10
- https://forum.arduino.cc/t/why-cant-the-ino-file-remember-which-libraries-and-linbrary-versions-were-used-by-that-sketch/1303387
- https://forum.arduino.cc/t/board-and-library-update-issues-causing-breaking-changes/1317643
- https://forum.arduino.cc/t/library-folder-names-irremote-in-particular/1326254
- https://forum.arduino.cc/t/project-libraries-and-dependencies-automatically-to-one-package-for-export/1339096
- https://forum.arduino.cc/t/arduino-library-question/1349706
- https://forum.arduino.cc/t/how-to-force-arduino-ide-to-use-particular-library/1351795/1
- https://forum.arduino.cc/t/how-to-force-arduino-ide-to-use-particular-library/1351795/13
- https://forum.arduino.cc/t/release-control-in-ide-2-x-x/1369830
- https://forum.arduino.cc/t/defining-board-type-and-add-sketch-folder/1382328
#### Related
- https://github.com/arduino/arduino-ide/issues/122
- https://github.com/arduino/arduino-ide/issues/2438
- https://github.com/arduino/Arduino/issues/4936
- https://github.com/arduino/arduino-cli/issues/1255
- https://github.com/arduino/arduino-cli/issues/1256 / https://github.com/arduino/arduino-builder/pull/223
### Issue checklist
- [x] I searched for previous requests in [the issue tracker](https://github.com/arduino/arduino-ide/issues?q=)
- [x] I verified the feature was still missing when using the latest [nightly build](https://www.arduino.cc/en/software#nightly-builds)
- [x] My request contains all necessary details
If you don't mind working with a command line tool, the official Arduino CLI tool has the capability to manage dependencies on a per-sketch basis, as you are hoping to accomplish:
https://arduino.github.io/arduino-cli/latest/sketch-project-file/#build-profiles
Arduino CLI is used under the hood by Arduino IDE, providing much of the non-GUI functionality. So the support for Arduino sketches, libraries, and boards platforms, and the general sketch compilation system is identical between the two. That is not necessarily the case when using 3rd party alternatives such as PlatformIO. This means you can seamlessly switch back and forth between using Arduino CLI in cases where you need its advanced features, and Arduino IDE when you want the convenience of an integrated development environment.
1 Like
There is information about that here:
https://github.com/arduino/arduino-ide/issues/2731#:~:text=Allow%20the%20user%20to%20set%20the%20Arduino%20IDE%20configuration%20folder%20path
The hardcoded location for the Arduino CLI configuration file used by Arduino IDE is under the Arduino IDE configuration folder (i.e., $HOME/.arduinoIDE
), so if the Arduino IDE configuration folder location was made configurable, this would also make the Arduino CLI configuration file location configurable.
The Eclipse Theia Platform IDE framework upon which Arduino IDE is built already has the capability for the user to set an arbitrary configuration folder location via the THEIA_CONFIG_DIR
environment variable:
theia/packages/core/src/node/env-variables/env-variables-server.ts at v1.57.0 · eclipse-theia/theia · GitHub
protected async createConfigDirUri(): Promise<string> {
if (process.env.THEIA_CONFIG_DIR) {
// this has been explicitly set by the user, so we do not override its value
return FileUri.create(process.env.THEIA_CONFIG_DIR).toString();
}
However, that system is overridden in the Arduino IDE codebase:
arduino-ide/arduino-ide-extension/src/node/theia/env-variables/env-variables-server.ts at 0f9f0d07b7d5ff0cdefda3e77eb6b5ce2854c4a8 · arduino/arduino-ide · GitHub
join(homedir(), BackendApplicationConfigProvider.get().configDirName)
I believe the reason for this override was that, at the time it was implemented, Theia hardcoded the default configuration folder path as $HOME/.theia
and we wanted a folder name that matches the application. However, the ability for each application to configure a custom default configuration folder name has since been added to Theia:
Support customization of configuration area for customer application by rschnekenbu · Pull Request #14319 · eclipse-theia/theia · GitHub
So there is now no point in us maintaining the override code in this project.
1 Like
gadile
July 24, 2025, 12:58am
23
Thank you for the detailed reply, hope to see these features implemented!
I'll try the CLI in the meanwhile, thank you
1 Like