|
| 1 | +# CLI Commands |
| 2 | + |
| 3 | +The ESP-IDF Installation Manager provides a comprehensive command-line interface with various commands to manage your ESP-IDF installations. This document details all available commands and their usage. |
| 4 | + |
| 5 | +## Available Commands |
| 6 | + |
| 7 | +```bash |
| 8 | +eim [OPTIONS] [COMMAND] |
| 9 | +``` |
| 10 | + |
| 11 | +### Global Options |
| 12 | + |
| 13 | +These options can be used with any command: |
| 14 | + |
| 15 | +- `-l, --locale <LOCALE>`: Set the language for the wizard (en, cn) |
| 16 | +- `-v, --verbose`: Increase verbosity level (can be used multiple times) |
| 17 | +- `--log-file <LOG_FILE>`: File in which logs will be stored (default: eim.log) |
| 18 | +- `-h, --help`: Print help information |
| 19 | +- `-V, --version`: Print version information |
| 20 | + |
| 21 | +### Commands Overview |
| 22 | + |
| 23 | +| Command | Description | |
| 24 | +|---------|-------------| |
| 25 | +| `install` | Install ESP-IDF versions | |
| 26 | +| `wizard` | Run the ESP-IDF Installer Wizard (interactive mode) | |
| 27 | +| `list` | List installed ESP-IDF versions | |
| 28 | +| `select` | Select an ESP-IDF version as active | |
| 29 | +| `rename` | Rename a specific ESP-IDF version | |
| 30 | +| `remove` | Remove a specific ESP-IDF version | |
| 31 | +| `purge` | Purge all ESP-IDF installations | |
| 32 | +| `import` | Import existing ESP-IDF installation using tools_set_config.json | |
| 33 | +| `discover` | Discover available ESP-IDF versions (not implemented yet) | |
| 34 | + |
| 35 | +## Command Details |
| 36 | + |
| 37 | +### Install Command |
| 38 | + |
| 39 | +Non-interactive installation of ESP-IDF versions. This command runs in non-interactive mode by default. |
| 40 | + |
| 41 | +```bash |
| 42 | +eim install [OPTIONS] |
| 43 | +``` |
| 44 | + |
| 45 | +Options: |
| 46 | +- `-p, --path <PATH>`: Base path to which all files and folders will be installed |
| 47 | +- `--esp-idf-json-path <ESP_IDF_JSON_PATH>`: Absolute path to save eim_idf.json file |
| 48 | +- `-c, --config <FILE>`: Path to configuration file |
| 49 | +- `-t, --target <TARGET>`: Target platforms (comma-separated) |
| 50 | +- `-i, --idf-versions <IDF_VERSIONS>`: ESP-IDF versions to install (comma-separated) |
| 51 | +- `--tool-download-folder-name <TOOL_DOWNLOAD_FOLDER_NAME>`: Name of the folder for tool downloads |
| 52 | +- `--tool-install-folder-name <TOOL_INSTALL_FOLDER_NAME>`: Name of the folder for tool installations |
| 53 | +- `--idf-tools-path <IDF_TOOLS_PATH>`: Path to idf_tools.py file relative from ESP-IDF installation folder |
| 54 | +- `--tools-json-file <TOOLS_JSON_FILE>`: Path to tools.json file relative from ESP-IDF installation folder |
| 55 | +- `-n, --non-interactive <NON_INTERACTIVE>`: Run in interactive mode if set to false (default is true for non-interactive mode) |
| 56 | +- `-m, --mirror <MIRROR>`: URL for tools download mirror to be used instead of github.com |
| 57 | +- `--idf-mirror <IDF_MIRROR>`: URL for ESP-IDF download mirror to be used instead of github.com |
| 58 | +- `-r, --recurse-submodules <RECURSE_SUBMODULES>`: Should the installer recurse into submodules of the ESP-IDF repository (default true) |
| 59 | +- `-a, --install-all-prerequisites <INSTALL_ALL_PREREQUISITES>`: Should the installer attempt to install all missing prerequisites (Windows only) |
| 60 | +- `--config-file-save-path <CONFIG_FILE_SAVE_PATH>`: Path to save the configuration file |
| 61 | +- `--idf-features <IDF_FEATURES>`: Comma-separated list of additional IDF features (ci, docs, pytests, etc.) to be installed with ESP-IDF |
| 62 | + |
| 63 | +### Wizard Command |
| 64 | + |
| 65 | +Run the interactive ESP-IDF Installer Wizard. |
| 66 | + |
| 67 | +```bash |
| 68 | +eim wizard [OPTIONS] |
| 69 | +``` |
| 70 | + |
| 71 | +The wizard command accepts the same options as the install command but runs in interactive mode, guiding you through the installation process with a series of prompts. |
| 72 | + |
| 73 | +### List Command |
| 74 | + |
| 75 | +List all installed ESP-IDF versions. |
| 76 | + |
| 77 | +```bash |
| 78 | +eim list |
| 79 | +``` |
| 80 | + |
| 81 | +This command displays all ESP-IDF versions installed on your system, with the currently selected version marked. |
| 82 | + |
| 83 | +### Select Command |
| 84 | + |
| 85 | +Select an ESP-IDF version as active. |
| 86 | + |
| 87 | +```bash |
| 88 | +eim select [VERSION] |
| 89 | +``` |
| 90 | +
|
| 91 | +If `VERSION` is not provided, the command will prompt you to select from available versions. Selecting version means setting the `idfSelectedId` in the `eim_idf.json` file. This is used by the IDEs to know which of the IDF versions you prefer to use. |
| 92 | +
|
| 93 | +### Rename Command |
| 94 | +
|
| 95 | +Rename a specific ESP-IDF version. |
| 96 | +
|
| 97 | +```bash |
| 98 | +eim rename [VERSION] [NEW_NAME] |
| 99 | +``` |
| 100 | +
|
| 101 | +If `VERSION` is not provided, the command will prompt you to select from available versions. |
| 102 | +If `NEW_NAME` is not provided, the command will prompt you to enter a new name. |
| 103 | +
|
| 104 | +### Remove Command |
| 105 | +
|
| 106 | +Remove a specific ESP-IDF version. |
| 107 | +
|
| 108 | +```bash |
| 109 | +eim remove [VERSION] |
| 110 | +``` |
| 111 | +
|
| 112 | +If `VERSION` is not provided, the command will prompt you to select from available versions. |
| 113 | +
|
| 114 | +### Purge Command |
| 115 | +
|
| 116 | +Purge all ESP-IDF installations. |
| 117 | +
|
| 118 | +```bash |
| 119 | +eim purge |
| 120 | +``` |
| 121 | +
|
| 122 | +This command removes all known ESP-IDF installations from your system. |
| 123 | +
|
| 124 | +### Import Command |
| 125 | +
|
| 126 | +Import an existing ESP-IDF installation using a tools_set_config.json file. |
| 127 | +
|
| 128 | +```bash |
| 129 | +eim import [PATH] |
| 130 | +``` |
| 131 | +
|
| 132 | +If `PATH` is not provided, the command will inform you that no config file was specified. |
| 133 | +
|
| 134 | +### Discover Command |
| 135 | +
|
| 136 | +Discover available ESP-IDF versions (not implemented yet). |
| 137 | +
|
| 138 | +```bash |
| 139 | +eim discover |
| 140 | +``` |
| 141 | +
|
| 142 | +This command is planned to discover ESP-IDF installations on your system but is not yet implemented. |
| 143 | +
|
| 144 | +## Examples |
| 145 | +
|
| 146 | +```bash |
| 147 | +# Install ESP-IDF v5.3.2 non-interactively (default behavior) |
| 148 | +eim install -i v5.3.2 |
| 149 | +
|
| 150 | +# Install ESP-IDF v5.3.2 in interactive mode |
| 151 | +eim install -i v5.3.2 -n false |
| 152 | +
|
| 153 | +# Run the interactive wizard |
| 154 | +eim wizard |
| 155 | +
|
| 156 | +# List installed versions |
| 157 | +eim list |
| 158 | +
|
| 159 | +# Select a specific version |
| 160 | +eim select v5.3.2 |
| 161 | +
|
| 162 | +# Rename a version |
| 163 | +eim rename v5.3.2 "ESP-IDF 5.3.2 Stable" |
| 164 | +
|
| 165 | +# Remove a specific version |
| 166 | +eim remove v5.3.2 |
| 167 | +
|
| 168 | +# Purge all installations |
| 169 | +eim purge |
| 170 | +
|
| 171 | +# Import from a config file |
| 172 | +eim import /path/to/tools_set_config.json |
| 173 | +``` |
0 commit comments