CLI Commands

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.

Available Commands

eim [OPTIONS] [COMMAND]

Global Options

These options can be used with any command:

Commands Overview

CommandDescription
installInstall ESP-IDF versions
wizardRun the ESP-IDF Installer Wizard (interactive mode)
listList installed ESP-IDF versions
selectSelect an ESP-IDF version as active
renameRename a specific ESP-IDF version
removeRemove a specific ESP-IDF version
purgePurge all ESP-IDF installations
importImport existing ESP-IDF installation using tools_set_config.json
runRun a command in the context of a specific ESP-IDF version
discoverDiscover available ESP-IDF versions (not implemented yet)
completionsGenerate shell completion script to stdout

Command Details

Install Command

Non-interactive installation of ESP-IDF versions. This command runs in non-interactive mode by default.

Note on Python versions: ESP-IDF supports Python versions 3.10, 3.11, 3.12, 3.13, and 3.14. Note that Python 3.14 is supported on Linux and macOS only; Windows does not support Python 3.14 because ESP-IDF dependencies do not yet support it. Please ensure you have a compatible version installed. Offline installations have stricter requirements, see the --use-local-archive option for details.

eim install [OPTIONS]

Options:

Wizard Command

Run the interactive ESP-IDF Installer Wizard.

eim wizard [OPTIONS]

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.

When installing multiple ESP-IDF versions, the wizard will prompt you to select features for each version independently, allowing you to customize the installation per version.

List Command

List all installed ESP-IDF versions.

eim list

This command displays all ESP-IDF versions installed on your system, with the currently selected version marked.

Select Command

Select an ESP-IDF version as active.

eim select [VERSION]

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.

Rename Command

Rename a specific ESP-IDF version.

eim rename [VERSION] [NEW_NAME]

If VERSION is not provided, the command will prompt you to select from available versions. If NEW_NAME is not provided, the command will prompt you to enter a new name.

Remove Command

Remove a specific ESP-IDF version.

eim remove [VERSION]

If VERSION is not provided, the command will prompt you to select from available versions.

Purge Command

Purge all ESP-IDF installations.

eim purge

This command removes all known ESP-IDF installations from your system.

Import Command

Import an existing ESP-IDF installation using a tools_set_config.json file.

eim import [PATH]

If PATH is not provided, the command will inform you that no config file was specified.

Run Command

Run a command in the context of a specific ESP-IDF version. This command sources the activation script for the specified IDF version before executing your command, making all IDF tools and environment variables available.

eim run <COMMAND> [IDF_VERSION]

Arguments:

If IDF_VERSION is not provided, the command will use the currently selected IDF version (set via eim select). If no version is selected and none is specified, an error will be returned.

Important: If your command contains special shell characters, you should wrap it in quotes:

# Correct - command is quoted
eim run "espidf.py build"

# On Windows (PowerShell)
eim run "espidf.py build"

# If you need to use shell features like pipes or redirects, quote the entire command
eim run "idf.py fullclean > cleanup.log"

The IDF version can be identified by:

Discover Command

Discover available ESP-IDF versions (not implemented yet).

eim discover

This command is planned to discover ESP-IDF installations on your system but is not yet implemented.

Fix Command

Fix the ESP-IDF installation by reinstalling the tools and dependencies

eim fix [PATH]

If no PATH is provided, the user will be presented with selection of all known IDF installation to select from.

Completions Command

Generate shell completion script to stdout.

eim completions <SHELL>

SHELL Shell for which to generate completion.
Possible values: bash, elvish, fish, powershell, zsh

Examples

# Install ESP-IDF v5.3.2 non-interactively (default behavior)
eim install -i v5.3.2

# Install ESP-IDF v5.3.2 in interactive mode
eim install -i v5.3.2 -n false

# Install with specific features
eim install -i v5.3.2 --idf-features=ci,docs

# Install multiple versions with features applied to all
eim install -i v5.3.2,v5.4 --idf-features=ci,docs

# Install with specific tools
eim install -i v5.3.2 --idf-tools=cmake,openocd

# Install multiple versions with tools applied to all
eim install -i v5.3.2,v5.4 --idf-tools=cmake,openocd

# Install using custom repository mirror and stub
eim install -i v5.3.2 --mirror https://my.custom.mirror --repo-stub my-custom-idf

# Run the interactive wizard (allows per-version feature selection)
eim wizard

# Run wizard with multiple versions
eim wizard -i v5.3.2,v5.4

# List installed versions
eim list

# Select a specific version
eim select v5.3.2

# Rename a version
eim rename v5.3.2 "ESP-IDF 5.3.2 Stable"

# Remove a specific version
eim remove v5.3.2

# Purge all installations
eim purge

# Import from a config file
eim import /path/to/tools_set_config.json

# Run a command in the context of a specific IDF version
eim run "idf.py build" v5.3.2

# Run a command using the currently selected IDF version
eim run "idf.py build"

# Run a command with output redirection (command must be quoted)
eim run "idf.py size > sizes.txt" v5.4

Per-Version Feature Configuration

When you need different features for different ESP-IDF versions, use a configuration file:

# config.toml
idf_versions = ["v5.3.2", "v5.4", "v5.5"]

[idf_features_per_version]
"v5.3.2" = ["ci"]
"v5.4" = ["ci", "docs"]
"v5.5" = ["ci", "docs", "pytest", "sbom"]

Then run:

eim install --config config.toml

For more details on feature configuration, see CLI Configuration.