It is already implemented by the CLI but it's not yet exposed as an API/command: https://github.com/arduino/arduino-cli/blob/fff99af81a922eb89c01703373659b5983375093/arduino/builder/sketch.go#L100-L103 I would like to avoid duplicating code in the Pro IDE and fully rely on this CLI functionality. Thank you!