|
1 | 1 | arduino-cli-install
|
2 |
| -=================== |
| 2 | +=================== |
| 3 | + |
| 4 | +The ``arduino-cli-install`` script is a cross-platform Python utility that automates the installation of the `Arduino CLI <https://arduino.github.io/arduino-cli/>`_ tool on Linux, macOS, and Windows systems. |
| 5 | + |
| 6 | +Arduino CLI is a command-line interface that provides all the functionality of the Arduino IDE in a scriptable and automatable way. It's particularly useful for continuous integration (CI) workflows, automated testing, and batch operations. |
| 7 | + |
| 8 | +Features |
| 9 | +-------- |
| 10 | + |
| 11 | +- **Cross-platform support**: Works on Linux, macOS, and Windows |
| 12 | +- **Version-specific installation**: Install any specific version of Arduino CLI |
| 13 | +- **Automated download and setup**: Handles downloading, extracting, and placing the executable in the system PATH |
| 14 | +- **Error handling**: Provides clear error messages if installation fails |
| 15 | + |
| 16 | +Usage |
| 17 | +----- |
| 18 | + |
| 19 | +Basic usage: |
| 20 | + |
| 21 | +.. code:: bash |
| 22 | +
|
| 23 | + python arduino-cli-install.py <version> |
| 24 | +
|
| 25 | +Where ``<version>`` is the specific version of Arduino CLI you want to install. |
| 26 | + |
| 27 | +Examples |
| 28 | +^^^^^^^^ |
| 29 | + |
| 30 | +Install a specific version: |
| 31 | + |
| 32 | +.. code:: bash |
| 33 | +
|
| 34 | + python arduino-cli-install.py 0.34.2 |
| 35 | +
|
| 36 | +Installation process |
| 37 | +-------------------- |
| 38 | + |
| 39 | +The script performs the following steps based on your operating system: |
| 40 | + |
| 41 | +**Linux and macOS:** |
| 42 | + |
| 43 | +1. Downloads the appropriate tar.gz archive from the Arduino CLI releases |
| 44 | +2. Extracts the archive |
| 45 | +3. Moves the executable to ``/usr/local/bin/`` (requires sudo privileges) |
| 46 | +4. Cleans up temporary files |
| 47 | + |
| 48 | +**Windows:** |
| 49 | + |
| 50 | +1. Downloads the Windows zip archive using PowerShell |
| 51 | +2. Extracts the archive |
| 52 | +3. Moves the executable to ``C:\Windows\System32\`` (requires administrator privileges) |
| 53 | +4. Cleans up temporary files |
| 54 | + |
| 55 | +Prerequisites |
| 56 | +------------- |
| 57 | + |
| 58 | +- Python 3.x installed on your system |
| 59 | +- Internet connection to download Arduino CLI |
| 60 | +- Administrator/sudo privileges for system-wide installation |
| 61 | +- On Linux/macOS: ``curl`` and ``tar`` commands available |
| 62 | +- On Windows: PowerShell available |
| 63 | + |
| 64 | +.. note:: |
| 65 | + The script installs Arduino CLI system-wide, making it available from any directory in your terminal or command prompt. |
| 66 | + |
| 67 | +.. warning:: |
| 68 | + This script requires elevated privileges (sudo on Linux/macOS, administrator on Windows) to install Arduino CLI in system directories. Make sure you trust the source before running with elevated privileges. |
0 commit comments