Forrest logo
back to the pio tool

pio-run:tldr:f5356

pio-run: List all available project targets of a specific environment.
$ pio run --list-targets --environment ${environment}
try on your machine

This command is used in the PlatformIO command-line interface (CLI) tool to list the available build targets for a specific environment.

Here is a breakdown of the command:

  • pio run: This is the main command to build or compile a PlatformIO project.
  • --list-targets: This option is used to request a list of available build targets. Build targets refer to the specific boards or platforms on which you can compile your code.
  • --environment ${environment}: This option allows you to specify the environment for which you want to list the build targets. ${environment} is a variable and should be replaced with the actual environment name. The environment represents a specific configuration, such as a development board or a specific set of build flags, defined in the PlatformIO project configuration file (platformio.ini). By specifying the environment, you can filter the build targets to display only the ones available for that particular environment.

To use this command, you need to have PlatformIO CLI installed and navigate to the project folder in the command prompt or terminal before executing it.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the pio tool