You can get at some of it via automation-api, and.some you'd probably need to exec the CLI for the rest.
Given the extra complexities around what happens for a new stack, I recommend not doing this. It would be better to set the values you want as normal Stack config values. You'd go better getting stack config out of the yaml file for use with
pulumi stack tag set
than the other way around.