Env object documentation

It feels awkward that my first question to the community is where to find documentation. In the extra-(pre/post)-scripts you can gain access to the settings in the platformio.ini file by use of the Import(“env”) statement. But where can I find the documentation on the resulting env object and all its methods and properties? My search efforts so far just result in lucky hits to snippets of codes but nothing comprehensive. Thanks!

pio run -e <environment> -t envdump

will show you all details for the env object.

env is an SCons environment with some PlatformIO functions / attributes added to it. You can find the base documentation for at SCons.

https://scons.org/doc/production/HTML/scons-user.html

Especially see e.g. sections

7.2. Construction Environments

Appendix A. Construction Variables

There you’ll find the definitions of env["CCFLAGS"], env["CPPPATH"], etc…

On top of that, the PlatformIO documentation is at

https://docs.platformio.org/en/latest/scripting/index.html

Thanks Max! That is a lot to digest. Your pointers to the scons documentation is 100% on target.
Much appreciated, Anton