Executing PlatformIO commands directly from Windows Command Prompt (or Linux Terminal)

I was wondering if there is a way to execute PlatformIO commands directly from the command prompt ( or from the terminal in Linux) , instead of opening a new terminal within PlatformIO IDE? It would be super useful to have PlatformIO commands written down sequentially in a file which I can then execute as a script from the prompt.

Sure, PlatformIO IDE is a wrapper around PlatformIO CLI. You need PlatformIO IDE Menu: PlatformIO > Install Shell Commands.

This fails on Linux because making symlinks in /usr/local/bin requires administrative privileges. In fact with default settings none of locations in $PATH are regular user writable. Apaprently there are some attempts to standardize on ~/.local hierarchy for user binaries as well, but this is not enabled with default installation and only ~/.local/share is used for any storage.

You can manually make it:

[sudo] ln -s ~/.atom/packages/platformio-ide/penv/bin/platformio /usr/local/bin/platformio