|
| 1 | +# Arduino App CLI |
| 2 | + |
| 3 | +`arduino-app-cli` is a command line tool and a service running on Arduino UNO Q boards, that: |
| 4 | + |
| 5 | +- manages and runs Arduino Apps on the board (both Linux and microcontroller parts) |
| 6 | +- provides multiple APIs to perform actions and fetch data, used by the front-end (ArduinoAppsLab) |
| 7 | +- auto-updates itself and other components |
| 8 | + |
| 9 | +## Environment Variables |
| 10 | + |
| 11 | +The following environment variables are used to configure `arduino-app-cli`: |
| 12 | + |
| 13 | +### Application Directories |
| 14 | + |
| 15 | +- **`ARDUINO_APP_CLI__APPS_DIR`** Path to the directory where Arduino Apps created by the user are stored.\ |
| 16 | + **Default:** `/home/arduino/ArduinoApps` |
| 17 | + |
| 18 | +- **`ARDUINO_APP_CLI__DATA_DIR`** Path to the directory where internal data is stored.\ |
| 19 | + **Default:** `/home/arduino/.local/share/arduino-app-cli`\ |
| 20 | + This folder contains: |
| 21 | + - **`examples/`** default example Apps (_e.g._ `/home/arduino/.local/share/arduino-app-cli/examples`) |
| 22 | + - **`assets/`** contains a subfolder for each asset version (_e.g._ `/home/arduino/.local/share/arduino-app-cli/assets/0.4.5`) |
| 23 | + - Each asset folder includes: |
| 24 | + - `bricks-list.yaml` |
| 25 | + - `models-list.yaml` |
| 26 | + - **other data** such as `properties.msgpack` containing variable values |
| 27 | + |
| 28 | +- **`ARDUINO_APP_BRICKS__CUSTOM_MODEL_DIR`** Path to the directory where custom models are stored.\ |
| 29 | + **Default:** `$HOME/.arduino-bricks/ei-models`\ |
| 30 | + (_e.g._ `/home/arduino/.arduino-bricks/ei-models`) |
| 31 | + |
| 32 | +--- |
| 33 | + |
| 34 | +### Execution Settings |
| 35 | + |
| 36 | +- **`ARDUINO_APP_CLI__ALLOW_ROOT`** Allow running `arduino-app-cli` as root.\ |
| 37 | + **Default:** `false` **Not recommended to set to true.** |
| 38 | + |
| 39 | +--- |
| 40 | + |
| 41 | +### External Services |
| 42 | + |
| 43 | +- **`LIBRARIES_API_URL`** URL of the external service used to search libraries.\ |
| 44 | + **Default:** `https://api2.arduino.cc/libraries/v1/libraries` |
| 45 | + |
| 46 | +--- |
| 47 | + |
| 48 | +### Docker Settings |
| 49 | + |
| 50 | +- **`DOCKER_REGISTRY_BASE`** Docker registry used to pull images.\ |
| 51 | + **Default:** `ghcr.io/arduino/` |
| 52 | + |
| 53 | +- **`DOCKER_PYTHON_BASE_IMAGE`** Tag of the Docker image for the Python runner.\ |
| 54 | + **Default:** `app-bricks/python-apps-base:<RUNNER_VERSION>` |
| 55 | + |
| 56 | +### App folder and persistent data |
| 57 | + |
| 58 | +When running an app, persistent files will be saved in the `data` folder inside the app folder; other supporting files, including the Python venv are saved in the `.cache` folder inside the app folder. |
| 59 | + |
| 60 | +### Docker images registry |
| 61 | + |
| 62 | +Arduino Apps bricks might required a docker image, in that case the orchestrator will pull those from the registry configured with the `DOCKER_REGISTRY_BASE` environment variable. By default this points to an Arduino GitHub Container Registry (ghcr.io/arduino). |
| 63 | + |
| 64 | +The only image that needs to be referenced directly is the base Python image (`DOCKER_PYTHON_BASE_IMAGE`), all other containers can be downloaded automatically by the orchestrator depending on the bricks specified as dependencies in the app.yml file. |
0 commit comments