Skip to content

Commit 511aba4

Browse files
committed
docs: restructure environment variables section for clarity and organization
1 parent 4b5e754 commit 511aba4

File tree

1 file changed

+56
-52
lines changed

1 file changed

+56
-52
lines changed

docs/user-documentation.md

Lines changed: 56 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,60 @@
1+
# Arduino App CLI
2+
13
## Environment Variables
24

35
The following environment variables are used to configure Arduino App CLI:
46

5-
### Application Directories
6-
7-
- **`ARDUINO_APP_CLI__APPS_DIR`** Path to the directory where Arduino Apps created by the user are stored.\
8-
**Default:** `/home/arduino/ArduinoApps`
9-
10-
- **`ARDUINO_APP_CLI__DATA_DIR`** Path to the directory where internal data is stored.\
11-
**Default:** `/home/arduino/.local/share/arduino-app-cli`\
12-
This folder contains:
13-
- **`examples/`** default example Apps (_e.g._ `/home/arduino/.local/share/arduino-app-cli/examples`)
14-
- **`assets/`** contains a subfolder for each asset version (_e.g._ `/home/arduino/.local/share/arduino-app-cli/assets/0.4.5`)
15-
- Each asset folder includes:
16-
- `bricks-list.yaml`
17-
- `models-list.yaml`
18-
- **other data** such as `properties.msgpack` containing variable values
19-
20-
- **`ARDUINO_APP_BRICKS__CUSTOM_MODEL_DIR`** Path to the directory where custom models are stored.\
21-
**Default:** `$HOME/.arduino-bricks/ei-models`\
22-
(_e.g._ `/home/arduino/.arduino-bricks/ei-models`)
23-
24-
---
25-
26-
### Execution Settings
27-
28-
- **`ARDUINO_APP_CLI__ALLOW_ROOT`** Allow running `arduino-app-cli` as root.\
29-
**Default:** `false` **Not recommended to set to true.**
30-
31-
---
32-
33-
### External Services
34-
35-
- **`LIBRARIES_API_URL`** URL of the external service used to search libraries.\
36-
**Default:** `https://api2.arduino.cc/libraries/v1/libraries`
37-
38-
---
39-
40-
### Docker Settings
41-
42-
- **`DOCKER_REGISTRY_BASE`** Docker registry used to pull images.\
43-
**Default:** `ghcr.io/arduino/`
44-
45-
- **`DOCKER_PYTHON_BASE_IMAGE`** Tag of the Docker image for the Python runner.\
46-
**Default:** `app-bricks/python-apps-base:<RUNNER_VERSION>`
47-
48-
### App folder and persistent data
49-
50-
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.
51-
52-
### Docker images registry
53-
54-
Arduino Apps bricks might required a docker image, in that case the arduino-app-cli 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).
55-
56-
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 arduino-app-cli depending on the bricks specified as dependencies in the app.yml file.
7+
| Environment Variable | Default Value | Description |
8+
|---------------------|---------------|-------------|
9+
| `ARDUINO_APP_CLI__APPS_DIR` | `/home/arduino/ArduinoApps` | Path to the directory where Arduino Apps created by the user are stored |
10+
| `ARDUINO_APP_CLI__DATA_DIR` | `/home/arduino/.local/share/arduino-app-cli` | Path to the directory where internal data is stored (examples, assets, properties) |
11+
| `ARDUINO_APP_BRICKS__CUSTOM_MODEL_DIR` | `$HOME/.arduino-bricks/ei-models` | Path to the directory where custom AI models are stored |
12+
| `ARDUINO_APP_CLI__ALLOW_ROOT` | `false` | Allow running `arduino-app-cli` as root (**Not recommended to set to true**) |
13+
| `LIBRARIES_API_URL` | `https://api2.arduino.cc/libraries/v1/libraries` | URL of the external service used to search Arduino libraries |
14+
| `DOCKER_REGISTRY_BASE` | `ghcr.io/arduino/` | Docker registry used to pull docker images |
15+
| `DOCKER_PYTHON_BASE_IMAGE` | `app-bricks/python-apps-base:<RUNNER_VERSION>` | Tag of the Docker image for the Python runner |
16+
17+
## Directory Structures
18+
Examples of user-defined apps stored into the `ARDUINO_APP_CLI__APPS_DIR` folder.
19+
```
20+
├── my-first-app
21+
│   ├── app.yaml
22+
│   ├── README.md
23+
│   ├── python
24+
│   │   └── main.py
25+
│   sketch
26+
│   │ ├── sketch.ino
27+
│   │ └── sketch.yaml
28+
| └── .cache/ # Temporary files and dependencies
29+
└── my-second-app
30+
├── app.yaml
31+
├── python
32+
│   └── main.py
33+
```
34+
35+
Examples of the `assets` and the builtin `examples` stored into the `ARDUINO_APP_CLI__DATA_DIR` folder.
36+
37+
```
38+
/home/arduino/.local/share/arduino-app-cli/
39+
├── assets
40+
│   └── 0.5.0 # Version-specific assets
41+
│   ├── bricks-list.yaml # Available bricks
42+
│   ├── models-list.yaml # Available models
43+
│   └── ...
44+
├── bootloader_burned.flag
45+
├── default.app
46+
├── properties.msgpack # Variable values
47+
├── examples
48+
│   ├── air-quality-monitoring
49+
│   │   ├── app.yaml
50+
│   │   ├── assets
51+
│   │   ├── python
52+
│   │   ├── README.md
53+
│   │   └── sketch
54+
│   ├── anomaly-detection
55+
│   │   ├── app.yaml
56+
│   │   ├── assets
57+
│   │   ├── python
58+
│   │   └── README.md
59+
│   └── ...
60+
```

0 commit comments

Comments
 (0)