idf-wokwi Python package adds simulation support directly to Espressif’s idf.py command. From idf.py, you can run a simulation and pass a selection of options to customize its behavior.
Unlike wokwi-cli, you don’t need to initialize a project as idf-wokwi will implicitly generate the relevant files (wokwi.toml/diagram.json) by inferring information from ESP-IDF. You can however still add your own files if you require other components.
Getting Started
1
Create an API Token
Create an API token on the Wokwi CI Dashboard. Set the
WOKWI_CLI_TOKEN environment variable to the token value.2
Install the Extension
Install the extension with the following command:
3
Run a Simulation
You can now run a simulation by executing:
CLI Options
Pass any selection of the following commands toidf.py wokwi to customize its behavior during runtime.
string
Path to
diagram.json (defaults to project root)number
Simulation timeout in milliseconds (exit code 42 on timeout)
string
Exit successfully when this text appears in serial output
string
Exit with error when this text appears in serial output
string
Exit successfully when this regex matches a serial output line
string
Exit with error when this regex matches a serial output line